用的 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,把数据同步到这个新的存储池,删掉旧的。
1
yingfengi 2019-10-11 22:37:08 +08:00 via Android
不太理解。。。既然是虚拟硬盘,为啥 raid1。。。。
|
2
Kerwin1202 OP @yingfengi 当时新建的时候。不太明白就瞎上了。
|
3
xhcnb 2019-10-12 11:15:27 +08:00
/dev/sdd3 9437184 314367999 304930816 145.4G fd Linux raid autodetect
/dev/sde3 9437184 314367999 304930816 145.4G fd Linux raid autodetect 大哥你只扩展了磁盘大小, 组成 ayyay 的两个分区大小没有改啊 修改 /dev/sdd 和 /dev/sde 的分区表, 把分区 3 改成最大, 再扩展 raid |
4
Kerwin1202 OP @xhcnb。。昨晚后来手一抖升了 raid5 了, 不能试了... 现在打算整个新的 raid0 另外弄备份
|
5
Kerwin1202 OP @xhcnb 还是说声多谢。
|