我正在从CentOS6.5服务器上的存储数组中挂载卷。我调整了卷的大小,并试图调整服务器上FS的大小,但是resize2fs没有调整大小。
我不使用LVM。我直接在挂载点上挂载/dev/mapper设备,在/etc/fstab中有一个条目。
请注意,我下载并构建了e2fsprogs-1.43.5,以消除centos 6.5版本中出现bug的可能性。使用已构建的mke2fs & resize2fs。
我遗漏了什么?
谢谢。
- On storage array: Created 1TB volume
Name Size Source Created Serial
test-resize 1T - 2017-08-05 20:52:47 MDT 8A6E42D13A7D45AE00011014
- On server: rescan found multiple devices for the volume
[root@init105-12 hariharan]# rescan-scsi-bus.sh
...
4 new or changed device(s) found.
[7:0:0:2]
[8:0:0:2]
[9:0:0:2]
[10:0:0:2]
[root@init105-12 hariharan]# ll /dev/mapper
total 0
lrwxrwxrwx 1 root root 7 Aug 5 20:52 3624a93708a6e42d13a7d45ae00011010 -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 5 20:53 3624a93708a6e42d13a7d45ae00011014 -> ../dm-3 <--- new volume
crw-rw---- 1 root root 10, 58 Aug 3 17:50 control
lrwxrwxrwx 1 root root 7 Aug 3 17:50 vgroot-lvroot -> ../dm-1
lrwxrwxrwx 1 root root 7 Aug 3 17:50 vgroot-lvswap01 -> ../dm-0
[root@init105-12 hariharan]# service multipathd reload
Reloading multipathd: [ OK ]
[root@init105-12 hariharan]# mke2fs -t ext4 -O 'has_journal,ext_attr,resize_inode,dir_index,filetype,extent,flex_bg,sparse_super,huge_file,uninit_bg,dir_nlink,extra_isize,large_file' /dev/mapper/3624a93708a6e42d13a7d45ae00011014
- On storage array: Resized volume to 2TB
Name Size Source Created Serial
test-resize 2T - 2017-08-05 20:52:47 MDT 8A6E42D13A7D45AE00011014
- On server
[root@init105-12 hariharan]# resize2fs /dev/mapper/3624a93708a6e42d13a7d45ae00011014
resize2fs 1.43.5 (04-Aug-2017)
The filesystem is already 268435456 (4k) blocks long. Nothing to do!
- Try rescan & multipathd restart - did not help
[root@init105-12 hariharan]# rescan-scsi-bus.sh
...
0 new or changed device(s) found.
0 remapped or resized device(s) found.
[root@init105-12 hariharan]# service multipathd reload
Reloading multipathd: [ OK ]
[root@init105-12 hariharan]# resize2fs /dev/mapper/3624a93708a6e42d13a7d45ae00011014
resize2fs 1.43.5 (04-Aug-2017)
The filesystem is already 268435456 (4k) blocks long. Nothing to do!发布于 2017-08-06 14:27:19
这个序列似乎产生了一致的结果。(注意:当我尝试这个测试时,我很确定我能够在没有任何参数的情况下运行rescan bus.sh来在storage.array上找到新的卷。现在,我必须指定-i来查找新的卷。没有新卷,rescan就找不到它。服务器和数组通过光纤通道连接。)
在创建卷和调整大小之后,我使用了相同的命令序列。
rescan-scsi-bus.sh -r -i
sleep 5
service multipathd reload
ll /dev/mapper/
sleep 5
lsblk /dev/mapper/3624a93708a6e42d13a7d45ae0001101f
Resize works:
[root@init105-12 hariharan]# resize2fs /dev/mapper/3624a93708a6e42d13a7d45ae0001101e
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/3624a93708a6e42d13a7d45ae0001101e to 536870912 (4k) blocks.
The filesystem on /dev/mapper/3624a93708a6e42d13a7d45ae0001101e is now 536870912 blocks long.https://serverfault.com/questions/867112
复制相似问题