When I was using MS-DOS not long ago I had a problem where MS-DOS could only use FAT16 drive, which allowed only 2GB partitions. Unfortunately I had to copy files which was 2,6 GB size, and simply couldn't fit in partition, unfortunately for me again all of those files had to be in the same directory/partition.

Today when I was creating my operation system I thought that it is possible that in future someone will run to similar problem.

union filesystem could be represented in unix by mounting two partitions to the same path. Running ls would show all files on partition 1 as well as on partition 2. In this case also one partition would not require other partition to be able to read all files.

This would solve the problem of 'too small maximum size of partition' which I experienced in MS-DOS with FAT16.

My question is what are the pros and cons of union filesystem?

Thanks to @Hennes who gave me the name of union filesystem in comment, which allowed me to better sentence the question.

I have no idea how to explain it easier... feel free to edit.

  • A sort of union filesystem for DOS ? – Hennes Jul 8 '16 at 12:15
  • @Hennes yes thats exactly what I mean – vakus Jul 8 '16 at 12:18
  • The thing is: Does union filesystem actually merge files themselves? As far as I know, it doesn't. – Paul Stelian Jul 8 '16 at 12:57

I'm using this exact technique at home. I have a 3TB harddrive and I run several VM's on it. Most have very small partitions as they only need the OS and some programs, but one is my file storage.

Because the pc is not that powerfull, I needed lots of storage on one share without a heavy OS running it. I went for Windows 2000 as the OS, but Windows 2000 has the limit that only harddisks with 2TB can be found. As I'm using VM, I can make as many virtual harddisks as I want, but this would work with real disks just as well.

I created a partition of 2TB and a partition of about 1TB (I calculated the space so it would fit)

I booted into Windows 2000, and found the 2 disks. I converted both disks into Dynamic discs and created one partition that spans both disks.

I now have a partition of 3TB that spans 2 Virtual Disks. I can even move one Virtual Disk to a different location and everything keeps working. As long as I use windows, this data is accessible. I've attached the disks to a Windows 10 VM, was able to import the Dynamic Disk Array and could work with it, such as shrinking and enlarging the partition, and then move it back to the windows 2000 and it still works.

The beauty of this is that it doesn't actually matter in which order the disks are attached, as long as they both are present.

The downside of doing this with multiple disks, is that the chance of a disk failing and thus the entire partition becoming inaccessible is higher as there are more than one disks that can fail.

Another caveat is that this does require windows 2000 and above with NTFS. Your question is specifically about FAT16 with msdos. I think MSDos can be run on FAT32 though, but I'm not sure.

  • Please note that I gave example with FAT16 on MS-DOS, however my intention is to consider allowing union filesystem on operation system that I am developing in my free time – vakus Jul 8 '16 at 12:47
  • @vakus yes, I saw that after I posted the answer. I also saw that you then edited. Although my post no longer is 100% reflecting the question, I still think it is valuable information and as such I leave it here. Its too long for a comment anyway. – LPChip Jul 8 '16 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.