Hi guys,
I recently added a new HDD to my RAID 5 setup, but the partition size is incorrect. The drives are all 1TB and there are 4 of them now. I followed this guide when making the array: http://zackreed.me/articles/38-softw...ian-with-mdadm
mdadm --detail /dev/md0:
Code:
/dev/md0: Version : 1.2
Creation Time : Fri Nov 23 23:21:38 2012
Raid Level : raid5
Array Size : 2929890816 (2794.16 GiB 3000.21 GB)
Used Dev Size : 976630272 (931.39 GiB 1000.07 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Wed Feb 12 12:10:44 2014
State : active
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Name : SERVER:0 (local to host SERVER)
UUID : d4038c21:1c919d42:6238b7dc:1c29a18a
Events : 7477
Number Major Minor RaidDevice State
4 8 17 0 active sync /dev/sdb1
1 8 49 1 active sync /dev/sdd1
3 8 33 2 active sync /dev/sdc1
5 8 65 3 active sync /dev/sde1
fdisk -l:
Code:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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 identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1953525167 976761560 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 2048 1953525167 976761560 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdd1 2048 1953525167 976761560 83 Linux
Disk /dev/md0: 3000.2 GB, 3000208195584 bytes
2 heads, 4 sectors/track, 732472704 cylinders, total 5859781632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sde: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2048 1953525167 976761560 83 Linux
As you can see fdisk says the partition for md0 is invalid.
/proc/partitions
Code:
major minor #blocks name
8 0 244198584 sda
8 1 248832 sda1
8 2 1 sda2
8 5 243947520 sda5
8 16 976762584 sdb
8 17 976761560 sdb1
8 32 976762584 sdc
8 33 976761560 sdc1
8 48 976762584 sdd
8 49 976761560 sdd1
9 0 2929890816 md0
259 0 1953258496 md0p1
8 64 976762584 sde
8 65 976761560 sde1
252 0 240164864 dm-0
252 1 3776512 dm-1
So the array size for /dev/md0 is 2929890816, i.e. 3TB which is correct, but the partition /dev/md0p1 is only 1953258496.
When I run resize2fs /dev/md0p1:
Code:
resize2fs 1.42 (29-Nov-2011)
The filesystem is already 488314624 blocks long. Nothing to do!
df -h shows the wrong size:
Code:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/SERVER-root 226G 11G 204G 5% /
udev 1.8G 4.0K 1.8G 1% /dev
tmpfs 712M 752K 711M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.8G 0 1.8G 0% /run/shm
/dev/sda1 228M 45M 171M 21% /boot
/dev/md0p1 1.8T 1.7T 18G 100% /media/RAID
I have tried everything I can think of, but I can't seem to get anywhere unfortunately. Suggestions? (and yes I do have a backup)
Bookmarks