Is file system part of operating system?
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?
Solution 1:
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.
Solution 2:
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.
- 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. - A "filesystem" is sometimes one (or more) slice(s) of a (or several) direct-access storage device(s) or 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". - 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 software 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.