0

http://prntscr.com/bhyu4k

I have a set up that looks like this, and I need to have sda3 and sdb under /home folder, all as one. I dont care about the contents of the current /home directory, everything there can be erased.

1) LVM work has never been done on this system. sda, sda1, sda2, (sda3), sda4 can be left 
as is before going to the further steps? They are set up the standard way. 
2) There is no need to partition the sda3 as 8e (the LVM type)? 
3) Do not create a parition on sdb, or maybe create a partition of the LVM type (8e)?
4) pvcreate /dev/sdb - create a physical volume 
5) pvcreate /dev/sda2 - create physical volume 
6) vgcreate volgrp1 /dev/sdb /dev/sda2 - create volume group named volgrp1
7) lvcreate volgrp1 (can define size, name and probably other things, but this is the most 
basic form, default naming convention will be used) 
8) create an ext4 filesystem on it, just like with regular partitions
9) mkdir /home
10) mount lvol1 (default name given by the lvcreate command) on it 
11) So the (sda), sda1, sda2, sda4 will be non-lvm and thats ok?

Would this be correct, or am I missing something here or doing something wrong?

Thanks.

Tom Smith
  • 13
  • 2

1 Answers1

1

You should have done a copy-paste instead of a screenshot :) Here's what it looks like:

NAME   MAJ:MIN RM    SIZE RO TYPE MOUNTPOINT
sda      8:0    0    1.8T  O disk
|-sda1   8:1    0 1004.5K  O part
|-sda2   8:2    0   19.5G  O part /
|-sda3   8:3    0    1.8T  O part /home
\-sda4   8:4    0   15.6G  O part [SWAP]
sdb      8:16   0    1.8T  O disk
  • You'll need to umount /home, and you won't need to mkdir /home. You'll also need to log in as root or boot in single-user mode to avoid problems with unmounting /home.
  • One you have unmounted /home, you can proceed to step 2 which is to tag sda3 as 8e LVM. I'm not quite positive you need to do that, but you probably do need to.
  • In step 3, no need to create a partition. pvcreate will create what is needed (and will probably complain if there is something already on there)
  • In steps 5 and 6, you write sda2 but you certainly mean sda3 which is your /home. Messing that up will mess up your system to the point where it will be easier to reinstall from scratch. Which naturally brings me to my next point . . .
  • Always make backups first if you have any data you care about! The slightest mistake (yours or mine) can crash the system!

Otherwise I think it looks like you've got things right. Keeping sda1, sda2, and sda4 as non-LVM is absolutely not a problem.

Law29
  • 3,557
  • 1
  • 16
  • 28
  • @TomSmith So if (when!) it works don't forget to come back and upvote and accept my answer :) – Law29 Jun 19 '16 at 14:19