在我们应用电脑的时候,我们是否了解电脑是怎样运行的?其实在电脑中操作系统必不可少,现在很多电脑用户都在应用Linux操作系统,Linux的发展也非常迅速。这里介绍Linux扩展文件系统的知识,希望你记住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
希望本文讲解的Linux扩展文件系统对你学习知识有帮助。
【编辑推荐】