I'm trying to create a RAID mapped to existing partitions per instructions in
http://fds-team.de/cms/articles/2013...-player-u.html. I'm using Ubuntu 16.4 and mdadm 3.3.
My fdisk shows:
Code:
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 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: 0x325b78d7
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 24578047 24576000 11.7G 27 Hidden NTFS WinRE
/dev/sda2 * 24578048 25163775 585728 286M 7 HPFS/NTFS/exFAT
/dev/sda3 25163776 256779447 231615672 110.5G 7 HPFS/NTFS/exFAT
/dev/sda4 256780286 488396799 231616514 110.5G 5 Extended
/dev/sda5 480221184 488396799 8175616 3.9G 82 Linux swap / Solaris
/dev/sda6 256780288 480221183 223440896 106.6G 83 Linux
Per the instructions, I create the RAID as:
Code:
mdadm --build /dev/md0 --level=linear --raid-devices=3 /dev/loop0 /dev/sda2 /dev/sda3
But, when I fdisk /dev/md0, it does not give me enough sectors:
Code:
Disk /dev/md0: 110.7 GiB, 118888136704 bytes, 232203392 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: 0xccc7addb
Device Boot Start End Sectors Size Id Type
/dev/md0p1 2048 587775 585728 286M 7 HPFS/NTFS/exFAT
/dev/md0p2 587776 232203391 231615616 110.5G 7 HPFS/NTFS/exFAT
The 1st partition is exactly the right size as compared with the original fdisk for /dev/sda2, and I can mount /dev/md0p1 and see the files, NP. Even though I've used all remaining sectors for the /dev/md0p2 partition, you can see that it only allocates 231615616 sectors, instead of the needed 231615672 sectors for /dev/sda3. It is 56 sectors too short. Trying to mount this partition gives me:
Code:
$ mount /dev/md0p2 /mnt
Failed to read last sector (231615663): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
or it was not setup correctly (e.g. by not using mdadm --build ...),
or a wrong device is tried to be mounted,
or the partition table is corrupt (partition is smaller than NTFS),
or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/md0p2': Invalid argument
The device '/dev/md0p2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
It there any way to force mdadm to allocate more sectors in the build?