0

I have two physical hard drives and the set up looks like this:

http://prntscr.com/bhyu4k

I need to partition the sdb1 (fdisk), create ext4 filesystem based on the type that is used on sda (mkfs command), and mount it to /home. I want the home directory do be sda3 plus the whole sdb in size.

What would be the best way of doing this?

Thanks.

0

LVM:

no need to partition /dev/sdb
create PV of /dev/sdb
create VG with /dev/sdb
create LV on VG
format LV
mount LV in temporary location
copy /home to temporary location
umount LV
umount /home
mount LV to /home
make PV of /dev/sda3
add sda3 PV to VG
resize /home LV
resize /home filesystem

voila!

  • Is LVM a better round than the standard way? I wont have any more disks later on as this is not possible, and I am not likely to be moving anything around too. – Tom Smith Jun 19 '16 at 9:03
  • What standard way? LVM is pretty much the only way you can achieve "the home directory do be sda3 plus the whole sdb in size". – Henrik Jun 19 '16 at 9:39
  • Ok :) This is good, as I will be finally able to start working on this. – Tom Smith Jun 19 '16 at 9:42
  • Would I need to make sda1, sda2, and sda4 part of the new LVM system too (they have been created in a standard way)? What are the steps 6-10? I dont have anything under /home and nothing there needs to be moved or preserved, if that would make a difference. – Tom Smith Jun 19 '16 at 9:55
  • Maybe I should do something like this instead? A) create PV of /dev/sdb B) create PV of /dev/sda3 C) create VG with /dev/sdb and /dev/sda3 PV's D) create LV of these new VG E) format with ext4 F) mkdir /home on that. And also, again, just leave the sda1, sda2, and sda4 as is with this? – Tom Smith Jun 19 '16 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.