A physical server, using automatic partitioning the hard disk, so the root only 50G, / home directory there is a lot of space, the use of only 1%. And then expanded to increase hard disk root directory, there will be no problem, but now wants HOME directory space can be moved is the best solution to the root directory. Then Do It
1, first delete the / home partition, back up to back up, I do not this, direct umonut, uninstall / home, if you can not uninstall, to terminate the process using the / home file system
fuser -km / home that I did not direct can umount / Home /
2, delete / lv home where
3, the expansion / root where lv, increase 500G
4, the expansion / root file system
to this root directory has been expanded well,
we found no, no HOME directory, because the front to deleted, and then back home to create a logical volume
5, re-create the home lv
this step many times do I have problems, take a look at the mining pit
behind -n is the name of the LV, suggesting no mapper volume group in fact, we name the volume group can be seen with the first line vgdisplay is "volGroup"
then joined the name of the volume group in the command, but still prompted two volume groups are not the same
relationship or volume group and the volume group did not got it right, went dev / mapper / view, did not find the volume name home, only root and swap
a look at some more information LV with lvdisplay.
Put under the command changed. lvcreate -L 100G -n lv_home VolGroup. Tip a success, but also to dev / mapper / see also VolGroup-lv_home. And delete the original name of the same.
6, create a file system
mkfs.ext4 / dev / mapper / VolGroup- lv_home corresponds to format the partition
7, to mount Home
Mount / dev / Mapper / volgroup-lv_home
8, df -h look at before and did not delete the original are the same, this benefit is, / etc / fstab to mount in the / home directory without modification. Other LV logical volume was created, it should be possible just a name, and then modify the path to mount the home directory should be the same in the fstab inside.