测试成功
使用lfs livecd(redhat的rescue模式也是会提示lv在mount状态)
用livecd引导
使用"vgscan"搜索到硬盘的vg
然后用"vgchange -a y"激活vg
我是要缩小分区所以执行下面的命令:
e2fsck -f /dev/VolGroup00/LogVol00 (redhat默认的vg名字好难打 )
resize2fs /dev/VolGroup00/LogVol00 3000M (这个数值不能小于lv中的数据所占空间)
lvreduce -L3000M /dev/VolGroup00/LogVol00
如果要增大lv:
lvextend -L5000M /dev/VolGroup00/LogVol00 (注意先查看vg的剩余空间)
e2fsck -f /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00 5000M
如果是rhel4,增大lv的时候可以使用ext2online,可以在线增大,不需要关机的