卷组(Volume Group)简称VG,它是一个或者多个物理卷的组合。卷组将多个物理卷组合在一起,形成一个可管理的单元,它类似于非LVM系统中的物理硬盘。
1、查看卷组
[root@kvm110 ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root centos -wi-ao---- <8.00g swap centos -wi-ao---- 1.00g
2、vgrename 改名
[root@kvm110 ~]# vgrename centos vg110 Volume group "centos" successfully renamed to "vg110"
3、修改后查看
[root@kvm110 ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root vg110 -wi-ao---- <8.00g swap vg110 -wi-ao---- 1.00g
4、修改分区表文件
vi /etc/fstab # 把原来的 卷组名改成新的 # /etc/fstab # Created by anaconda on Wed Sep 11 15:08:38 2019 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # /dev/mapper/vg110-root / xfs defaults 0 0 UUID=10cfe3d5-58a3-4428-b21c-dfbebdc167f5 /boot xfs defaults 0 0 /dev/mapper/vg110-swap swap swap defaults 0 0
5、修改引导文件
vi /etc/grub2.cfg ecf-95c1fbd807b8' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod xfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' 10cfe3d5-58a3-4428-b21c-dfbebdc167f5 else search --no-floppy --fs-uuid --set=root 10cfe3d5-58a3-4428-b21c-dfbebdc167f5 fi linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/vg110-root ro crashkernel=auto rd.lvm.lv=vg110/root rd.lvm.lv=vg110/swap console=ttyS0 LANG=zh_CN.UTF-8 initrd16 /initramfs-3.10.0-957.el7.x86_64.img } menuentry 'CentOS Linux (0-rescue-9eca413fff8c46e1a9c0b5a0e83bd011) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-9eca413fff8c46e1a9c0b5a0e83bd011-advanced-079b49a0-3722-4fa1-9ecf-95c1fbd807b8' { load_video insmod gzio insmod part_msdos insmod xfs set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' 10cfe3d5-58a3-4428-b21c-dfbebdc167f5 else search --no-floppy --fs-uuid --set=root 10cfe3d5-58a3-4428-b21c-dfbebdc167f5 fi linux16 /vmlinuz-0-rescue-9eca413fff8c46e1a9c0b5a0e83bd011 root=/dev/mapper/vg110-root ro crashkernel=auto rd.lvm.lv=vg110/root rd.lvm.lv=vg110/swap console=ttyS0 initrd16 /initramfs-0-rescue-9eca413fff8c46e1a9c0b5a0e83bd011.img }
重新启动,如果没有修改 /etc/fstab、/etc/grub2.cfg 这两个文件,系统将无法启动
[root@kvm110 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/vg110-root 8.0G 1003M 7.1G 13% / devtmpfs 484M 0 484M 0% /dev tmpfs 496M 0 496M 0% /dev/shm tmpfs 496M 6.7M 489M 2% /run tmpfs 496M 0 496M 0% /sys/fs/cgroup /dev/vda1 1014M 132M 883M 13% /boot tmpfs 100M 0 100M 0% /run/user/0
————————————————
版权声明:本文为CSDN博主「tom马」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mshxuyi/article/details/100752734