调整/u01文件系统大小,增加10G
正确步骤
lvresize -L +10G /dev/VolGroup00/LogVol02
resize2fs /dev/VolGroup00/LogVol02
实际操作步骤
[root@ora11g ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 9.7G 2.4G 6.9G 26% /
/dev/mapper/VolGroup00-LogVol02 9.7G 9.0G 265M 98% /u01
/dev/hda1 99M 15M 80M 16% /boot
tmpfs 2.0G 528M 1.5G 27% /dev/shm
[root@ora11g ~]#
lvresize -L +10G /dev/mapper/VolGroup00-LogVol02
Volume group "mapper" not found
Volume group mapper doesn't exist
报错,提示Volume group "mapper" not found
查看fstab
[root@ora11g ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
/dev/VolGroup00/LogVol02 /u01 ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
[root@ora11g ~]# lvresize -L +10G /dev/VolGroup00/LogVol02
Extending logical volume LogVol02 to 20.00 GB
Logical volume LogVol02 successfully resized
[root@ora11g ~]# resize2fs /dev/VolGroup00/LogVol02
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol02 is mounted on /u01; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol02 to 5242880 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol02 is now 5242880 blocks long.
[root@ora11g ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 9.7G 2.4G 6.9G 26% /
/dev/mapper/VolGroup00-LogVol02 20G 9.0G 9.5G 49% /u01
/dev/hda1 99M 15M 80M 16% /boot
tmpfs 2.0G 528M 1.5G 27% /dev/shm
[root@ora11g ~]#
调整成功
参考文档
http://blog.tianya.cn/blogger/post_show.asp?BlogID=2128868&PostID=17784196
http://hi.baidu.com/toby57/item/0c37dc1b9213f7633e87ce22