Chinaunix

标题: redhat4 中lvm逻辑卷减少问题请版主和各位高手帮忙解答~~!! [打印本页]

作者: xingfu701    时间: 2008-04-26 21:11
标题: redhat4 中lvm逻辑卷减少问题请版主和各位高手帮忙解答~~!!
在redhat4中用命令
[root@localhost ~]# lvscan 查看逻辑卷
ACTIVE '/dev/vg0/yahoo' [16.00 MB] inherit

[root@localhost ~]# lvreduce -L -4M /dev/vg0/yahoo 减少4MB
/dev/cdrom: open failed: 只读文件系统
WARNING: Reducing active and open logical volume to 12.00 MB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce yahoo? [y/n]: y
Reducing logical volume yahoo to 12.00 MB
Logical volume yahoo successfully resized
[root@localhost ~]# lvscan 再次查看逻辑卷已经减少
ACTIVE '/dev/vg0/yahoo' [12.00 MB] inherit

但是文件系统依然是以前的16MB
/dev/mapper/vg0-yahoo
15863 1170 13874 8% /d1
增减的时候可以用ext2onling来在线扩充文件系统容量
那减少的时候应该用那个命令来重新读取文件系统的容量呢 请版主和各位高手帮助解答
作者: 流氓无产者    时间: 2008-04-26 22:08
应先做fs reduce,再lvreduce
作者: xingfu701    时间: 2008-04-28 22:15
具体步骤呢、??
能详细说一下么?
作者: hackerwang    时间: 2008-04-29 16:19
#umount  /data/wwwroot
#resize2fs  /data/wwwroot/www1 -f  12m (这个命令系统自带,一定要加参数)
#lvreduce -L-4m  /dev/vg0/yahoo
#mount   /dev/vg0/yahoo   /data/wwwroot




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2