用的 vm 弄得虚拟机 装的黑裙,当初装的时候,新建了两个虚拟硬盘 150G, 组了个 raid1, 但是现在发现磁盘有点不够,给两个硬盘都扩容到 500G , Nas 里看到的存储池两个硬盘确实是 500G 但是可用还是 150G,
用网上说的物理硬盘的形式,插拔形式同步替换了好像也不行。
# mdadm -D /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Thu Dec 20 10:40:21 2018
Raid Level : raid1
Array Size : 152464384 (145.40 GiB 156.12 GB)
Used Dev Size : 152464384 (145.40 GiB 156.12 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Fri Oct 11 22:24:17 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : Kerwin-NAS:2 (local to host Kerwin-NAS)
UUID : b3222639:4a6f6d7f:9bcf4491:c47d736f
Events : 4909
Number Major Minor RaidDevice State
2 8 51 0 active sync /dev/sdd3
3 8 67 1 active sync /dev/sde3
fdisk -l
Disk /dev/synoboot: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B3CAAA25-3CA1-48FA-A5B6-105ADDE4793F
Device Start End Sectors Size Type
/dev/synoboot1 2048 32767 30720 15M EFI System
/dev/synoboot2 32768 94207 61440 30M Linux filesystem
/dev/synoboot3 94208 102366 8159 4M BIOS boot
Disk /dev/sdb: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb5be3cf2
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sdb2 4982528 9176831 4194304 2G fd Linux raid autodetect
Disk /dev/sda: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9978bd16
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sda2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sda3 9437184 314367999 304930816 145.4G fd Linux raid autodetect
Disk /dev/sdc: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd6ac5a88
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sdc2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sdc3 9437184 314367999 304930816 145.4G fd Linux raid autodetect
Disk /dev/sdd: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe7a70274
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sdd2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sdd3 9437184 314367999 304930816 145.4G fd Linux raid autodetect
Disk /dev/sde: 500 GiB, 536870912000 bytes, 1048576000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x96888e42
Device Boot Start End Sectors Size Id Type
/dev/sde1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sde2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sde3 9437184 314367999 304930816 145.4G fd Linux raid autodetect
Disk /dev/md0: 2.4 GiB, 2549940224 bytes, 4980352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md1: 2 GiB, 2147418112 bytes, 4194176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/zram0: 1 GiB, 1086324736 bytes, 265216 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/zram1: 1 GiB, 1086324736 bytes, 265216 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/md2: 145.4 GiB, 156123529216 bytes, 304928768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
网上说的比较多的是 grow 但是依旧是 150 G 而不是 500
# mdadm --grow --size=max /dev/md2
mdadm: component size of /dev/md2 unchanged at 152464384K
然后
# resize2fs /dev/md2
resize2fs 1.42.6 (21-Sep-2012)
resize2fs: Device or resource busy while trying to open /dev/md2
Couldn't find valid filesystem superblock.
似乎都不行. 求大佬解答下。
还是只能采用新的两个硬盘组个新的 raid1,把数据同步到这个新的存储池,删掉旧的。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.