Hi,
I'm about to hang myself... :-(
My goal is the following:
Software RAID 5 on 4 2TB caviar green disks. Then 12 partitions or about 500GB, and finally LVM to use the partitions as pv, and create some vg for my needs.
My disks are /dev/sda to /dev/sdd
I boot on /dev/sde which is an sd card
My doing (and at the end, my issue):
Code:
(parted) select /dev/sda
(parted) mklabel
Warning: The existing .... blablabla [msdos] ? gpt
(parted) select /dev/sdb
(parted) mklabel
Warning: The existing .... blablabla [msdos] ? gpt
(parted) select /dev/sdc
(parted) mklabel
Warning: The existing .... blablabla [msdos] ? gpt
(parted) select /dev/sdd
(parted) mklabel
Warning: The existing .... blablabla [msdos] ? gpt
quit
Then:
Code:
mdadm --create /dev/md0 --verbose --chunk=256 --level=5 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd
resulted in
Code:
mdadm: layout defaults to left-symmetric
mdadm: /dev/sda appears to be part of a raid array:
level=raid5 devices=4 ctime=Sun May 2 04:59:56 2010
mdadm: /dev/sdb appears to be part of a raid array:
level=raid5 devices=4 ctime=Sun May 2 04:59:56 2010
mdadm: /dev/sdc appears to be part of a raid array:
level=raid5 devices=4 ctime=Sun May 2 04:59:56 2010
mdadm: /dev/sdd appears to be part of a raid array:
level=raid5 devices=4 ctime=Sun May 2 04:59:56 2010
mdadm: size set to 1953514496K
Continue creating array? y
mdadm: array /dev/md0 started.
Here, I'm not sure why it set the size to 2TB. I thought it was the parity size... is it ?
anyhow, mdadm --detail /dev/md0 returns:
Code:
/dev/md0:
Version : 00.90
Creation Time : Sun May 2 13:32:02 2010
Raid Level : raid5
Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun May 2 13:33:27 2010
State : clean, degraded, recovering
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 256K
Rebuild Status : 0% complete
UUID : ec3fbf51:f7d0b544:16911994:d274d6b7 (local to host caprica)
Events : 0.6
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
2 8 32 2 active sync /dev/sdc
4 8 48 3 spare rebuilding /dev/sdd
Seems correct to me so fare.
Therefore, I try now to partition /dev/md0:
1st thing's 1st, when I go into parted /dev/md0 I get the following question:
Code:
GNU Parted 1.8.8
Using /dev/md0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: The backup GPT table is not at the end of the disk, as it should be. This might
mean that another operating system believes the disk is smaller. Fix, by moving the
backup to the end (and removing the old backup)?
Fix/Cancel?
I type Fix and then I have the following:
Code:
Warning: Not all of the space available to /dev/md0 appears to be used, you can fix the
GPT to use all of the space (an extra 7814057808 blocks) or continue with the current
setting?
Fix/Ignore?
Therefore... Fix again...
Now a print gives me:
Code:
Model: Unknown (unknown)
Disk /dev/md0: 6001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
Doesn't looks bad... Then comes the problems:
Code:
mkpart part1 0 500GB
result:
Code:
Error: Error informing the kernel about modifications to partition /dev/md0p1 -- Invalid
argument. This means Linux won't know about any changes you made to /dev/md0p1 until you
reboot -- so you shouldn't mount it or use it in any way before rebooting.
Ignore/Cancel?
I can go on with Ignore or Cancel, whatever. I can create all the partitions I want. It will gives this message for each partition everytime I make a parted command on the volume. Then, after reboot, there is no device node for the created partitions.
For the example, I just made one. After reboot, cat /proc/partitions returns:
Code:
cat /proc/partitions
major minor #blocks name
8 0 1953514584 sda
8 16 1953514584 sdb
8 32 1953514584 sdc
8 48 1953514584 sdd
9 0 5860543488 md0
8 64 15986688 sde
8 65 15269751 sde1
8 66 1 sde2
8 69 714861 sde5
What the hell :-( What did I miss ...