|Rich Mingin (PLUG) on 17 Mar 2015 06:15:08 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] Writing to Windows 7 software RAID volumes|
-----BEGIN PGP SIGNED MESSAGE-----
Little-known fact, md (and mdadm, etc.) can work with windows software
On 03/16/2015 10:56 PM, Josh Zenker wrote:
> I have a pair of disks mirrored using the software RAID implementation
> built into Windows 7. Ideally I would like to be able to mount them
> read-write from the Linux side, but I'm afraid of corrupting the dynamic
> disk. The general consensus on the Ubuntu Forums is that it's a bad
> idea. (I have been mounting them read-only without issues.) Still, I'm
> wondering if anyone here has tried it.
raid as they use compatible superblocks (at least, they did in windows
XP- haven't tested on Win7 but I can't imagine this changing).
There are two ways- the dmraid way (easy) and the mdadm way (more
difficult). Both are definitely easy compared to what you thought may
have been the case, however. Try the dmraid way first- if it reports no
found RAID devices, then continue to the mdadm way. dmraid is designed
to work with "fakeraid"- e.g. motherboard-assisted software RAID (I
guess this technically would be "firmware RAID" since it's neither
hwraid nor swraid). I have included both methods just in case Win7 makes
some hooks into the motherboard for determining how a RAID should be
Make sure you make backups first. As always. This has worked before, but
as I said, untested in Win7.
EASY WAY (dmraid):
Install dmraid if it isn't already installed.
This will list any devices found that can be assembled. If it finds
devices, great! You have your work cut out for you. You can run:
And they'll automatically be assembled. It should assign a name to the
array (for instance, WIN_RAID) and then should be accessible via
/dev/mapper (e.g. /dev/mapper/WIN_RAID). You can then mount it as a
normal NTFS volume (read or, if your driverset/modules support it, write
as well): mount -t ntfs /dev/mapper/WIN_RAID /mnt/WINDOWS
If it *doesn't* find any devices it can assemble into a RAID, well....
HARD WAY (mdadm):
Install mdadm if it isn't already installed.
Let the following be representative:
N=some unused number for an array in /dev/md*.
X=RAID level in your windows array- 0 for RAID0, 1 for RAID1, etc.
Y=number of disks in the array
Z[0-9]=hardware devices in the windows array
A=partition number of Z[0-9] that houses the RAIDed partition
Do ****not*** use ---create in mdadm. I'll say it again: DO NOT USE
- --create IN MDADM FOR WINDOWS ARRAYS. It will destroy the data on the
drives, along with the existing superblocks. This is why we specify
- --build- --assemble does not work, but --build does.
mdadm --build /dev/md*N* --chunk=64 --level=*X* --raid-devices=*Y*
(whiout the *'s. repeat the last /dev/sdZ[0-9]'s for all
devices/partitions in the array.)
Let's say in Windows you have drive A, B, and C in a RAID5. They each
have 2 partitions, with the second being the member of the RAID array.
drive A in linux maps to /dev/sda
drive B in linux maps to /dev/sdb
drive C in linux maps to /dev/sdc
You already have /dev/md0 present (for whatever reason), so you want to
assemble into a new array- /dev/md1.
--build /dev/md1 \
Then, to mount,
mount -t ntfs /dev/md1 /mnt/WINDOWS
Make sure windows had a clean shutdown. Sometimes you'll get an error
when you try to build the array- if that's the case, try futzing with
the order of the drives as it does matter (but improper ordering
shouldn't be destructive).
watch cat /proc/mdstat
is useful for watching the progress of the build. You should be able to
mount and write to it safely while (re)buildiing, but just don't
shutdown or (goodness.) power off before it finishes rebuilding. If
you've written to the array while it's (re)building, for good measure
I'd do a sync(1) as soon as it finishes (re)building but that probably
Hope this helps. Please report back with results.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug