3. 删除所有的LVM
取消挂载的分区
[root@linux tmp]# umount /tmp/lvm/
删除LV
[root@linux tmp]# lvremove /dev/vg1/lv1
Do you really want to remove active logical volume "lv1"? [y/n]: y
Logical volume "lv1" successfully removed
删除VG
[root@linux tmp]# vgremove vg1
Volume group "vg1" successfully removed
删除PV
[root@linux tmp]# pvremove /dev/hda5 /dev/hda7
Labels on physical volume "/dev/hda5" successfully wiped
Labels on physical volume "/dev/hda7" successfully wiped
删除物理分区的方法是使用“fdisk”命令
[root@linux tmp]# fdisk /dev/hda
纤细信息显示如下
Command (m for help): d
Partition number (1-7): 7
Command (m for help): d
Partition number (1-6): 6
Command (m for help): d
Partition number (1-5): 5
Command (m for help): p
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 16 128488+ 83 Linux
/dev/hda2 17 7665 61440592+ 8e Linux LVM
/dev/hda3 7666 7796 1052257+ 82 Linux swap / Solaris
/dev/hda4 7797 9729 15526822+ 5 Extended
Command (m for help):
实验总结:
LVM的建立和删除,增加容量和容量减小是一个互逆的过程。
RHCE_LAB(6)RHEL5的LVM应用实例(LVM调整大小和删除)——结束
RHEL5的LVM应用实例(LVM调整大小和删除)(2)
内容版权声明:除非注明,否则皆为本站原创文章。