You are not logged in.

#1 2013-08-01 15:55:56

MisterAnderson
Member
Registered: 2011-09-04
Posts: 285

Creating a modern linux system using a flat filesystem

Anybody know if there are any modern systems using a flat filesystem? Could you implement a linux system on one? I mean, think about it, it couldn't be that hard. Just stick a / into a filename to make it look like a file in a subdirectory.

/example/of/stuff.txt # The file stuff.txt in the directory /example/of/
But on the new system:
/example/of/stuff.txt # The file example/of/stuff.txt in the directory /

Anyone know of specific advantages to this system? Some disadvantages are pretty obvious but I really want I know if there's any possible reason for wanting this.

Last edited by MisterAnderson (2013-08-01 15:56:17)


D:

Offline

#2 2013-08-02 02:08:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Creating a modern linux system using a flat filesystem

Not really an answer but I was curious and did find http://martin.hinner.info/fs/bfs/.

EDIT: I don't really understand why you would add / into file names to make them look as if they were in directories. I mean, if you want them to look like that, why not use a hierarchical file system in the first place?

EDIT EDIT: Also, I am not sure about this but you are talking about how the file system appears to you. Directories are just more files, though, right? So I'm not sure that the way the file system looks to you necessarily reflects the underlying structure. I don't mean that structure is flat - obviously not - but the hierarchy that you see is a representation of the file system rather than a window onto its underlying structure, isn't it? Isn't that why you can use all kinds of different file systems which work really differently and still see the same hierarchy and interact with the file system in the same way regardless?

Last edited by cfr (2013-08-02 02:15:26)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-08-02 04:13:38

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Creating a modern linux system using a flat filesystem

Tools like find, ls, and mv would all work differently under a system such as you propose. This in turn would break a large number of existing scripts, some of which are likely to be important in booting and administering the computer. I suppose that you could theoretically fix all those problems, but that would be a pain.

There would also be security implications -- ownership and permissions on directories like /tmp could not be preserved in the way a modern Linux system expects. Again, an entirely new OS (or even a distribution) could be built around this, but it would break a lot of existing Linux tools.

Of course, this ignores the hideous performance problems you'd have. It would take a ridiculous amount of time to sift through perhaps tens of thousands of directory entries to find a specific file, for instance.

Flat filesystems are on the trash heap of computer history for a reason. Resurrecting them would be like bringing back smoke signals to replace the Internet. It's conceivable that some very limited computing devices (like wristwatches) might use them, but I'm not aware of anything that deserves to be called a "computer" that does so, aside from museum pieces like the original Mac.

Offline

#4 2013-08-06 02:40:21

MisterAnderson
Member
Registered: 2011-09-04
Posts: 285

Re: Creating a modern linux system using a flat filesystem

I'm just doing Operating Systems at University and I was interested after this came up if anything still uses this method. Clearly not as the disadvantages are far too great, I mean even my home router has a heirarchical filesystem. Thanks for the input though, it's been interesting!


D:

Offline

Board footer

Powered by FluxBB