0

I have created a RAID 1 array under Ubuntu using mdadm. I used the manual at this link: https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-16-04

I created a RAID 1 array using two partitions (on different hard drives). I selected the NTFS file system in order to read the data under Windows later. So after I created the RAID 1 array, I wrote a file on the md0 device and loaded Windows XP to check that this file will be on both partitions. But I was not able to open partitions under Windows XP. Windows XP assigned a drive letter to both partitions but when I try to open them it says:

file system is not available.

Is it possible to have two partitions under NTFS in RAID 1 on Ubuntu so that it could be possible to access them from Windows?

[UPDATE] Sorry for not giving a detailed information. I have two drives. I have created an ntfs partitions on both. Then under Ubuntu i used mdadm to combine them into raid 1 array. I wrote a file into md0. Then i have booted Windows XP from a third drive. Not a VM. I see that two partitions have a drive letter. One for each. But i can't see my file in them. I expect it to bee on both partitions. The first partition is not empty (i see it from disk properties) but when i open it there is no file. Another partition is shown as empty and can't be opened.

I was expecting that linux mdadm works in a way that it just mirrors the file write to both paritions so that they can be read from any other operating system later.

[quote] Windows doesn't understand mdadm natively (nitpicking: neither does Linux considering mdadm has to be installed) hence Windows sees the 2 drives (and partitions) as independent so it attributes "letters" but can't read the contents obviously. [/quote]

ChanganAuto why can't file can't be read separately from any partition from raid 1 array? [/UPDATE]

11
  • 1
    Are you using a hardware RAID? I'm puzzled by XP knowing to assign one drive-letter to both drives. Or was XP inside a VM?
    – harrymc
    Commented May 9, 2023 at 17:45
  • 2
    github.com/maharmstone/winmd but not sure it can be installed in such old Windows. BTW, Ubuntu 16.04 is also EoL, out of support since long time ago. You should seriously prioritize upgrading both OSes. Commented May 9, 2023 at 17:46
  • 1
    @harrymc RAID 1 array using two partitions (on different hard drives) created with software. Then Windows XP assigned a drive letter to both partitions [drives] but when i try to open them it says: file system is not available which is to be expected. Windows doesn't understand mdadm natively (nitpicking: neither does Linux considering mdadm has to be installed) hence Windows sees the 2 drives (and partitions) as independent so it attributes "letters" but can't read the contents obviously. It has nothing to do with VMs, actually the opposite of what you suggested first (...) Commented May 9, 2023 at 18:04
  • 1
    If it's a 32-bit system, you can upgrade to 18.04 LTS, askubuntu.com/questions/1023786/…, and then use free Ubuntu Pro, ubuntu.com/pro, to keep it current until 2028. Commented May 9, 2023 at 18:43
  • 1
    why can't file can't be read separately from any partition from raid 1 array Because, again, it's software RAID, it depends on a "driver". All you need to know about (trying) to read it in Windows in on my first comment, you can ignore the back & forth that happened after it Also of note, this is a Q&A website, not a forum. I answered your edit as a courtesy but here thing DON'T work this way. Commented May 10, 2023 at 16:22

1 Answer 1

1

Is it possible to have two partitions under NTFS in RAID 1 on Ubuntu so that it could be possible to access them from Windows?

Yes, that is possible by making them available as network shares. This is an access on file level which allows you to create and delete files and folders. It is not a bare metal access which allows you to read and write specific sectors over the network. By using network shares, it does not matter for your XP client on which type of file system your linux host is managing your files.

As ChanganAuto underlined in his commentary this solution is not possible in a dual-boot environment because you would need to have two running operating systems. Maybe assiging two disks to a linux running in a virtual machine on a Windows host could solve the problem.

I was expecting that linux mdadm works in a way that it just mirrors the file write to both paritions so that they can be read from any other operating system later.

That is wrong. mdadm probably (I never used it) initialised your partition with a mdadm-specific header which has overwritten your file system metadata such as the boot sector and others. That initialisation deleted the NTFS boot sector. Probably mdadm wrote a summary file describing your mdadm setup somewhere in the linux directory tree.

As XP does not understand the mdadm header it fails to recognize the mdadm-structure. Furthermore where should XP get that summary information/configuration file from when it's only residing somewhere in your linux operating system partition directory tree?

You did not specify if you are using XP 32-bit or 64-bit. Assuming a typical sector size of 512 byte at the interface XP 32-bit can only address a maximum space of 2 TB using the outdated MBR partition table format instead of the modern GPT partition table format.

If you were using disks bigger than 2 TB you would have ran into a problem as you would have partitioned them with GPT on linux wich XP 32-bit does not understand.

5
  • 1
    Theoretically winmd can see the RAID1 as created by mdadm in Linux. The doubt about it being compatible with XP remains. Also of note network shares wouldn't work in a dual-boot environment considering the array in in the same machine. Commented May 10, 2023 at 18:57
  • ChanganAuto, would winmd overcome the 2^32 LBA limitation of the MBR partition table?
    – r2d3
    Commented May 10, 2023 at 19:00
  • I'm not sure but they said it can read anything created by mdadm as long as the underlying file system is also supported by the OS. the OP mentioned NTFS so that should be fine for XP. Commented May 10, 2023 at 19:03
  • Some notes about mdadm, the cli tool of reference for creating any type of software RAID in Linux: raid.wiki.kernel.org/index.php/A_guide_to_mdadm Commented May 10, 2023 at 19:07
  • I've tried to get winmd to work on XP 32-bit. It installed successfully, but didn't see the NTFS volume on RAID1. I gave btrfs a try. I've installed a driver by the same developer as winmd and Windows tried to use it for a newly created btrfs filesystem, but it didn't appear as a drive afterwards. I couldn't find it in Device Manager either. I'd say results are inconclusive: clearly the btrfs got detected since Windows decided it needs to install a driver for it, but the filesystem was inaccessible just like NTFS.
    – gronostaj
    Commented May 11, 2023 at 10:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .