LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   lvdisplay not showing lv_home (https://www.linuxquestions.org/questions/linux-server-73/lvdisplay-not-showing-lv_home-4175602800/)

jimblegend 03-29-2017 03:56 PM

lvdisplay not showing lv_home
 
My issue is when I set up a new Centos 6 server and logged in as root, I did an lvs and it displays lv_root and lv_swap but no lv_home. I did an lvdisplay and same result.

I need to add the /home folder from / to the logical volume because that is where all my users get created when I create them in Webmin. I have several Centos servers setup for different purposes and have never had this issue on a new setup.

Can someone lead me in a direction to add the /home folder to the LV? Below is the output of the lvs:

LV VG Attr LSize

lv_root vg_legendftp -wi-ao--- 13.66g

lv_swap vg_legendftp -wi-ao--- 5.84g

r3sistance 03-29-2017 06:16 PM

you'll probably want to follow a full guide for this... but do you have space in your VG? the vgs command should show that.

The gist of the commands to create it is here: https://www.centos.org/docs/5/html/C...LV_create.html

admittedly that is for CentOS 5 but the commands should be the same.

Once you have your LVM, add it to /etc/fstab (careful on editing that file, breaking it will cause headaches, advise doing a 'cp /etc/fstab /etc/fstab.bak' first).

Manually mount the partition:

mkdir /mnt/newhome
mount /dev/mapper/lvm-dev /mnt/newhome
mv /home/* /mnt/newhome
umount /mnt/newhome
mount /home
rmdir /mnt/newhome

Should do it... I'd advise testing it all on test boxes first cas a few things here (esp fstab), can cause major issues down the line if you do em wrong.

syg00 03-29-2017 06:41 PM

I cant believe this can't be found on the web. But, as for all things LVM, the (free) online RHEL doco is excellent.


All times are GMT -5. The time now is 02:47 PM.