Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: need help planning migration of home to other partition

  1. #1
    Join Date
    Jul 2009
    Location
    Rockyford Alberta Canada
    Posts
    1,388

    Default need help planning migration of home to other partition

    Well I finally got all apps installed (except xforms, xBasic) now I need to resolve the next hurdle. I have the following left after my mess was fixed.
    /dev/sda1 boot/efi 300mib
    /dev/sda2 swap 6GB
    /dev/sda2 15.1 root 120GB
    /dev/sda4 ntfs data 760GB
    /dev/sda5 ------------------>old 15.1 badly broken 130GB
    /dev/sda6 back-up files 70GB

    My root sda3 has only 12 GB left on it and 97% is stuff in home. I would prefer not to just move it and create links to other drives because I have to at each boot go into dolphin - supper user and give permission to open each link before apps trying to work with data can see the partitions. Nothing on sda5 is needed now so I need to remove it from grub menu and make it my new home partition.

    Question:
    Do I need to boot from USB live to do this or can I do the move using the live session?
    When your up to your a** in Alligators it's pretty hard to remember you intended to drain the swamp (author unknown)

  2. #2
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    2,987

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by techwiz03 View Post
    Question:
    Do I need to boot from USB live to do this or can I do the move using the live session?
    I'd do it like this:
    1) copy all home files (including hidden files/folders, etc.) to sda5
    2) boot from a liveCD or similar and backup and edit fstab to point to the new partition. You probably can do this by booting in safe/rescue mode, but I'm not sure.
    3) delete old home folder *after* checking all is OK, else revert the fstab change.

    I'm assuming your root is sda3, you listed sda2 twice.

  3. #3
    Join Date
    Jul 2009
    Location
    Rockyford Alberta Canada
    Posts
    1,388

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by brunomcl View Post
    I'd do it like this:
    1) copy all home files (including hidden files/folders, etc.) to sda5
    2) boot from a liveCD or similar and backup and edit fstab to point to the new partition. You probably can do this by booting in safe/rescue mode, but I'm not sure.
    3) delete old home folder *after* checking all is OK, else revert the fstab change.

    I'm assuming your root is sda3, you listed sda2 twice.
    wow! getting ahead of myself here. sdar5 has has old 15.1 in it don't I have to remove it from grub boot menu first?
    Then reformat so no errors exist on it
    Then move files to it??
    When your up to your a** in Alligators it's pretty hard to remember you intended to drain the swamp (author unknown)

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,310

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by techwiz03 View Post
    wow! getting ahead of myself here. sdar5 has has old 15.1 in it don't I have to remove it from grub boot menu first?
    Then reformat so no errors exist on it
    Then move files to it??
    YaST is your friend:

    • use partitioner to modify target partition
    • use bootloader to update boot menu

    Being consistent and concise helps a lot in maintenance:

    Code:
    :~ # cat /etc/fstab
    UUID=7739-823F                             /boot/efi         vfat  defaults             0  0
    UUID=526e2128-0a16-4246-b08f-91160007fc26  /                 ext4  defaults             0  0
    UUID=18e63751-b483-4422-b10d-6b896681ee64  /home             ext4  defaults             0  0
    UUID=08fb3e4e-133d-4b2d-96a0-0a1e0a3381d8  /home-HDD         ext4  defaults             0  0
    :~ #
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  5. #5
    Join Date
    Jul 2009
    Location
    Rockyford Alberta Canada
    Posts
    1,388

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by karlmistelberger View Post
    YaST is your friend:

    • use partitioner to modify target partition
    • use bootloader to update boot menu

    Being consistent and concise helps a lot in maintenance:

    Code:
    :~ # cat /etc/fstab
    UUID=7739-823F                             /boot/efi         vfat  defaults             0  0
    UUID=526e2128-0a16-4246-b08f-91160007fc26  /                 ext4  defaults             0  0
    UUID=18e63751-b483-4422-b10d-6b896681ee64  /home             ext4  defaults             0  0
    UUID=08fb3e4e-133d-4b2d-96a0-0a1e0a3381d8  /home-HDD         ext4  defaults             0  0
    :~ #
    Code:
    cat /etc/fstab
    UUID=331eace0-f7c9-4732-8ff0-129ee08774b4  /          ext4  acl,user_xattr  0  1
    UUID=FA40-B0B4                             /boot/efi  vfat  defaults        0  0
    UUID=2d7dbe3d-bd50-40b6-b222-080e09505c79  /home1     ext4  defaults        0  2
    That mounted home1 isn't a home folder it's just a drive I mounted to hold some files from home while I was trying to fix things.
    When your up to your a** in Alligators it's pretty hard to remember you intended to drain the swamp (author unknown)

  6. #6
    Join Date
    Jul 2009
    Location
    Rockyford Alberta Canada
    Posts
    1,388

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by techwiz03 View Post
    Code:
    cat /etc/fstab
    UUID=331eace0-f7c9-4732-8ff0-129ee08774b4  /          ext4  acl,user_xattr  0  1
    UUID=FA40-B0B4                             /boot/efi  vfat  defaults        0  0
    UUID=2d7dbe3d-bd50-40b6-b222-080e09505c79  /home1     ext4  defaults        0  2
    That mounted home1 isn't a home folder it's just a drive I mounted to hold some files from home while I was trying to fix things.
    Found a post by 'oldcpu' about using grub-customizer so installed that to see if I could remove the unwanted boot items in grub and it gave amount of gtk+ depreciated errors but it did generate a grub2 menu with the correct entries. so I am now able to work on replacing the home1 to hold my real home folder. I will be back when I have it ready to make it the active home.
    When your up to your a** in Alligators it's pretty hard to remember you intended to drain the swamp (author unknown)

  7. #7
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,310

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by techwiz03 View Post
    Code:
    cat /etc/fstab
    UUID=331eace0-f7c9-4732-8ff0-129ee08774b4  /          ext4  acl,user_xattr  0  1
    UUID=FA40-B0B4                             /boot/efi  vfat  defaults        0  0
    UUID=2d7dbe3d-bd50-40b6-b222-080e09505c79  /home1     ext4  defaults        0  2
    That mounted home1 isn't a home folder it's just a drive I mounted to hold some files from home while I was trying to fix things.
    From the above and the top post I conclude current system partition sits on /dev/sda3 and home is a subdirectory of /. You want to move the contents of folder /home to partition /dev/sda5 and subsequently mount /dev/sda5 to /home. I have done this several times and always proceeded as follows (assuming file system on /dev/sda5 was already adjusted by YaST partitioner):
    • Boot a live system from USB and create empty folders /old and /new.
    • mount /dev/sda3 to /old and /dev/sda5 to /new.
    • Mirror data by running 'rsync -a /old/home/ /new/'.
    • rename /old/home to /old/home.save
    • create /old/home
    • add /dev/sda5 to file /old/etc/fstab by appending UUID=<actual UUID of sda5> /home ext4 defaults 0 2
    • reboot
    Keep directory /old/home.save until you verified everything works as expected.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

  8. #8
    Join Date
    Jul 2009
    Location
    Rockyford Alberta Canada
    Posts
    1,388

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by karlmistelberger View Post
    From the above and the top post I conclude current system partition sits on /dev/sda3 and home is a subdirectory of /. You want to move the contents of folder /home to partition /dev/sda5 and subsequently mount /dev/sda5 to /home. I have done this several times and always proceeded as follows (assuming file system on /dev/sda5 was already adjusted by YaST partitioner):
    • Boot a live system from USB and create empty folders /old and /new.
    • mount /dev/sda3 to /old and /dev/sda5 to /new.
    • Mirror data by running 'rsync -a /old/home/ /new/'.
    • rename /old/home to /old/home.save
    • create /old/home
    • add /dev/sda5 to file /old/etc/fstab by appending UUID=<actual UUID of sda5> /home ext4 defaults 0 2
    • reboot

    Keep directory /old/home.save until you verified everything works as expected.
    yep I messed up before I got your post but think it is fixable.
    original had /home mounted on root (/)
    in home was /home/me .... me replaced by my real login name.

    as super user I used yast to unmount 'oldlinux' partitition, and reformat it ext4
    mounted 'oldlinux to run/media/linux/me

    copied /home/me folder to 'oldlinux' and relabeld 'oldlinux (sda5) as me2

    but to view me2 contents I need to supply root password so think this is not the way I should have done this.

    as root i have been able to verify that contents of /home/me exactly match /dev/sda5 'me2' which I think is basically what rsync would have done.

    I don't have enough space to create /home/old /home/new while still using /home/me
    /home/me is 89.6GB
    space left on root where /home/me is < 13GB
    Linux 15.1 flash has <20GB
    /dev/sda5 has 130GB - 89GB = 41GB

    As near as I can tell sda3 with root+home is 118G , /home uses 89G and free is 13G so root is using 16G

    System at his point is working and all packages needed are installed so really don't want to re-install root
    Ideally, I'd like to have root as it is backed up somewhere safe with home located on sda5

    ?? can make a folder on sda5 called home and move current contents into that folder in sub-folder called 'me'
    and attach that /dev/sda5 as /home ??

    this time I will wait for answer before blindly proceeding
    Last edited by techwiz03; 01-Nov-2019 at 09:44. Reason: more info
    When your up to your a** in Alligators it's pretty hard to remember you intended to drain the swamp (author unknown)

  9. #9
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,452
    Blog Entries
    14

    Default Re: need help planning migration of home to other partition

    No. You have to understand that /home is not a folder on the partition/filesystem where your homedir resides, rather a mountpoint on / where that fs is mounted. So, to use some partition/fs for /home, you would have to copy your homedir itself there, from your example "me" and not /home/me. The latter would, once mounted, give /home/home/me .
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  10. #10
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    1,310

    Default Re: need help planning migration of home to other partition

    Quote Originally Posted by techwiz03 View Post
    yep I messed up before I got your post but think it is fixable.
    original had /home mounted on root (/)
    in home was /home/me .... me replaced by my real login name.

    as super user I used yast to unmount 'oldlinux' partitition, and reformat it ext4
    mounted 'oldlinux to run/media/linux/me

    copied /home/me folder to 'oldlinux' and relabeld 'oldlinux (sda5) as me2

    but to view me2 contents I need to supply root password so think this is not the way I should have done this.

    as root i have been able to verify that contents of /home/me exactly match /dev/sda5 'me2' which I think is basically what rsync would have done.

    I don't have enough space to create /home/old /home/new while still using /home/me
    /home/me is 89.6GB
    space left on root where /home/me is < 13GB
    Linux 15.1 flash has <20GB
    /dev/sda5 has 130GB - 89GB = 41GB

    As near as I can tell sda3 with root+home is 118G , /home uses 89G and free is 13G so root is using 16G

    System at his point is working and all packages needed are installed so really don't want to re-install root
    Ideally, I'd like to have root as it is backed up somewhere safe with home located on sda5



    this time I will wait for answer before blindly proceeding
    Try to mount all partitions relevant to this thread. What is the current status:
    Code:
    erlangen:~ # df -h -x tmpfs -x devtmpfs
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda2        30G   18G   11G  64% /
    /dev/sda3       428G  270G  137G  67% /home
    /dev/sda1       100M  7.8M   93M   8% /boot/efi
    /dev/sdb6       1.8T  1.4T  380G  79% /home-HDD
    erlangen:~ #
    Running a live system and creating empty folders /old and /new stick will not occupy space at all. Command 'mkdir /old' in the live system running will create an empty folder on your USB stick. A subsequent 'mount /dev/sda3 /old' will not occupy any space either, but make your data sitting on partition /dev/sda3 available in folder /old. See also: https://superuser.com/questions/1163...oint-vs-folder. Please read carefully and try to understand.

    Try to undo the mess created already. Post the current status. Post what you intend to achieve. Always specify the partition the file system is sitting on and and the mount point used.

    ?? can make a folder on sda5 called home and move current contents into that folder in sub-folder called 'me'
    and attach that /dev/sda5 as /home ??
    Your wording confuses me. I presume you want to copy the contents of /home on partition /dev/sda3 to partition /dev/sda5.

    For doing so it's best to use the live system and proceed as already detailed above. You need not create a folder /me on /dev/sda5.

    When running your original system at /dev/sda3 and mounting partition /dev/sda5 through /etc/fstab using /home as mount point will care for that.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), openSUSE Tumbleweed, KDE Plasma 5

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •