Change the logical volume name

Source: Internet
Author: User

[Email protected] ~]# df-h
File system capacity has been used with available percent mount points
/dev/mapper/vg_data2-lv_root
50G 2.2G 45G 5%/
Tmpfs 16G 0 16G 0%/dev/shm
/DEV/SDA1 485M 37M 423M 9%/boot
/dev/mapper/vg_data2-lv_home
210G 188M 199G 1%/Home

Umount/dev/mapper/vg_data2-lv_home

View logical volume name, status

[Email protected] ~]# Lvdisplay
---Logical volume---
LV Path/dev/vg_data2/lv_root
LV Name Lv_root
VG Name Vg_data2
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/vg_data2/lv_home
LV Name Lv_home
VG Name Vg_data2
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/vg_data2/lv_swap
LV Name Lv_swap
VG Name Vg_data2
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

Change the logical volume name

[Email protected] ~]# lvrename/dev/vg_data2/lv_home/dev/vg_data2/lv_u01
Renamed "Lv_home" to "lv_u01" in volume Group "VG_DATA2"

Change the mount of a/etc/fstab

Re-mount Mount/dev/mapper/vg_data2-lv_u01/u01

If you change the root, swap directory, you also need to modify the/etc/grub.conf

Change the logical volume name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.