Linux扩展文件系统
将新增的磁盘建成pv
[root@oracle11g dev]# pvcreate /dev/sdb
扩展vg,将新的pv加进vg中
[root@oracle11g dev]# vgextend VolGroup01 /dev/sdb
Volume group "VolGroup01" successfully extended
将要扩展的文件系统先卸载下来
[root@oracle11g dev]# umount /oracle
扩展lv
[root@oracle11g dev]# lvextend -L 6.5G /dev/VolGroup01/LogVol01
Extending logical volume LogVol01 to 6.50 GB
Logical volume LogVol01 successfully resized
需要先校验一下
[root@oracle11g sysconfig]# resize2fs /dev/mapper/VolGroup01-LogVol01 6G
resize2fs 1.35 (28-Feb-2004)
Please run 'e2fsck -f /dev/mapper/VolGroup01-LogVol01' first.
[root@oracle11g sysconfig]# e2fsck -f /dev/mapper/VolGroup01-LogVol01
e2fsck 1.35 (28-Feb-2004)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/VolGroup01-LogVol01: 42302/631488 files (0.9% non-contiguous), 888327/1261568 blocks
再扩展文件系统
[root@oracle11g sysconfig]# resize2fs /dev/mapper/VolGroup01-LogVol01 6G
resize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/mapper/VolGroup01-LogVol01 to 1572864 (4k) blocks.
The filesystem on /dev/mapper/VolGroup01-LogVol01 is now 1572864 blocks long.
将文件系统mount上。
[root@oracle11g sysconfig]# mount –a
查看。
[root@oracle11g sysconfig]# df -h /oracle
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup01-LogVol01
6.0G 3.4G 2.4G 59% /oracle
阅读(1210) | 评论(0) | 转发(0) |