标签:span remove real swap EDA bsp mapper rpm lvm2
1.查看
检查系统中是否安装了LVM管理工具 [root@test_vonedao_83 /]# rpm -qa|grep lvm lvm2-libs-2.02.185-2.el7.x86_64 lvm2-2.02.185-2.el7.x86_64
查看物理卷大小
[root@test_vonedao_83 /]# pvscan PV /dev/sda2 VG centos lvm2 [77.98 GiB / 172.00 MiB free] Total: 1 [77.98 GiB] / in use: 1 [77.98 GiB] / in no VG: 0 [0 ]
查看逻辑卷大小
[root@test_vonedao_83 /]# lvscan ACTIVE ‘/dev/centos/root‘ [50.00 GiB] inherit ACTIVE ‘/dev/centos/home‘ [20.00 GiB] inherit ACTIVE ‘/dev/centos/swap‘ [7.81 GiB] inherit
查看/dev/sda 磁盘大小
[root@test_vonedao_83 /]# fdisk -l /dev/sda 磁盘 /dev/sda:240.1 GB, 240057409536 字节,468862128 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:dos 磁盘标识符:0x000b6965 设备 Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 165642239 81771520 8e Linux LVM
3.删除多余的逻辑卷:lvremove
[root@test_vonedao_83 ~]# lvremove /dev/mapper/centos-opt
Do you really want to remove active logical volume centos/opt? [y/n]: y
Logical volume "opt" successfully removed
[root@test_vonedao_83 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 78G 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 7.8G 0 lvm [SWAP]
└─centos-home 253:2 0 20G 0 lvm /home
sdb 8:16 0 931.5G 0 disk
└─sdb1 8:17 0 100G 0 part /opt
标签:span remove real swap EDA bsp mapper rpm lvm2
原文地址:https://www.cnblogs.com/zoujiaojiao/p/11910525.html