SAN存储卷扩容后对应客户端磁盘和挂载磁盘的分区如何正确显示新增容量

总结:
SAN存储的卷可以不是LVM模式情况下,对卷新增容量后,客户端需要重启才可以看到卷对应的磁盘新增后的容量,再对该磁盘执行resize2fs后,该磁盘挂载的分区才可以看到新增后的容量


--确定需要新增容量的磁盘在客户端显示200G,已在存储端新增100G,但是客户端仍然显示200G
[root@mdg /]# fdisk -l |grep /dev/mapper/3600a098038303867635d4a48624e5467

Disk /dev/mapper/3600a098038303867635d4a48624e5467: 214.7 GB, 214748364800 bytes
[root@mdg ~]# df -h |grep /u02test
/dev/mapper/3600a098038303867635d4a48624e5467  197G  216M  187G   1% /u02test


--执行 resize2fs命令,磁盘新容量300G 客户端仍然显示200G
[root@mdg /]# resize2fs -help
resize2fs 1.41.12 (17-May-2010)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]
[root@mdg /]# resize2fs /dev/mapper/3600a098038303867635d4a48624e5467 300G
resize2fs 1.41.12 (17-May-2010)
The containing partition (or device) is only 52428800 (4k) blocks.
You requested a new size of 78643200 blocks.
[root@mdg /]# fdisk -l |grep /dev/mapper/3600a098038303867635d4a48624e5467
Disk /dev/mapper/3600a098038303867635d4a48624e5467: 214.7 GB, 214748364800 bytes
[root@mdg ~]# df -h |grep /u02test
/dev/mapper/3600a098038303867635d4a48624e5467  197G  216M  187G   1% /u02test


--重启后 磁盘在 客户端正常显示300G
[root@mdg /]# reboot
Broadcast message from root@mdg
        (/dev/pts/0) at 14:39 ...
The system is going down for reboot NOW!
[root@mdg /]#
login as: root
root@192.168.8.8's password:
Last login: Wed May 16 14:24:51 2018 from 192.168.1.3
[root@mdg ~]# fdisk -l |grep /dev/mapper/3600a098038303867635d4a48624e5467
Disk /dev/mapper/3600a098038303867635d4a48624e5467: 322.1 GB, 322122547200 bytes

--mount该磁盘,该磁盘已经正常显示300G,但是mount分区仍然显示200G
[root@mdg ~]# mount /dev/mapper/3600a098038303867635d4a48624e5467 /u02test
[root@mdg ~]# df -h |grep /u02test
/dev/mapper/3600a098038303867635d4a48624e5467  197G  216M  187G   1% /u02test

--执行resize2fs命令,磁盘新容量300G,mount分区正常显示300G
[root@mdg ~]# resize2fs /dev/mapper/3600a098038303867635d4a48624e5467 300G
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/3600a098038303867635d4a48624e5467 is mounted on /u02test; on-line resizing required
old desc_blocks = 13, new_desc_blocks = 19
Performing an on-line resize of /dev/mapper/3600a098038303867635d4a48624e5467 to 78643200 (4k) blocks.
The filesystem on /dev/mapper/3600a098038303867635d4a48624e5467 is now 78643200 blocks long.
[root@mdg ~]# df -h |grep /u02test
/dev/mapper/3600a098038303867635d4a48624e5467  296G  220M  281G   1% /u02test


--文件没有丢失文件没有损坏
[root@mdg ~]# cd /u02test
[root@mdg u02test]# ll
total 29164
-rw-r--r-- 1 root     root           12 May 16 14:10 123
-rw-r--r-- 1 oracle   dba            12 May 16 14:12 123_2
-rw-r----- 1 orahyprd oinstall  3509831 May 16 14:12 alert_HYPRD.log
-rw-r----- 1 oracle   oinstall 26327331 May 16 14:11 alert_MESDB.log
drwx------ 2 root     root        16384 May 16 13:39 lost+found
[root@mdg u02test]# cat 123
efefasdjlj
[root@mdg u02test]# cat 123_2
efefasdjlj
[root@mdg u02test]# less alert_HYD.log
[root@mdg u02test]# less alert_MDB.log


--实验过不停往该分区复制文件,可以使用到296G,说明新增容量有效

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30126024/viewspace-2154591/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30126024/viewspace-2154591/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值