[root@test~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 2.2G 45G 5% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 485M 37M 423M 9% /boot
/dev/mapper/VolGroup-lv_home 210G 188M 199G 1% /home
umount /dev/mapper/VolGroup-lv_home
##查看逻辑卷名称,状态
[root@test~]# lvdisplay
--- Logical volume ---
LV Path /dev/VolGroup/lv_root
LV Name lv_root
VG Name VolGroup
LV UUID P8HcNc-74sj-kQz7-OdR7-SxOP-qjdZ-kS3IAM
LV Write Access read/write
LV Creation host, time data2, 2015-06-18 19:38:09 +0800
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/VolGroup/lv_home
LV Name lv_home
VG Name VolGroup
LV UUID 65oesf-ZQdW-m2f9-CjBY-TMGx-3XI7-hpH9xX
LV Write Access read/write
LV Creation host, time data2, 2015-06-18 19:38:12 +0800
LV Status available
# open 1
LV Size 213.15 GiB
Current LE 54566
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Path /dev/VolGroup/lv_swap
LV Name lv_swap
VG Name VolGroup
LV UUID yra6f8-EjEL-YVSg-aP97-Iyr3-na8n-BISVcc
LV Write Access read/write
LV Creation host, time data2, 2015-06-18 19:38:42 +0800
LV Status available
# open 1
LV Size 15.73 GiB
Current LE 4026
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
##更改逻辑卷名称
[root@test~]# lvrename /dev/VolGroup/lv_home /dev/VolGroup/lv_u01
Renamed "lv_home" to "lv_u01" in volume group "VolGroup"
更改/etc/fstab的挂载
重新挂载mount /dev/mapper/VolGroup-lv_u01 /u01
如果是更改root、swap的目录,还需要修改/etc/grub.conf
[root@test~]# # more /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-
sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-431.el6.x86_64.img