Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have a 6xHDD RAID6, 2TB. (~2years old) Today I bought 2 new drives, wanted to expand my array.
- fermulator@fermmy-server:~$ sudo mdadm --add /dev/md2000 /dev/sdq1
- mdadm: /dev/sdq1 not large enough to join array
- OH ... lovely ... the new drives are a tiny bit so much smaller.
- Existing drives are:
- fermulator@fermmy-server:~$ sudo fdisk -l /dev/sdk
- Disk /dev/sdk: 2000.4 GB, 2000398934016 bytes
- 141 heads, 2 sectors/track, 13854713 cylinders
- Units = cylinders of 282 * 512 = 144384 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0xb277c3e5
- Device Boot Start End Blocks Id System
- /dev/sdk1 8 13854714 1953513560 fd Linux raid autodetect
- New drives are:
- fermulator@fermmy-server:~$ sudo fdisk -l /dev/sdq
- Disk /dev/sdq: 2000.4 GB, 2000398934016 bytes
- 255 heads, 63 sectors/track, 243201 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disk identifier: 0x1d99a245
- Device Boot Start End Blocks Id System
- /dev/sdq1 1 243201 1953512001 fd Linux raid autodetect
- fermulator@fermmy-server:~$ sudo mdadm -D /dev/md2000
- /dev/md2000:
- Version : 01.01
- Creation Time : Fri Apr 22 01:12:07 2011
- Raid Level : raid6
- Array Size : 7814053632 (7452.06 GiB 8001.59 GB)
- Used Dev Size : 3907026816 (3726.03 GiB 4000.80 GB)
- Raid Devices : 6
- Total Devices : 6
- Preferred Minor : 2000
- Persistence : Superblock is persistent
- Update Time : Wed Sep 25 00:40:21 2013
- State : clean
- Active Devices : 6
- Working Devices : 6
- Failed Devices : 0
- Spare Devices : 0
- Chunk Size : 64K
- Name : fermmy-server:2000 (local to host fermmy-server)
- UUID : 15d2158f:5cf74d95:fd7f5607:0e447573
- Events : 12794
- Number Major Minor RaidDevice State
- 0 8 161 0 active sync /dev/sdk1
- 1 8 177 1 active sync /dev/sdl1
- 2 8 193 2 active sync /dev/sdm1
- 3 8 209 3 active sync /dev/sdn1
- 5 8 145 4 active sync /dev/sdj1
- 4 8 129 5 active sync /dev/sdi1
- BEFORE
- AFTER
- Filesystem Size Used Avail Use% Mounted on
- /dev/md2000 7.2T 6.1T 738G 90% /media/arrays/md2000
- Filesystem 1K-blocks Used Available Use% Mounted on
- /dev/md2000 7691438116 6527401064 773334372 90% /media/arrays/md2000
- Filesystem Size Used Avail Use% Mounted on
- /dev/md2000 7.2T 6.1T 737G 90% /media/arrays/md2000
- Filesystem 1K-blocks Used Available Use% Mounted on
- /dev/md2000 7689826444 6527401064 771804620 90% /media/arrays/md2000
- (shrunk ext4 filesystem by 1611672 1K-blocks = ~1,650,352,128bytes = 1.6Gb! -- should be plenty right?)
- Now what?....
- Now I have to shrink the array ...
- http://webapp5.rrz.uni-hamburg.de/SuSe-Dokumentation/manual/sles-manuals_en/manual/raidresize.html#resizedecrraid
- but it has no effect
- fermulator@fermmy-server:~$ sudo mdadm -D /dev/md2000 | grep -e "Array Size" -e "Device Size"
- Array Size : 7814053632 (7452.06 GiB 8001.59 GB)
- So ... if that value is in kbytes, I need to remove ~1611672 from it:
- 7814053632-1611672=7812441960
- --> 7450.52GiB
- no luck though...
- fermulator@fermmy-server:~$ sudo mdadm --grow /dev/md2000 -z 7812441960
- fermulator@fermmy-server:~$ sudo mdadm -D /dev/md2000 | grep -e "Array Size" -e "Device Size"
- Array Size : 7814053632 (7452.06 GiB 8001.59 GB)
- md2000 : active raid6 sdk1[0] sdm1[2] sdn1[3] sdj1[5] sdi1[4] sdl1[1]
- 7814053632 blocks super 1.1 level 6, 64k chunk, algorithm 2 [6/6] [UUUUUU]
- ----
- fermulator@fermmy-server:~$ cat /etc/issue
- Ubuntu 10.04.4 LTS \n \l
- fermulator@fermmy-server:~$ uname -a
- Linux fermmy-server 2.6.32-49-generic-pae #111-Ubuntu SMP Thu Jun 20 21:44:04 UTC 2013 i686 GNU/Linux
- fermulator@fermmy-server:~$ mdadm --version
- mdadm - v2.6.7.1 - 15th October 2008
Advertisement
Add Comment
Please, Sign In to add comment