How do I mount a software RAID1 (mirror) created by windows in Linux using mdadm?












5















I'm switching my Windows server to Ubuntu and am trying to get my software RAID1 (mirror) that I created in Windows to show up in Ubuntu. I have read that this is possible here using mdadm, but I'm having trouble.



Here is what I'm trying:



Script started on Thu 12 Jan 2012 12:22:33 GMT
graeme@MediaCentre:~/Desktop$ cat /proc/partitions

major minor #blocks name

8 0 120060864 sda
8 1 117974016 sda1
8 2 1 sda2
8 5 2083840 sda5
8 16 1465138584 sdb
8 17 1465136128 sdb1
8 32 1465138584 sdc
8 33 1465136128 sdc1
graeme@MediaCentre:~/Desktop$ sudo mdadm --build /dev/md0 --chunk=128 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
[sudo] password for graeme:
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~/Desktop$ sudo mkdir /media/WinMirror/
mkdir: cannot create directory `/media/WinMirror/': File exists
graeme@MediaCentre:~/Desktop$ sudo mount -t ntfs /dev/md0 /media/WinMirror
Failed to read last sector (5860544511): 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/md0': Invalid argument
The device '/dev/md0' 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?
graeme@MediaCentre:~/Desktop$ exit
exit

Script done on Thu 12 Jan 2012 12:23:23 GMT


I get the same thing when I try 64 chunks, and if I list the disks in the other order.



Does anyone know what I'm doing wrong here?



Edit: I'm adding the results of fdisk -l as requested by Paul:



graeme@MediaCentre:~$ sudo fdisk -l /dev/sdb
[sudo] password for graeme:

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdb1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdc1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~$ sudo fdisk -l /dev/md0

Disk /dev/md0: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/md0p1 63 2930275119 1465137528+ 42 SFS









share|improve this question

























  • What does sudo fdisk -l /dev/md0 give you?

    – Paul
    Jan 12 '12 at 22:39











  • I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

    – Grezzo
    Jan 13 '12 at 9:44











  • Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

    – Grezzo
    Jan 13 '12 at 9:53






  • 1





    This similar question has a positive answer stackoverflow.com/questions/8427372/…

    – Costin Gușă
    Mar 12 '13 at 21:32











  • Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

    – Cray
    Aug 30 '18 at 15:59
















5















I'm switching my Windows server to Ubuntu and am trying to get my software RAID1 (mirror) that I created in Windows to show up in Ubuntu. I have read that this is possible here using mdadm, but I'm having trouble.



Here is what I'm trying:



Script started on Thu 12 Jan 2012 12:22:33 GMT
graeme@MediaCentre:~/Desktop$ cat /proc/partitions

major minor #blocks name

8 0 120060864 sda
8 1 117974016 sda1
8 2 1 sda2
8 5 2083840 sda5
8 16 1465138584 sdb
8 17 1465136128 sdb1
8 32 1465138584 sdc
8 33 1465136128 sdc1
graeme@MediaCentre:~/Desktop$ sudo mdadm --build /dev/md0 --chunk=128 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
[sudo] password for graeme:
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~/Desktop$ sudo mkdir /media/WinMirror/
mkdir: cannot create directory `/media/WinMirror/': File exists
graeme@MediaCentre:~/Desktop$ sudo mount -t ntfs /dev/md0 /media/WinMirror
Failed to read last sector (5860544511): 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/md0': Invalid argument
The device '/dev/md0' 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?
graeme@MediaCentre:~/Desktop$ exit
exit

Script done on Thu 12 Jan 2012 12:23:23 GMT


I get the same thing when I try 64 chunks, and if I list the disks in the other order.



Does anyone know what I'm doing wrong here?



Edit: I'm adding the results of fdisk -l as requested by Paul:



graeme@MediaCentre:~$ sudo fdisk -l /dev/sdb
[sudo] password for graeme:

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdb1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdc1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~$ sudo fdisk -l /dev/md0

Disk /dev/md0: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/md0p1 63 2930275119 1465137528+ 42 SFS









share|improve this question

























  • What does sudo fdisk -l /dev/md0 give you?

    – Paul
    Jan 12 '12 at 22:39











  • I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

    – Grezzo
    Jan 13 '12 at 9:44











  • Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

    – Grezzo
    Jan 13 '12 at 9:53






  • 1





    This similar question has a positive answer stackoverflow.com/questions/8427372/…

    – Costin Gușă
    Mar 12 '13 at 21:32











  • Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

    – Cray
    Aug 30 '18 at 15:59














5












5








5


1






I'm switching my Windows server to Ubuntu and am trying to get my software RAID1 (mirror) that I created in Windows to show up in Ubuntu. I have read that this is possible here using mdadm, but I'm having trouble.



Here is what I'm trying:



Script started on Thu 12 Jan 2012 12:22:33 GMT
graeme@MediaCentre:~/Desktop$ cat /proc/partitions

major minor #blocks name

8 0 120060864 sda
8 1 117974016 sda1
8 2 1 sda2
8 5 2083840 sda5
8 16 1465138584 sdb
8 17 1465136128 sdb1
8 32 1465138584 sdc
8 33 1465136128 sdc1
graeme@MediaCentre:~/Desktop$ sudo mdadm --build /dev/md0 --chunk=128 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
[sudo] password for graeme:
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~/Desktop$ sudo mkdir /media/WinMirror/
mkdir: cannot create directory `/media/WinMirror/': File exists
graeme@MediaCentre:~/Desktop$ sudo mount -t ntfs /dev/md0 /media/WinMirror
Failed to read last sector (5860544511): 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/md0': Invalid argument
The device '/dev/md0' 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?
graeme@MediaCentre:~/Desktop$ exit
exit

Script done on Thu 12 Jan 2012 12:23:23 GMT


I get the same thing when I try 64 chunks, and if I list the disks in the other order.



Does anyone know what I'm doing wrong here?



Edit: I'm adding the results of fdisk -l as requested by Paul:



graeme@MediaCentre:~$ sudo fdisk -l /dev/sdb
[sudo] password for graeme:

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdb1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdc1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~$ sudo fdisk -l /dev/md0

Disk /dev/md0: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/md0p1 63 2930275119 1465137528+ 42 SFS









share|improve this question
















I'm switching my Windows server to Ubuntu and am trying to get my software RAID1 (mirror) that I created in Windows to show up in Ubuntu. I have read that this is possible here using mdadm, but I'm having trouble.



Here is what I'm trying:



Script started on Thu 12 Jan 2012 12:22:33 GMT
graeme@MediaCentre:~/Desktop$ cat /proc/partitions

major minor #blocks name

8 0 120060864 sda
8 1 117974016 sda1
8 2 1 sda2
8 5 2083840 sda5
8 16 1465138584 sdb
8 17 1465136128 sdb1
8 32 1465138584 sdc
8 33 1465136128 sdc1
graeme@MediaCentre:~/Desktop$ sudo mdadm --build /dev/md0 --chunk=128 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1
[sudo] password for graeme:
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~/Desktop$ sudo mkdir /media/WinMirror/
mkdir: cannot create directory `/media/WinMirror/': File exists
graeme@MediaCentre:~/Desktop$ sudo mount -t ntfs /dev/md0 /media/WinMirror
Failed to read last sector (5860544511): 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/md0': Invalid argument
The device '/dev/md0' 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?
graeme@MediaCentre:~/Desktop$ exit
exit

Script done on Thu 12 Jan 2012 12:23:23 GMT


I get the same thing when I try 64 chunks, and if I list the disks in the other order.



Does anyone know what I'm doing wrong here?



Edit: I'm adding the results of fdisk -l as requested by Paul:



graeme@MediaCentre:~$ sudo fdisk -l /dev/sdb
[sudo] password for graeme:

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdb1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/sdc1 63 2930275119 1465137528+ 42 SFS
graeme@MediaCentre:~$ sudo mdadm --build /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mdadm: array /dev/md0 built and started.
graeme@MediaCentre:~$ sudo fdisk -l /dev/md0

Disk /dev/md0: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x181bfef8

Device Boot Start End Blocks Id System
/dev/md0p1 63 2930275119 1465137528+ 42 SFS






windows linux software-raid raid-1 mdadm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 13 '12 at 9:39







Grezzo

















asked Jan 12 '12 at 13:53









GrezzoGrezzo

5022616




5022616













  • What does sudo fdisk -l /dev/md0 give you?

    – Paul
    Jan 12 '12 at 22:39











  • I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

    – Grezzo
    Jan 13 '12 at 9:44











  • Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

    – Grezzo
    Jan 13 '12 at 9:53






  • 1





    This similar question has a positive answer stackoverflow.com/questions/8427372/…

    – Costin Gușă
    Mar 12 '13 at 21:32











  • Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

    – Cray
    Aug 30 '18 at 15:59



















  • What does sudo fdisk -l /dev/md0 give you?

    – Paul
    Jan 12 '12 at 22:39











  • I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

    – Grezzo
    Jan 13 '12 at 9:44











  • Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

    – Grezzo
    Jan 13 '12 at 9:53






  • 1





    This similar question has a positive answer stackoverflow.com/questions/8427372/…

    – Costin Gușă
    Mar 12 '13 at 21:32











  • Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

    – Cray
    Aug 30 '18 at 15:59

















What does sudo fdisk -l /dev/md0 give you?

– Paul
Jan 12 '12 at 22:39





What does sudo fdisk -l /dev/md0 give you?

– Paul
Jan 12 '12 at 22:39













I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

– Grezzo
Jan 13 '12 at 9:44





I've edited the original post to add the fdisk -l output. I guess becuase it's showing as ID 42 because it's a "dynamic disk" that doesn't use the normal partition table (I have read it uses 1MB at the end of the disk for the partition table). Perhaps I just need to find a way of mounting a dynamic disk?

– Grezzo
Jan 13 '12 at 9:44













Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

– Grezzo
Jan 13 '12 at 9:53





Is LDM a possible solution to this? I have no idea how to get it working with LDM yet

– Grezzo
Jan 13 '12 at 9:53




1




1





This similar question has a positive answer stackoverflow.com/questions/8427372/…

– Costin Gușă
Mar 12 '13 at 21:32





This similar question has a positive answer stackoverflow.com/questions/8427372/…

– Costin Gușă
Mar 12 '13 at 21:32













Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

– Cray
Aug 30 '18 at 15:59





Is it a requirement that you want to do this with mdadm specifically? (At least nowadays) major linux distros have a tool called ldmtool which can deal with such drives with no problem.

– Cray
Aug 30 '18 at 15:59










5 Answers
5






active

oldest

votes


















1














I'm pretty sure it can't be done. I tried everything to no avail, and eventually realised I'd buggered it do that windows wouldn't even mount it any more. Had to use some advanced recovery tools. Massive blunder! Feel like a right idiot relying on raid with no backup an messing with the raid with no backup! Oh well. Lesson learned.






share|improve this answer































    1














    I can totally confirm that you can do it with mdadm, and a few simple commands:



    mdadm --build /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdb1
    mount /dev/md0 /mount/raid




    More Details:




    • You have to install mdadm first of course (terminal command: sudo apt-get install mdadm).

    • "md0" is just the name I gave to the raid, for use in Linux; you can call it whatever.

    • the "--level=0" part most likely refers to the kind of RAID, in my case RAID 0.

    • the "--raid-devices=2" part most likely is the number of HDDs in the RAID.

    • You have to first create the folder "/mount/raid" (or wherever you want to mount it or call it)

    • In my case I had a software RAID 0 made in windows 7/8, on two 2TB HDDs (here sdc1 and sdb1). Here, sdc1 is put first in the command because it contained the RAID info; if you receive some error saying that there's no RAID info, you can try switching between them and you should be OK.


    CAUTION: don't use mdadm --create command if you already have the software RAID made in Windows, as I THINK it might overwrite the RAID info, and you'll end up ducking your raid and the data on it.






    share|improve this answer


























    • In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

      – Grezzo
      Aug 1 '13 at 13:59



















    0














    I think I've just discovered that it's not possible to "build" a RAID1 and "build"ing is the only way to view a Windows software RAID. Can someone confirm that for me?



    This is what I managed to get out of mdadm:



    graeme@MediaCentre:~$ sudo mdadm --build --help
    Usage: mdadm --build device -chunk=X --level=Y --raid-devices=Z devices

    This usage is similar to --create. The difference is that it creates
    a legacy array without a superblock. With these arrays there is no
    difference between initially creating the array and subsequently
    assembling the array, except that hopefully there is useful data
    there in the second case.

    The level may only be 0, raid0, or linear.
    All devices must be listed and the array will be started once complete.
    Options that are valid with --build (-B) are:
    --bitmap= : file to store/find bitmap information in.
    --chunk= -c : chunk size of kibibytes
    --rounding= : rounding factor for linear array (==chunk size)
    --level= -l : 0, raid0, or linear
    --raid-devices= -n : number of active devices in array
    --bitmap-chunk= : bitmap chunksize in Kilobytes.
    --delay= -d : bitmap update delay in seconds.





    share|improve this answer































      0














      This:



      sudo mount -t ntfs /dev/md0 /media/WinMirror


      attempts to mount the raid array as a whole, whereas the fdisk shows you have it partitioned:



          Device Boot      Start         End      Blocks   Id  System
      /dev/md0p1 63 2930275119 1465137528+ 42 SFS


      To mount the partition, you should use:



      sudo mount -t ntfs /dev/md0p1 /media/WinMirror





      share|improve this answer
























      • This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

        – Grezzo
        Jan 13 '12 at 15:22











      • @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

        – Paul
        Jan 13 '12 at 22:36



















      -1














      I'm aware this is an old question. Nevertheless, I'd like to emphasize that the proposed solution of hello guy still works today.



      I know the OP specifically asks for a solution using mdadm. But nowadays there is ldmtool specifically for coping with raids created in windows (aka Dynamic Disks). As usually the arch wiki covers all the technical details.



      Maybe this additional information saves future readers some time.






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "3"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f377646%2fhow-do-i-mount-a-software-raid1-mirror-created-by-windows-in-linux-using-mdadm%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1














        I'm pretty sure it can't be done. I tried everything to no avail, and eventually realised I'd buggered it do that windows wouldn't even mount it any more. Had to use some advanced recovery tools. Massive blunder! Feel like a right idiot relying on raid with no backup an messing with the raid with no backup! Oh well. Lesson learned.






        share|improve this answer




























          1














          I'm pretty sure it can't be done. I tried everything to no avail, and eventually realised I'd buggered it do that windows wouldn't even mount it any more. Had to use some advanced recovery tools. Massive blunder! Feel like a right idiot relying on raid with no backup an messing with the raid with no backup! Oh well. Lesson learned.






          share|improve this answer


























            1












            1








            1







            I'm pretty sure it can't be done. I tried everything to no avail, and eventually realised I'd buggered it do that windows wouldn't even mount it any more. Had to use some advanced recovery tools. Massive blunder! Feel like a right idiot relying on raid with no backup an messing with the raid with no backup! Oh well. Lesson learned.






            share|improve this answer













            I'm pretty sure it can't be done. I tried everything to no avail, and eventually realised I'd buggered it do that windows wouldn't even mount it any more. Had to use some advanced recovery tools. Massive blunder! Feel like a right idiot relying on raid with no backup an messing with the raid with no backup! Oh well. Lesson learned.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 19 '12 at 22:51









            GrezzoGrezzo

            5022616




            5022616

























                1














                I can totally confirm that you can do it with mdadm, and a few simple commands:



                mdadm --build /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdb1
                mount /dev/md0 /mount/raid




                More Details:




                • You have to install mdadm first of course (terminal command: sudo apt-get install mdadm).

                • "md0" is just the name I gave to the raid, for use in Linux; you can call it whatever.

                • the "--level=0" part most likely refers to the kind of RAID, in my case RAID 0.

                • the "--raid-devices=2" part most likely is the number of HDDs in the RAID.

                • You have to first create the folder "/mount/raid" (or wherever you want to mount it or call it)

                • In my case I had a software RAID 0 made in windows 7/8, on two 2TB HDDs (here sdc1 and sdb1). Here, sdc1 is put first in the command because it contained the RAID info; if you receive some error saying that there's no RAID info, you can try switching between them and you should be OK.


                CAUTION: don't use mdadm --create command if you already have the software RAID made in Windows, as I THINK it might overwrite the RAID info, and you'll end up ducking your raid and the data on it.






                share|improve this answer


























                • In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                  – Grezzo
                  Aug 1 '13 at 13:59
















                1














                I can totally confirm that you can do it with mdadm, and a few simple commands:



                mdadm --build /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdb1
                mount /dev/md0 /mount/raid




                More Details:




                • You have to install mdadm first of course (terminal command: sudo apt-get install mdadm).

                • "md0" is just the name I gave to the raid, for use in Linux; you can call it whatever.

                • the "--level=0" part most likely refers to the kind of RAID, in my case RAID 0.

                • the "--raid-devices=2" part most likely is the number of HDDs in the RAID.

                • You have to first create the folder "/mount/raid" (or wherever you want to mount it or call it)

                • In my case I had a software RAID 0 made in windows 7/8, on two 2TB HDDs (here sdc1 and sdb1). Here, sdc1 is put first in the command because it contained the RAID info; if you receive some error saying that there's no RAID info, you can try switching between them and you should be OK.


                CAUTION: don't use mdadm --create command if you already have the software RAID made in Windows, as I THINK it might overwrite the RAID info, and you'll end up ducking your raid and the data on it.






                share|improve this answer


























                • In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                  – Grezzo
                  Aug 1 '13 at 13:59














                1












                1








                1







                I can totally confirm that you can do it with mdadm, and a few simple commands:



                mdadm --build /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdb1
                mount /dev/md0 /mount/raid




                More Details:




                • You have to install mdadm first of course (terminal command: sudo apt-get install mdadm).

                • "md0" is just the name I gave to the raid, for use in Linux; you can call it whatever.

                • the "--level=0" part most likely refers to the kind of RAID, in my case RAID 0.

                • the "--raid-devices=2" part most likely is the number of HDDs in the RAID.

                • You have to first create the folder "/mount/raid" (or wherever you want to mount it or call it)

                • In my case I had a software RAID 0 made in windows 7/8, on two 2TB HDDs (here sdc1 and sdb1). Here, sdc1 is put first in the command because it contained the RAID info; if you receive some error saying that there's no RAID info, you can try switching between them and you should be OK.


                CAUTION: don't use mdadm --create command if you already have the software RAID made in Windows, as I THINK it might overwrite the RAID info, and you'll end up ducking your raid and the data on it.






                share|improve this answer















                I can totally confirm that you can do it with mdadm, and a few simple commands:



                mdadm --build /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdb1
                mount /dev/md0 /mount/raid




                More Details:




                • You have to install mdadm first of course (terminal command: sudo apt-get install mdadm).

                • "md0" is just the name I gave to the raid, for use in Linux; you can call it whatever.

                • the "--level=0" part most likely refers to the kind of RAID, in my case RAID 0.

                • the "--raid-devices=2" part most likely is the number of HDDs in the RAID.

                • You have to first create the folder "/mount/raid" (or wherever you want to mount it or call it)

                • In my case I had a software RAID 0 made in windows 7/8, on two 2TB HDDs (here sdc1 and sdb1). Here, sdc1 is put first in the command because it contained the RAID info; if you receive some error saying that there's no RAID info, you can try switching between them and you should be OK.


                CAUTION: don't use mdadm --create command if you already have the software RAID made in Windows, as I THINK it might overwrite the RAID info, and you'll end up ducking your raid and the data on it.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jul 31 '13 at 0:34









                nc4pk

                7,282115268




                7,282115268










                answered Jul 30 '13 at 0:47









                hello guyhello guy

                111




                111













                • In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                  – Grezzo
                  Aug 1 '13 at 13:59



















                • In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                  – Grezzo
                  Aug 1 '13 at 13:59

















                In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                – Grezzo
                Aug 1 '13 at 13:59





                In the first section of my question it shows that I tried those two commands, but they don't work. Probably because I had a RAID0, not a RAID1 like you

                – Grezzo
                Aug 1 '13 at 13:59











                0














                I think I've just discovered that it's not possible to "build" a RAID1 and "build"ing is the only way to view a Windows software RAID. Can someone confirm that for me?



                This is what I managed to get out of mdadm:



                graeme@MediaCentre:~$ sudo mdadm --build --help
                Usage: mdadm --build device -chunk=X --level=Y --raid-devices=Z devices

                This usage is similar to --create. The difference is that it creates
                a legacy array without a superblock. With these arrays there is no
                difference between initially creating the array and subsequently
                assembling the array, except that hopefully there is useful data
                there in the second case.

                The level may only be 0, raid0, or linear.
                All devices must be listed and the array will be started once complete.
                Options that are valid with --build (-B) are:
                --bitmap= : file to store/find bitmap information in.
                --chunk= -c : chunk size of kibibytes
                --rounding= : rounding factor for linear array (==chunk size)
                --level= -l : 0, raid0, or linear
                --raid-devices= -n : number of active devices in array
                --bitmap-chunk= : bitmap chunksize in Kilobytes.
                --delay= -d : bitmap update delay in seconds.





                share|improve this answer




























                  0














                  I think I've just discovered that it's not possible to "build" a RAID1 and "build"ing is the only way to view a Windows software RAID. Can someone confirm that for me?



                  This is what I managed to get out of mdadm:



                  graeme@MediaCentre:~$ sudo mdadm --build --help
                  Usage: mdadm --build device -chunk=X --level=Y --raid-devices=Z devices

                  This usage is similar to --create. The difference is that it creates
                  a legacy array without a superblock. With these arrays there is no
                  difference between initially creating the array and subsequently
                  assembling the array, except that hopefully there is useful data
                  there in the second case.

                  The level may only be 0, raid0, or linear.
                  All devices must be listed and the array will be started once complete.
                  Options that are valid with --build (-B) are:
                  --bitmap= : file to store/find bitmap information in.
                  --chunk= -c : chunk size of kibibytes
                  --rounding= : rounding factor for linear array (==chunk size)
                  --level= -l : 0, raid0, or linear
                  --raid-devices= -n : number of active devices in array
                  --bitmap-chunk= : bitmap chunksize in Kilobytes.
                  --delay= -d : bitmap update delay in seconds.





                  share|improve this answer


























                    0












                    0








                    0







                    I think I've just discovered that it's not possible to "build" a RAID1 and "build"ing is the only way to view a Windows software RAID. Can someone confirm that for me?



                    This is what I managed to get out of mdadm:



                    graeme@MediaCentre:~$ sudo mdadm --build --help
                    Usage: mdadm --build device -chunk=X --level=Y --raid-devices=Z devices

                    This usage is similar to --create. The difference is that it creates
                    a legacy array without a superblock. With these arrays there is no
                    difference between initially creating the array and subsequently
                    assembling the array, except that hopefully there is useful data
                    there in the second case.

                    The level may only be 0, raid0, or linear.
                    All devices must be listed and the array will be started once complete.
                    Options that are valid with --build (-B) are:
                    --bitmap= : file to store/find bitmap information in.
                    --chunk= -c : chunk size of kibibytes
                    --rounding= : rounding factor for linear array (==chunk size)
                    --level= -l : 0, raid0, or linear
                    --raid-devices= -n : number of active devices in array
                    --bitmap-chunk= : bitmap chunksize in Kilobytes.
                    --delay= -d : bitmap update delay in seconds.





                    share|improve this answer













                    I think I've just discovered that it's not possible to "build" a RAID1 and "build"ing is the only way to view a Windows software RAID. Can someone confirm that for me?



                    This is what I managed to get out of mdadm:



                    graeme@MediaCentre:~$ sudo mdadm --build --help
                    Usage: mdadm --build device -chunk=X --level=Y --raid-devices=Z devices

                    This usage is similar to --create. The difference is that it creates
                    a legacy array without a superblock. With these arrays there is no
                    difference between initially creating the array and subsequently
                    assembling the array, except that hopefully there is useful data
                    there in the second case.

                    The level may only be 0, raid0, or linear.
                    All devices must be listed and the array will be started once complete.
                    Options that are valid with --build (-B) are:
                    --bitmap= : file to store/find bitmap information in.
                    --chunk= -c : chunk size of kibibytes
                    --rounding= : rounding factor for linear array (==chunk size)
                    --level= -l : 0, raid0, or linear
                    --raid-devices= -n : number of active devices in array
                    --bitmap-chunk= : bitmap chunksize in Kilobytes.
                    --delay= -d : bitmap update delay in seconds.






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 12 '12 at 18:10









                    GrezzoGrezzo

                    5022616




                    5022616























                        0














                        This:



                        sudo mount -t ntfs /dev/md0 /media/WinMirror


                        attempts to mount the raid array as a whole, whereas the fdisk shows you have it partitioned:



                            Device Boot      Start         End      Blocks   Id  System
                        /dev/md0p1 63 2930275119 1465137528+ 42 SFS


                        To mount the partition, you should use:



                        sudo mount -t ntfs /dev/md0p1 /media/WinMirror





                        share|improve this answer
























                        • This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                          – Grezzo
                          Jan 13 '12 at 15:22











                        • @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                          – Paul
                          Jan 13 '12 at 22:36
















                        0














                        This:



                        sudo mount -t ntfs /dev/md0 /media/WinMirror


                        attempts to mount the raid array as a whole, whereas the fdisk shows you have it partitioned:



                            Device Boot      Start         End      Blocks   Id  System
                        /dev/md0p1 63 2930275119 1465137528+ 42 SFS


                        To mount the partition, you should use:



                        sudo mount -t ntfs /dev/md0p1 /media/WinMirror





                        share|improve this answer
























                        • This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                          – Grezzo
                          Jan 13 '12 at 15:22











                        • @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                          – Paul
                          Jan 13 '12 at 22:36














                        0












                        0








                        0







                        This:



                        sudo mount -t ntfs /dev/md0 /media/WinMirror


                        attempts to mount the raid array as a whole, whereas the fdisk shows you have it partitioned:



                            Device Boot      Start         End      Blocks   Id  System
                        /dev/md0p1 63 2930275119 1465137528+ 42 SFS


                        To mount the partition, you should use:



                        sudo mount -t ntfs /dev/md0p1 /media/WinMirror





                        share|improve this answer













                        This:



                        sudo mount -t ntfs /dev/md0 /media/WinMirror


                        attempts to mount the raid array as a whole, whereas the fdisk shows you have it partitioned:



                            Device Boot      Start         End      Blocks   Id  System
                        /dev/md0p1 63 2930275119 1465137528+ 42 SFS


                        To mount the partition, you should use:



                        sudo mount -t ntfs /dev/md0p1 /media/WinMirror






                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jan 13 '12 at 11:03









                        PaulPaul

                        48.5k14122149




                        48.5k14122149













                        • This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                          – Grezzo
                          Jan 13 '12 at 15:22











                        • @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                          – Paul
                          Jan 13 '12 at 22:36



















                        • This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                          – Grezzo
                          Jan 13 '12 at 15:22











                        • @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                          – Paul
                          Jan 13 '12 at 22:36

















                        This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                        – Grezzo
                        Jan 13 '12 at 15:22





                        This still doesn't work because it doesn't think it is an ntfs formatted partition. Failed to read last sector (5860544511): Invalid argument [...] HINTS: Either the volume is a RAID/LDM but it wasn't setup yet, or [...] The device '/dev/md0p1' doesn't seem to have a valid NTFS. ID 42 means that it is a windows dynamic disk (LDM) with a separate partition table at the end. I think mount cannot read the LDM partion within "ID 42" partition. Does this sound possible?

                        – Grezzo
                        Jan 13 '12 at 15:22













                        @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                        – Paul
                        Jan 13 '12 at 22:36





                        @Grezzo Ah, sorry yes. I don't think you can mount LDM under linux. You may need to use Windows to convert it to a non-dynamic drive first.

                        – Paul
                        Jan 13 '12 at 22:36











                        -1














                        I'm aware this is an old question. Nevertheless, I'd like to emphasize that the proposed solution of hello guy still works today.



                        I know the OP specifically asks for a solution using mdadm. But nowadays there is ldmtool specifically for coping with raids created in windows (aka Dynamic Disks). As usually the arch wiki covers all the technical details.



                        Maybe this additional information saves future readers some time.






                        share|improve this answer




























                          -1














                          I'm aware this is an old question. Nevertheless, I'd like to emphasize that the proposed solution of hello guy still works today.



                          I know the OP specifically asks for a solution using mdadm. But nowadays there is ldmtool specifically for coping with raids created in windows (aka Dynamic Disks). As usually the arch wiki covers all the technical details.



                          Maybe this additional information saves future readers some time.






                          share|improve this answer


























                            -1












                            -1








                            -1







                            I'm aware this is an old question. Nevertheless, I'd like to emphasize that the proposed solution of hello guy still works today.



                            I know the OP specifically asks for a solution using mdadm. But nowadays there is ldmtool specifically for coping with raids created in windows (aka Dynamic Disks). As usually the arch wiki covers all the technical details.



                            Maybe this additional information saves future readers some time.






                            share|improve this answer













                            I'm aware this is an old question. Nevertheless, I'd like to emphasize that the proposed solution of hello guy still works today.



                            I know the OP specifically asks for a solution using mdadm. But nowadays there is ldmtool specifically for coping with raids created in windows (aka Dynamic Disks). As usually the arch wiki covers all the technical details.



                            Maybe this additional information saves future readers some time.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Feb 6 at 21:59









                            m8mblem8mble

                            993




                            993






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Super User!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f377646%2fhow-do-i-mount-a-software-raid1-mirror-created-by-windows-in-linux-using-mdadm%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                Mangá

                                 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕