I was wondering if a file system on a storage device is part of OS?

I don't think it is. Instead it is part of the storage device, and exists outside of any OS although was created by an OS. Is my understanding right?

However in Wikipedia:

Most operating systems provide a file system, as a file system is an integral part of any modern operating system.

For LVM, is it part of the OS? If yes, then the virtual filesystem built on LVM is part of the OS?

link|improve this question

56% accept rate
Since the OS itself resides within the file system, I would say it is an integral part of the OS, no way around it. – Moab Jun 4 '11 at 1:50
According to your reason, isn't OS part of file system more suitable than the reverse? – Tim Jun 4 '11 at 1:54
Actually I think a file system is a requirement of the storage medium, since an OS can reside in memory without using a hard disk or other storage device. – Moab Jun 4 '11 at 3:38
feedback

5 Answers

The filesystem itself, represented by the physical order of information on a storage-representation, is independent of the OS. The OS contains a driver that allows it to work with the filesystem. Some filesystems may only have one OS that can talk to it, and that OS has that filesystem hardcoded into it (think Novell NetWare's original filesystem); but that doesn't stop some enterprising person from writing such a driver for another OS just because.

LVM isn't a filesystem, it's a volume manager. Volume managers, like filesystems, rely upon data stored on a logical storage presentation to further define how to access that storage for further logical volumes. In the case of LVM, both Linux and the BSDs can use the same on-storage format for their respective LVM implementations.

The Windows volume manager is the Dynamic Disk, and some enterprising people have created Linux drivers for accessing them.

If you were to take a set of disks, install a Linux of some kind, set them up with LVM, install several ext3 filesystems on the logical volumes and then place the drives in a FreeBSD machine, that FreeBSD machine would be able to read the disks. Probably. This is because FreeBSD has drivers that understand the physical layout of both LVM and ext3, and implement required in-OS memory and access structures required to interact with them.

The drivers required to interpret storage layout are almost always "in the OS", but the actual storage layout itself is not considered to be.

link|improve this answer
feedback

There is no formal definition of "operating system". Some used to maintain that "operating system" and "file management API" were one and the same, with the OS having nothing else to do other than provide a command analyzer. (After all, this is all that MS-DOS did, originally.)

I've always maintained that DOS wasn't a real operating system -- that an operating system's job is to abstract and virtualize the hardware, and to manage hardware resources. DOS did essentially none of that.

As to whether a file system is a part of the OS or a part of the "storage device", a lot depends in turn on what you mean by "file system". There is the physical layout, such as the layout on a floppy disk or CD, and there is the file system FUNCTION, which depends on having some intelligent entity (CPU or peripheral processor of some sort) to take the nonsense on the disk and return it as a meaningful sequence of bytes. The layout presumably conforms to some standard, so you can, eg, record a CD on one device and read/play it on another. The question is whether this layout is a "file system", or whether the "system" resides in the devices clever enough to read/write the layout.

In most computer contexts, one uses the term "file system" to refer to the APIs that allow you to read/write files, and the combination of CPU and peripheral devices, operating under the control of some OS, that implement those APIs -- the term does not usually refer to the physical format of the media, or individual media, whether removable or not.

link|improve this answer
Interesting points. – Maxpm Jun 4 '11 at 4:39
Even in MS-DOS, the OS was MSDOS.SYS, and the command-line shell was COMMAND.COM. – grawity Jun 4 '11 at 8:48
feedback

I answered this over on ServerFault. Here's the answer again:

The problem here is the word "filesystem". In the POSIX/Unix/Linux worlds, it is used to mean several different things.

  1. The "filesystem" is sometimes the entire system of files, rooted at / and as presented to applications softwares by the operating system kernel. With this meaning, people talk of POSIX operating systems having a "single filesystem tree", for example.
  2. A "filesystem" is sometimes one (or more) slice(s) of a (or several) DASD(s) — one or more collections of contiguous disc sectors formatted as a single volume with a given format — as demarcated by some disc partitioning scheme. With this meaning, people talk of, say, "formatting my /usr filesystem".
  3. A "filesystem" is sometimes an abstract joinable tree of files and directories, presented by a filesystem driver (i.e. the VFS layer) to the rest of the system. With this meaning, people talk of, say, "mounting the proc filesystem on /proc".

Wikipedia's prose is meaning #1. This is, indeed, part of the operating system, as it is an operating system supplied, and operating system specific, abstraction provided to applications softwares that run on the operating system.

Meaning #2 is not part of the operating system. It is an on-disc data structure that one or more operating systems are capable of understanding. The on-disc data structures for LVM, specifically, provide ways to slice up one or more DASDs into one or more volumes. They aren't part of the operating system per se. (But, similarly, "LVM" has multiple meanings, and can mean the LVM drivers and utilities in the operating system as much as it can mean the on-disc data structures that those drivers and utilities manipulate. e.g. "I ran LVM from the rescue disc.")

Meaning #3 is an operating system specific abstraction provided by operating system specific filesystem drivers. The filesystem drivers are, indeed, part of the operating system, although they are usually distinct and separate from the operating system kernel.

link|improve this answer
feedback

A file system is created, maintained, and used by an operating system but you are right to conclude that its representation can exist independent of an operating system.

link|improve this answer
feedback

The particular implementation is part of the OS. The abstract idea, specifications, and stored data aren't.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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