Ask Your Question

Can /home be put on second hd during clean installation

asked 2019-01-16 14:45:22 -0500

rschultz gravatar image

updated 2019-01-17 09:07:49 -0500

New installation of F28. During the installation I'd like to install to sda. /,/boot, /swap, etc. Except for /home. I'd like to put /home on sdb. I've spent a week trying. Mostly with LVM. Getting tired of learning about LVM. Beginning to think this can not be done.

I'd like to avoid moving /home to sdb after the installation.

edit retag flag offensive close merge delete


See my basic instructions in an answer below and try to search the forum for an answer. As far as I recall, the same questions had been asked and answered before. ( or so...)

florian gravatar imageflorian ( 2019-01-17 03:28:59 -0500 )edit

I think Florian may have what I was doing wrong. "Select LVM, place / and /boot on sda and /home on sdb. " If I added / and then /boot anaconda would complain about no /swap. If I added /swap it seemed that would over write /boot and the disk would not boot.

I have a test system and am getting quit proficient at installing F28 and using gparted and dd to have blank HDs. I will try this again today.

rschultz gravatar imagerschultz ( 2019-01-17 09:26:20 -0500 )edit

I have found several good detailed and step by step tutorials on adding a second HD and/or moving /home to a second HD. It just seems if I know that a new system will have 2 HD and /home will be on a second HD the simplest thing is take care of this during installation.

rschultz gravatar imagerschultz ( 2019-01-17 09:29:04 -0500 )edit

Thanks. That worked using the anaconda gui at install time. /home is on sdb. Everything else on sda. Could not add the second LVG. Need to figure out the correct combination of adding items. Thanks again.

rschultz gravatar imagerschultz ( 2019-01-17 12:38:44 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-01-16 19:22:23 -0500

updated 2019-01-17 11:08:31 -0500

In addition, you can set it up immediately during the installation process. You can install it by referring to the installation screen.

During the initial installation, the home setup will be properly installed using another storage device (/dev/sdb). run in virtualbox - F29 install progress

image description

I prefer to expand the partition after installation. In short, create an lvm disk, copy the / home directory in /dev/sda through rsync, and link the lvm information created in /etc/fstab to /home in the /etc/fstab directory.

 a. create lvm disk for /dev/sdb
 # fdisk /dev/sdb
   => p      ; check
   => n      ; add new disk
   => t      ; change to disk ext4 to lvm
   =>wq    : overwrite and quit

 b. make lvm for /dev/sdb
 # pvcreate /dev/sdb1
 # vgcreate rau /dev/sdb1
 # lvcreate -l 100%FREE -n pasi rua
 # mkfs.xfs /dev/rua/pasi                        ;  or  mkfs.xfs /dev/mapper/rua-pasi

 c. mount lvm
 # mount /dev/rua/pasi /mnt
 # rsync -avz /home/*  /mnt/
 # cp -Rf /home /home_backup

 d. modify /etc/fstab
 # vi /etc/fstab
 /dev/mapper/rua-pasi    /home           xfs     defaults 0 0

 e. reboot and check
 # reboot
 # lvscan
 [root@cugar simmon]# df
 /dev/mapper/rua-pasi     10471424   147900  10323524   2% /home

I took my case as an example, and the lvm configuration was created using /dev/mapper/rua-pasi. If it works normally, it will delete the backup folder.

edit flag offensive delete link more

answered 2019-01-17 03:26:29 -0500

florian gravatar image

Hi @rschultz

no worries, this can be done with Fedora's graphical installer anaconda.

You need to make sure that in the first step you select both drives (sda and sdb) as the targets for your installation. From there it should be straightforward. Select LVM, place / and /boot on sda and /home on sdb. You want to create a new (second) Volume Group (VG) for the /home that resides on /sdb. That step is important.

edit flag offensive delete link more

Question Tools


Asked: 2019-01-16 14:45:22 -0500

Seen: 153 times

Last updated: Jan 17 '19