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

Thread: Open Suse 13.1: Move /home folder to second Hard Drive/partition

  1. #1

    Question Open Suse 13.1: Move /home folder to second Hard Drive/partition

    I want to move my home folder to my second hard drive. How can I accomplish this task? please provide detailed steps as I am newbee for command line or if possible with Yast.
    I forgot this step during install..

    Thank you

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,286

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    Do you now have a separate home partition? Or is /home on root?
    Makes a bit of a difference for detailed instructions. Also is there anything on home you want to keep?

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    On 2013-12-14 01:36, nilesh suse wrote:
    >
    > I want to move my home folder to my second hard drive. How can I
    > accomplish this task? please provide detailed steps as I am new bee for
    > command line or if possible with Yast.
    > I forgot this step during install..


    Perhaps:

    http://www.tldp.org/HOWTO/Hard-Disk-Upgrade/index.html

    It is old, but this has not changed much.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  4. #4
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    I think you can just do this (someone correct me if I am wrong):

    1. Partition second disk however you want
    2. As root, back up /etc/fstab
    Code:
    cp /etc/fstab /etc/fstab.BAK
    3. Then edit fstab as root
    Code:
    nano /etc/fstab
    Mine looks something like this, yours will be different but the important part is the area where it marks the partition as /home. I suggest trying this in a VM first until you are comfortable enough to do it on the host. You just need to know the name of each partition (which you should be able to find out from something like gparted)

    Code:
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part2 swap                 swap       defaults              0 0
    UUID=bc9a8b77-7e43-44b1-9d57-95b15dfff6b3 /                    btrfs      defaults              0 0
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part4 /home                xfs        defaults              1 2
    Then once you have gotten it to work, just mount the partition that used to be /home and copy over the data you need.
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  5. #5
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,286

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    That will replace the current home media with the new home media but th OP may want to tranfer data from the old home to the new home. If the old home is on root then he is simply overloading the old home and it is not easy to get to any more at least on a normal running system, I guess you could get to it from a level 1 boot but if the first rename old home before mounting the new home they can then just copy the data. But if the old home is on its own partition then what you show is fine since the old home can be gotten to and any data copied.

    I guess they could copy the contents of /home (not home itself just the stuff in home) to the new partition and then doo s you suggest or maybe easier for a newbie to do it in Yast - partition manager to mount the new. But honestly I'd like more detail from he OP before a detailed step by step is done. I'd have no problem winging it but some one not comfortable with Linux concepts might need a true step by step

  6. #6

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    Subscribed. I am also a linux noob and I also need to move my home onto my second partition. In my case the second partition was already created during install except there's not much on it (There's a folder with my name that seems to be a shortcut to home on the other partition and a folder called lost + found) because my music folder, documents, dropbox, etc all seem to be on the little 20gb partition that the system is. Bad news because I only have a couple hundred megabytes left.

  7. #7
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    Quote Originally Posted by gogalthorp View Post
    <removed to save space>
    You are right about YaST being easier, I had never actually used YaST to do partitioning but I checked the utility after I had posted and I realized it was easier for a newbie. And yeah you are right about the details, it does depend on the setup and how much you know about Linux concepts.

    Quote Originally Posted by quadrunner750 View Post
    In my case the second partition was already created during install except there's not much on it (There's a folder with my name that seems to be a shortcut to home on the other partition and a folder called lost + found) because my music folder, documents, dropbox, etc all seem to be on the little 20gb partition that the system is. Bad news because I only have a couple hundred megabytes left.
    I'm not sure I understand what your current setup is like. You have links to another partition from your home folder? Or are you simply saying that /home is on another partition than the root directory?
    openSUSE Leap (42.1) 64 bit
    Plasma 5.4

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    On 2013-12-14 04:06, quadrunner750 wrote:
    >
    > Subscribed. I am also a linux noob and I also need to move my home onto
    > my second partition. In my case the second partition was already created
    > during install except there's not much on it (There's a folder with my
    > name that seems to be a shortcut to home on the other partition and a
    > folder called lost + found) because my music folder, documents, dropbox,
    > etc all seem to be on the little 20gb partition that the system is. Bad
    > news because I only have a couple hundred megabytes left.





    Please, both of you, show here the output of:

    Code:
    mount -l | egrep -v vmware-\|gvfsd-fuse\|fusectl\|/sys/fs/cgroup\|tmpfs
    df -h | egrep -v vmware-\|gvfsd-fuse\|fusectl\|/sys/fs/cgroup\|tmpfs
    Please paste it complete, from initial prompt to final prompt, using
    code tags (the '#' button).
    Posting in
    Code Tags - A Guide



    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  9. #9

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    Quote Originally Posted by robin_listas View Post
    On 2013-12-14 04:06, quadrunner750 wrote:
    >
    > Subscribed. I am also a linux noob and I also need to move my home onto
    > my second partition. In my case the second partition was already created
    > during install except there's not much on it (There's a folder with my
    > name that seems to be a shortcut to home on the other partition and a
    > folder called lost + found) because my music folder, documents, dropbox,
    > etc all seem to be on the little 20gb partition that the system is. Bad
    > news because I only have a couple hundred megabytes left.





    Please, both of you, show here the output of:

    Code:
    mount -l | egrep -v vmware-\|gvfsd-fuse\|fusectl\|/sys/fs/cgroup\|tmpfs
    df -h | egrep -v vmware-\|gvfsd-fuse\|fusectl\|/sys/fs/cgroup\|tmpfs
    Please paste it complete, from initial prompt to final prompt, using
    code tags (the '#' button).
    Posting in
    Code Tags - A Guide



    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)
    First command
    Code:
    brendan@linux-wca6:~> mount -l | egrep -v vmware-\|gvfsd-fuse\|fusect1\|/sys/fs/cgroup\|tmpfs
    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
    /dev/sda2 on / type ext4 (rw,relatime,data=ordered)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
    mqueue on /dev/mqueue type mqueue (rw,relatime)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    /dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
    none on /var/lib/ntp/proc type proc (ro,nosuid,nodev,relatime)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
    brendan@linux-wca6:~>
    Second command
    Code:
    brendan@linux-wca6:~> df -h | egrep -v vmare-\|gvfsd-fuse\|fusect1\|/sys/fs/cgroup\|tmpfs
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda2        20G   18G  667M  97% /
    /dev/sda3       437G   19G  417G   5% /home
    brendan@linux-wca6:~>

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Open Suse 13.1: Move /home folder to second Hard Drive/partition

    On 2013-12-14 05:06, quadrunner750 wrote:

    > First command
    >
    > Code:
    > --------------------
    > /dev/sda2 on / type ext4 (rw,relatime,data=ordered)
    > /dev/sda3 on /home type ext4 (rw,relatime,data=ordered)
    > --------------------
    >
    >
    > Second command
    >
    > Code:
    > --------------------
    > brendan@linux-wca6:~> df -h | egrep -v vmare-\|gvfsd-fuse\|fusect1\|/sys/fs/cgroup\|tmpfs
    > Filesystem Size Used Avail Use% Mounted on
    > /dev/sda2 20G 18G 667M 97% /
    > /dev/sda3 437G 19G 417G 5% /home
    > brendan@linux-wca6:~>
    >
    > --------------------


    Then I don't understand what you want, it doesn't match the question of
    the original poster. You already have home on a separate and big
    partition, just 5% filled.

    Let's read it again.

    > Subscribed. I am also a linux noob and I also need to move my home onto
    > my second partition. In my case the second partition was already created
    > during install except there's not much on it (There's a folder with my
    > name that seems to be a shortcut to home on the other partition and a
    > folder called lost + found) because my music folder, documents, dropbox,
    > etc all seem to be on the little 20gb partition that the system is. Bad
    > news because I only have a couple hundred megabytes left.


    Please run this (as your user, not root), let's see where is your home:

    Code:
    grep `whoami` /etc/passwd
    You should see at least an entry like this:

    Code:
    cer:x:1000:100:Carlos:/home/cer:/bin/bash
    What I'm interested in is the 6th field, in my case "/home/cer". Then
    lets see the contents of that directory like this one - the listing of
    directories for that 6th field:

    Code:
    cer@Telcontar:~> l -dl /home/cer2/*
    drwx------ 2 cer2 users 4096 Oct 15  2011 /home/cer2/Desktop/
    drwx------ 2 cer2 users 4096 Oct 15  2011 /home/cer2/Documents/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Download/
    drwxr-xr-x 4 cer2 users   35 Feb 20  2007 /home/cer2/GNUstep/
    drwx------ 2 cer2 users   68 Mar  4  2007 /home/cer2/Mail/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Music/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Pictures/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Public/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Templates/
    drwxr-xr-x 2 cer2 users    6 Feb  5  2008 /home/cer2/Videos/
    drwxr-xr-x 2 cer2 users   40 Feb 17  2011 /home/cer2/bin/
    -rw------- 1 cer2 users  310 Mar  4  2007 /home/cer2/dead.letter
    drwxr-xr-x 2 cer2 users   38 Feb 16  2007 /home/cer2/download/
    drwx------ 2 cer2 users    6 Apr 24  2007 /home/cer2/mail/
    -rw------- 1 cer2 users 7577 Feb 17  2011 /home/cer2/mbox
    -rw-r--r-- 1 cer2 users 4022 Mar  4  2007 /home/cer2/notas.pgp4pine
    -rw-r--r-- 1 cer2 users 1096 Mar  4  2007 /home/cer2/notas.pgp4pine~
    -rw-r--r-- 1 cer2 users 2872 Mar  4  2007 /home/cer2/pgp4pine.debug
    drwxr-xr-x 2 cer2 users   23 Feb 16  2007 /home/cer2/public_html/
    drwxr-xr-x 3 cer2 users   31 Feb 26  2011 /home/cer2/tmp/
    lrwxrwxrwx 1 root root     3 Dec 14 14:08 /home/cer2/tmps -> tmp/

    What interests me are entries like the last line, where there is a
    redirection or link.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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