After installing the drive, I had to figure out how to carve up the new space. There are probably many ways to do this, but I knew I wanted to:
- Add more space to the /dev/fedora/root LV.
- Keep the new, slower disk in a separate VG. I didn't want any LV's to span these two disks.
- Add the new disk to the existing VG
- Move the home data to the new disk
- Split that disk out into it's own VG
- Expand the root filesystem
- fdisk /dev/sdb # create a partition on the new disk
- pvcreate /dev/sdb1 # create a new phyiscal volume from the new disk
- vgextend fedora /dev/sdb1 # add the new physical volume to the existing Volume group that home is in
- pvdisplay -m # get list of extents for the volume group
- pvmove -v /dev/sda2:7500-57499 /dev/sdb1 # move home to new disk lvchange -an /dev/fedora/home # deactivate home
- vgsplit fedora VG_Home /dev/sdb1 # from fedora (old volume group), create a new volume group called VG_Home
- lvchange -ay /dev/VG_Home/home # activate the volume
- mount /dev/VG_Home/home /home/ # test and see if data is still there
- vi /etc/fstab # make new volume avail on boot
- lvextend -L+20G fedora/root # add 20GB to my /root partition
- resize2fs /dev/fedora/root # resize root and add the extra space
- df -hal # confirm space is there
No comments:
Post a Comment