我正在从Centos 6.5服务器上的存储arrays挂载一个卷。 我调整了音量,并尝试调整服务器上的FS的大小,但resize2fs不resize。
我没有使用LVM。 我使用/ etc / fstab中的条目直接在挂载点上挂载/ dev / mapper设备。
请注意,我下载并构build了e2fsprogs-1.43.5,以消除与centos 6.5一起提供的版本中可能出现的错误。 使用内置的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!
这个序列似乎产生了一致的结果。 (注意:当我尝试这个testing的时候,我确信我能够运行rescan-scsi-bus.sh而没有任何参数在storage.array上find新卷,现在我必须指定-i来find新的重新扫描没有find新的卷,服务器和arrays通过光纤通道连接。
创build卷和resize后,我使用了相同的命令序列。
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.