Linux file system and windows file system

Windows vs Linux Windows uses FAT and NTFS as file systems, while Linux uses a variety of file systems. Unlike Windows, Linux is bootable from a network drive. In contrast to Windows, everything is…

Linux vs WindowsWindows vs Linux

Windows uses FAT and NTFS as file systems, while Linux uses a variety of file systems.

Unlike Windows, Linux is bootable from a network drive.

In contrast to Windows, everything is either a file or a process in Linux. Please see one of my earlier post What “Everything Is a File” Means on Linux.

Linux has two kinds of major partitions called data partitions and swap partitions. Because of the existence of swap partitions, you never run out of memory in Linux (like in windows).

In terms of recovery tools, only a limited number of tools can be used on Windows, while there is a large number of UNIX based recovery tools available for Linux file systems.

Linux Windows filesystem

From the author Nigel McFarlane:

Both Windows and Linux organize disk-based files into a hierarchy of directories. Such directories are usually called “folders” when viewed in a GUI. One whole hierarchy is called a “file system” on both platforms. The architecture of Windows and Linux file systems is similar in some points, but diverges greatly when tools are considered. Here’s a quick comparison.

On hardware derived from Intel or IBM PCs, both Windows and Linux use the Master Block Record/ Master Boot Record (MBR). That is the bit of disk used to boot the operating system and to state whether the disk is partitioned or not. On both Windows and Linux, it is common to have at most one file system per partition. That is about the end of the similarity.

Each Windows file system gets a drive letter, like “C:”. On Linux, each file system gets a device, like /dev/hda1 (“hard disk A part 1”), which is represented as a file. Such a file is a device file (since a disk is a device), hence the “dev” part of the path name. Also, the device file is not an ordinary text file, it is a “special file.” Since disks are block devices (unlike a serial mouse), such a file is fully described as a “block special device file.” The numbered part of the path can be a little weird to get right; it’s best to be guided by documentation there or extract the right name from a report.

On Windows, file systems can be FAT16, FAT32 or NTFS, to name a few. Recall FAT16 is the ancient standard responsible for Windows file names with the “8.3” file name length restriction. On Linux, filesystems can be “minix,” “ext,” or “ext2,” to name a few. Also, “minix” is an example of the ancient standard responsible for UNIX file names once being limited to 14 characters. Linux also has “msdos” and “vfat” file systems for compatibility with Windows and DOS, plus more.

Windows uses FORMAT.EXE to format a disk. Linux uses “mkfs” (“make file system”) in various specialist forms.

Each Windows file system has a File Allocation Table (FAT, VFAT, or similar) that states which disk blocks hold the topmost directory. On Linux, the equivalent on most filesystems is the superblock. A Linux file system has multiple copies of the superblock physically saved on the disk. This provides redundancy in case of a partial disk corruption. The superblock is just about always in memory on Linux; that is not the case for ancient DOS-like file systems. There are no special restrictions on files placed in the topmost directory on Linux, either.

On Windows, there is one drive letter per mounted file system: for example, C: for C: and D: for D:. On Linux there are no drive letters, so one file system is mounted on “/” and all other file systems are mounted on subdirectories of “/.” This arrangement is like the little-used MS-DOS command SUBST, or the NET USE command that supports Novell‘s NetWare. The equivalent Linux command is “mount.”

You can see all this at work on Linux, but for some of it you need to be logged in as root. Type “cat /etc/fstab” to see all the mountable devices, including floppy disks and CD players. Type “df” to see the devices currently mounted, and their free space. In the usual case you can even see the superblock: try “/sbin/dumpe2fs /dev/hda1” where hda1 comes from the output of “df.” The name “dumpe2fs” is a casualty of history; it replaces the older “dumpfs.” The information produced is really just for diagnostic purposes.

Mostly file systems work for you silently. If you want to dig into Linux further, then there are plenty of tools that can be used as inspection points.

About the author
Nigel McFarlane is an open source software analyst and technologist with a broad background in technology and software engineering. He has an extensive programming background and degrees in computer science and physics. His latest book is “Rapid Application Development with Mozilla” from Prentice Hall PTR.

Source:
http://searchopensource.techtarget.c…990200,00.html

First off, there will be some problems with NTFS if you use it in Linux:

  1. NTFS doesn’t support file permission mode very well, so you’ll lose the executable bit, setuid bit, etc.

  2. The ACL system in NTFS is not so comfortable with Linux, and you can’t disable it like you can with FAT32.

  3. Currently, the performance of the NTFS implementation in Linux is not very good. For example, I found if I build a Maven project with NTFS, it is 3 more times slower than ext4.

Personally, I run Windows OS in VirtualBox, and make the virtual disk a raw NTFS image (see here). Since the NTFS image is now in raw format rather than.VDI, you can access the NTFS by mounting it directly, without loading the VM instance.

By using VirtualBox instead of Dual boots, there are several advantages:

  1. You don’t have to convert your Linux partition to the NTFS file system. In VirtualBox, you can use Share Folder to access the host OS’s file system. And it’s very fast. Map it to a drive letter if necessary.

  2. You can work with both OSes concurrently, without needing to restart in order to switch from one to the other.

  3. Your GRUB loader will never be overwritten by Windows. Windows always overwrites your boot record and never prompts you with a yes or no.

  4. You will pay more attention to Linux, and then you’ll learn the Linux way to do most of your work. In fact, I found it’s rarely needed to turn on the Windows VM. Because people are lazy about learning new things if you install a dual system, and Windows is enough, why would you bother to boot into another OS?

I found this is the best way to make both Linux and Windows coexist. I have built several Windows VM instances for different usages, and because I don’t install too many applications in each VM, they run fast and it doesn’t feel too different from non-virtual machines.

The following tables compare general and technical information for a number of file systems.

While storage devices usually have their size expressed in powers of 10 (for instance a 1 TB Solid State Drive will contain at least 1,000,000,000,000 (1012, 10004) bytes), filesystem limits are invariably powers of 2, so usually expressed with IEC prefixes. For instance, a 1 TiB limit means 240, 10244 bytes. Approximations (rounding down) using power of 10 are also given below to remove confusions.

File system Maximum filename length Allowable characters in directory entries[c] Maximum pathname length Maximum file size Maximum volume size[d] Max number of files
AdvFS 255 characters Any byte except NUL[e] No limit defined[f] 16 TiB (17.59 TB) 16 TiB (17.59 TB) ?
APFS 255 UTF-8 characters Unicode 9.0 encoded in UTF-8[8] ? 8 EiB (9.223 EB) ? 263 [9]
BeeGFS 255 bytes Any byte except NUL[e] No limit defined[f] 16 EiB (18.44 EB) 16 EiB (18.44 EB) ?
BFS 255 bytes Any byte except NUL[e] No limit defined[f] 12,288 bytes to 260 GiB (279.1 GB)[g] 256 PiB (288.2 PB) to 2 EiB (2.305 EB) Unlimited
BlueStore/Cephfs ? any byte, except null, «/» No limit defined Max. 264 bytes, 1 TiB (1.099 TB) by default [10] Not limited Not limited, default is 100,000 files per directory [11]
Btrfs 255 bytes Any byte except ‘/’ and NUL No limit defined 16 EiB (18.44 EB) 16 EiB (18.44 EB) 264
CBM DOS 16 bytes Any byte except NUL 0 (no directory hierarchy) 16 MiB (16.77 MB) 16 MiB (16.77 MB) ?
CP/M file system 8.3 ASCII except for < > . , ; : = ? * [ ] No directory hierarchy (but accessibility of files depends on user areas via USER command since CP/M 2.2) 32 MiB (33.55 MB) 512 MiB (536.8 MB) ?
DECtape 6.3 A–Z, 0–9 DTxN:FILNAM.EXT = 15 369,280 bytes (577 * 640) 369,920 bytes (578 * 640) ?
Disk Operating System (GEC DOS) ? ? ? ? at least 131,072 bytes ? ?
Elektronika BK tape format 16 bytes ? No directory hierarchy 64 KiB (65.53 KB) Not limited. Approx. 800 KiB (819.2 KB) (one side) for 90 min cassette ?
exFAT 255 UTF-16 characters ? 32,760 Unicode characters with each path component no more than 255 characters[12] 16 EiB (18.44 EB)[12] 64 ZiB (75.55 ZB) (276 bytes) ?
ext 255 bytes Any byte except NUL[e] No limit defined[f] 2 GiB (2.147 GB) 2 GiB (2.147 GB) ?
ext2 255 bytes Any byte except NUL, /[e] No limit defined[f] 16 GiB (17.17 GB) to 2 TiB (2.199 TB)[d] 2 TiB (2.199 TB) to 32 TiB (35.18 TB) ?
ext3 255 bytes Any byte except NUL, /[e] No limit defined[f] 16 GiB (17.17 GB) to 2 TiB (2.199 TB)[d] 2 TiB (2.199 TB) to 32 TiB (35.18 TB) ?
ext4 255 bytes[13] Any byte except NUL, /[e] No limit defined[f] 16 GiB (17.17 GB) to 16 TiB (17.59 TB)[d][14] 1 EiB (1.152 EB) 232 (static inode limit specified at creation)
F2FS 255 bytes Any byte except NUL, /[e] No limit defined[f] 4,228,213,756 KiB (4.329 TB) 16 TiB (17.59 TB) ?
FAT (8-bit) 6.3 (binary files) / 9 characters (ASCII files) ASCII (0x00 and 0xFF not allowed in first character) No directory hierarchy ? ? ?
FAT12/FAT16 8.3 (255 UCS-2 characters with LFN)[h] SFN: OEM A-Z, 0-9, ! # $ % & ‘ ( ) — @ ^ _ ` { } ~, 0x80-0xFF, 0x20. LFN: Unicode except NUL, » * / : < > ? | [c][e] No limit defined[f] 32 MiB (33.55 MB) (4 GiB (4.294 GB))[i] 1 MiB (1.048 MB) to 32 MiB (33.55 MB) ?
FAT16B/FAT16X 8.3 (255 UCS-2 characters with LFN)[h] SFN: OEM A-Z, 0-9, ! # $ % & ‘ ( ) — @ ^ _ ` { } ~, 0x80-0xFF, 0x20. LFN: Unicode except NUL, » * / : < > ? | [c][h][e] No limit defined[f] 2 (4) GiB[i] (2.147 GB) 16 MiB (16.77 MB) to 2 (4) GiB (2.147 GB) ?
FAT32/FAT32X 8.3 (255 UCS-2 characters with LFN)[h] SFN: OEM A-Z, 0-9, ! # $ % & ‘ ( ) — @ ^ _ ` { } ~, 0x80-0xFF, 0x20. LFN: Unicode except NUL, » * / : < > ? | [c][h][e] 32,760 Unicode characters with each path component no more than 255 characters[12] 4 GiB (4.294 GB)[12] 512 MiB (536.8 MB) to 16 TiB (17.59 TB)[j] ?
FATX 42 bytes[h] ASCII. Unicode not permitted. No limit defined[f] 2 GiB (2.147 GB) 16 MiB (16.77 MB) to 2 GiB (2.147 GB) ?
FFS 255 bytes Any byte except NUL[e] No limit defined[f] 4 GiB (4.294 GB) 256 TiB (281.4 TB) ?
Fossil ? ? ? ? ? ?
GEC DOS filing system extended 8 bytes A–Z, 0–9. Period was directory separator ? No limit defined (workaround for OS limit) ? at least 131,072 bytes ? ?
GEMDOS 8.3 A-Z, a-z, 0-9 ! @ # $ % ^ & ( ) + — = ~ ` ; ‘ » , < > | [ ] ( ) _[16] ? ? ? ?
GFS 255 bytes Any byte except NUL[e] No limit defined[f] 2 TiB (2.199 TB) to 8 EiB (9.223 EB)[k] 2 TiB (2.199 TB) to 8 EiB (9.223 EB)[k] ?
GPFS 255 UTF-8 codepoints Any byte except NUL[e] No limit defined[f] 9 EiB (10.37 EB) 299 bytes ?
HAMMER 255 bytes[17] Any byte except NUL[e] ? ? 1 EiB (1.152 EB)[18] ?
HFS 31 bytes Any byte except : Unlimited 2 GiB (2.147 GB) 2 TiB (2.199 TB) ?
HFS Plus 255 UTF-16 characters[l] Any valid Unicode[e][m] Unlimited slightly less than 8 EiB (9.223 EB) slightly less than 8 EiB (9.223 EB)[19][20] ?
High Sierra Format ? ? ? ? ? ?
HPFS 255 bytes Any byte except NUL[n] No limit defined[f] 2 GiB (2.147 GB) 2 TiB (2.199 TB)[o] ?
IBM SFS 8.8 ? ? Non-hierarchical[21] ? ?
ISO 9660:1988 Level 1: 8.3,
Level 2 & 3: ~ 180
Depends on Level[p] ~ 180 bytes? 4 GiB (4.294 GB) (Level 1 & 2) to 8 TiB (8.796 TB) (Level 3)[q] 8 TiB (8.796 TB)[r] ?
ISO 9660:1999 ? ? ? ? ? ?
JFS 255 bytes Any Unicode except NUL No limit defined[f] 4 PiB (4.503 PB) 32 PiB (36.02 PB) ?
JFS1 255 bytes Any byte except NUL[e] No limit defined[f] 8 EiB (9.223 EB) 512 TiB (562.9 TB) to 4 PiB (4.503 PB) ?
Joliet («CDFS») 64 Unicode characters All UCS-2 code except *, /, , :, ;, and ?[22] ? same as ISO 9660:1988 same as ISO 9660:1988 ?
Level-D 6.3 A–Z, 0–9 DEVICE:FILNAM.EXT[PROJCT,PROGRM] = 7 + 10 + 15 = 32; + 5*7 for SFDs = 67 34,359,738,368 words (235); 206,158,430,208 SIXBIT bytes Approx 12 GiB (12.88 GB) (64 * 178 MiB (186.6 MB)) ?
Lustre 255 bytes Any byte except NUL[e] No limit defined[f] 16 EiB (18.44 EB) on ZFS 16 EiB (18.44 EB) ?
MFS 255 bytes Any byte except : No path (flat filesystem) 256 MiB (268.4 MB) 256 MiB (268.4 MB) ?
MicroDOS file system 14 bytes ? ? 16 MiB (16.77 MB) 32 MiB (33.55 MB) ?
Minix V1 FS 14 or 30 bytes, set at filesystem creation time Any byte except NUL[e] No limit defined[f] 256.5 MiB (268.9 MB) [s] 64 MiB (67.10 MB) ?
Minix V2 FS 14 or 30 bytes, set at filesystem creation time Any byte except NUL[e] No limit defined[f] 2 GiB (2.147 GB) [s] 1 GiB (1.073 GB) ?
Minix V3 FS 60 bytes Any byte except NUL[e] No limit defined[f] 2 GiB (2.147 GB) 4 GiB (4.294 GB) ?
NILFS 255 bytes Any byte except NUL[e] No limit defined[f] 8 EiB (9.223 EB) 8 EiB (9.223 EB) ?
NOVA 255 bytes Any byte except NUL, /[e] No limit defined[f] 16 EiB (18.44 EB) 16 EiB (18.44 EB) ?
NSS 256 characters Depends on namespace used[t] Only limited by client 8 TiB (8.796 TB) 8 TiB (8.796 TB) ?
NTFS 255 characters In Win32 namespace: any UTF-16 code unit (case-insensitive) except /:*"?<>| as well as NUL

In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL[23]

32,767 Unicode characters with each path component (directory or filename) up to 255 characters long[f] 16 TiB (17.59 TB) to 8 PiB (9.007 PB)[u][24] 16 TiB (17.59 TB) to 8 PiB (9.007 PB)[u][24] 232
NWFS 80 bytes[v] Depends on namespace used[t] No limit defined[f] 4 GiB (4.294 GB) 1 TiB (1.099 TB) ?
OCFS 255 bytes Any byte except NUL[e] No limit defined[f] 8 TiB (8.796 TB) 8 TiB (8.796 TB) ?
OCFS2 255 bytes Any byte except NUL[e] No limit defined[f] 4 PiB (4.503 PB) 4 PiB (4.503 PB) ?
ODS-5 236 bytes[w] ? 4,096 bytes[x] 1 TiB (1.099 TB) 1 TiB (1.099 TB) ?
QFS 255 bytes Any byte except NUL[e] No limit defined[f] 16 EiB (18.44 EB)[y] 4 PiB (4.503 PB)[y] ?
ReFS 255 UTF-16 characters[25] In Win32 namespace: any UTF-16 code unit (case-insensitive) except /:*"?<>| as well as NUL

In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL[25][26]

32,767 Unicode characters with each path component (directory or filename) up to 255 characters long[25] 16 EiB (18.44 EB)[25][27] 1 YiB (1.208 YB)[25] ?
ReiserFS 4,032 bytes/255 characters Any byte except NUL or '/'[e] No limit defined[f] 8 TiB (8.796 TB)[z] (v3.6), 4 GiB (4.294 GB) (v3.5) 16 TiB (17.59 TB) ?
Reiser4 3,976 bytes Any byte except / and NUL No limit defined[f] 8 TiB (8.796 TB) on x86 ? ?
Rock Ridge 255 bytes Any byte except NUL or /[e] No limit defined[f] same as ISO 9660:1988 same as ISO 9660:1988 ?
RT-11 6.3 A–Z, 0–9, $ 0 (no directory hierarchy) 33,554,432 bytes (65536 * 512) 33,554,432 bytes ?
SquashFS 256 bytes ? No limit defined 16 EiB (18.44 EB) 16 EiB (18.44 EB) ?
UDF 255 bytes Any Unicode except NUL 1,023 bytes[aa] 16 EiB (18.44 EB) 512 MiB (536.8 MB) to 16 TiB (17.59 TB) ?
UFS1 255 bytes Any byte except NUL[e] No limit defined[f] 16 GiB (17.17 GB) to 256 TiB (281.4 TB) 16 EiB (18.44 EB) Subdirectory per directory is 32,767[29]
UFS2 255 bytes Any byte except NUL[e] No limit defined[f] 512 GiB (549.7 GB) to 32 PiB (36.02 PB) 512 ZiB (604.4 ZB)[30] (279 bytes) Subdirectory per directory is 32,767[29]
UniFS No limit defined (depends on client) ? No limit defined (depends on client) Available cache space at time of write (depends on platform) No limit defined No limit defined
Version 6 Unix file system (V6FS) 14 bytes Any byte except NUL and /[e] No limit defined[f] 16 MiB (16.77 MB)[ab] 32 MiB (33.55 MB) ?
Version 7 Unix file system (V7FS) 14 bytes Any byte except NUL or /[e] No limit defined[f] 1 GiB (1.073 GB)[ac] 2 TiB (2.199 TB) ?
VMFS2 128 Any byte except NUL or /[e] 2,048 4 TiB (4.398 TB)[ad] 64 TiB (70.36 TB) ?
VMFS3 128 Any byte except NUL or /[e] 2,048 2 TiB (2.199 TB)[ad] 64 TiB (70.36 TB) ?
VxFS 255 bytes Any byte except NUL[e] No limit defined[f] 16 EiB (18.44 EB) ? ?
XFS 255 bytes[ae] Any byte except NUL[e] No limit defined[f] 8 EiB (9.223 EB)[af] 8 EiB (9.223 EB)[af] ?
Xiafs 248 bytes Any byte except NUL[e] No limit defined[f] 64 MiB (67.10 MB) 2 GiB (2.147 GB) ?
ZFS 255 bytes Any Unicode except NUL No limit defined[f] 16 EiB (18.44 EB) 281,474,976,710,656 YiB (2128 bytes) 2128
File system Maximum filename length Allowable characters in directory entries[c] Maximum pathname length Maximum file size Maximum volume size[d] Max number of files

Note that in addition to the below table, block capabilities can be implemented below the file system layer in Linux (LVM, integritysetup, cryptsetup) or Windows (Volume Shadow Copy Service, SECURITY), etc.

«online» and «offline» are synonymous with «mounted» and «not mounted».

File system DOS Linux macOS Windows 9x Windows NT «classic» Mac OS FreeBSD OS/2 BeOS Minix Solaris z/OS Android[87]
APFS No Partial (read-only with apfs-fuse[88] or linux-apfs[89]) Yes
(Since macOS Sierra)
No No No No No No No No No No
BeeGFS No Yes ? No No No No No ? ? ? No No
DECtape No No No No No No No No No No No No No
Level-D No ? ? No No No No No No No ? ? No
RT-11 No No No No No No No No No No No No No
Version 6 Unix file system (V6FS) No ? No No No No No No No No No No No
Version 7 Unix file system (V7FS) No Yes No No No No No No ? ? ? No No
exFAT No Yes (since 5.4,[90] available as a kernel module or FUSE driver for earlier versions) Yes No Yes (installable drivers for Windows XP, 2003. Included with Windows Vista SP1 and newer.) No Yes (available as a FUSE driver) No No No Yes (available as a FUSE driver) No With kernel 5.10
FAT12 Yes Yes Yes Yes Yes Yes Yes Yes Yes Partial (via dosdir, dosread, doswrite) Yes ? Yes
FAT16 / FAT16B / FAT16X Yes (FAT16 from DOS 3.0, FAT16B from DOS 3.31, FAT16X from DOS 7.0) Yes Yes Yes Yes Yes Yes Yes Yes Partial (via dosdir, dosread, doswrite, not FAT16X) Yes ? Yes
FAT32 / FAT32X Yes (from DOS 7.10) Yes Yes Yes (from Windows 95 OSR2) Yes (from Windows 2000) Yes? Yes Yes Yes No Yes ? Yes
GFS No Yes ? No No No No ? ? ? ? ? No
HPFS Partial (with third-party drivers) Yes ? No Partial (with NT 3.1 to 4.0 only) ? Yes Yes (from OS/2 1.2) ? No ? ? No
NTFS Partial (with third-party drivers) Needs Paragon NTFS kernel driver or ntfs-3g Read only, write support needs Paragon NTFS or ntfs-3g Needs 3rd-party drivers like Paragon NTFS for Win98, DiskInternals NTFS Reader Yes No Yes with ntfs-3g ? Yes with ntfs-3g No Yes with ntfs-3g ? With third party tools
Apple HFS No Yes No write support since Mac OS X 10.6 and no support at all since macOS 10.15 No Needs Paragon HFS+ [91] Yes No ? Yes No ? No No
Apple HFS Plus No Partial — writing support only to unjournalled FS Yes No Needs Paragon HFS+ [91] Yes from Mac OS 8.1 No ? with addon No ? No No
FFS No ? Yes No ? ? Yes ? ? ? ? ? No
UFS1 No Partial — read only Yes No Partial (with ufs2tools, read only) ? Yes No ? ? Yes ? No
UFS2 No Yes Yes No Partial (with ufs2tools, read only) ? Yes No ? ? ? ? No
LFS No ? ? No No ? No No ? ? ? ? No
ext No Yes — until 2.1.20 No No No No No No No No No No No
Xiafs No Yes — until 2.1.20

Experimental port available to 2.6.32 and later [92][93]

No No No No No No No No No No No
ext2 No Yes Needs Paragon ExtFS [94] or ext2fsx Partial (read-only, with explore2fs)[95] Needs Paragon ExtFS [96] or partial with Ext2 IFS[97] or ext2fsd[98] No Yes No Yes ? ? ? No
ext3 No Yes Needs Paragon ExtFS [94] or partial with ext2fsx (journal not updated on writing) Partial (read-only, with explore2fs)[95] Needs Paragon ExtFS [96] or partial with Ext2 IFS[97] or ext2fsd[98] Partial (read only)[citation needed] Yes[99] No with addon ? Yes ? Yes
ext4 No Yes Needs Paragon ExtFS [94] No Needs Paragon ExtFS [96] or partial with Ext2 IFS[97] or ext2fsd[98] ? Yes since FreeBSD 12.0[99] No with addon ? ? ? Yes
NOVA No Yes No No No No No No No No No No No
Lustre No Yes[100] ? No No ? No ? ? ? Yes ? No
NILFS No Yes as an external kernel module ? No ? ? No ? ? ? ? ? No
F2FS No Yes No No No No No No No No No No Yes
ReiserFS No Yes ? No No ? Partial — Read Only from 6.0 to 10.x[101] and dropped in 11.0[102][103] ? with addon ? ? ? No
Reiser4 No Yes with a kernel patch ? No No ? No ? ? ? ? ? No
SpadFS No Yes No No No No ? No No No No No No
OCFS No Yes ? No No ? No No ? ? ? ? No
OCFS2 No Yes ? No No ? No No ? ? ? ? No
XFS No Yes ? No No ? Partial ? with addon (read only) ? ? ? No
JFS No Yes ? No No ? No Yes ? ? ? ? No
QFS No Partial — client only[104] ? No No ? No No ? ? Yes ? No
Be File System No Partial — read-only ? No No ? No No Yes ? ? ? No
NSS No Yes via EVMS[ct] ? No No ? No No ? ? ? ? No
NWFS Partial (with Novell drivers) ? ? No No ? Yes No ? ? ? ? No
ODS-2 No ? ? No No ? No No ? ? ? ? No
ODS-5 No ? ? No No ? No No ? ? ? ? No
UDF No Yes Yes ? Yes ? Yes ? ? ? Yes ? No
VxFS No Yes ? No No ? No No ? ? Yes ? No
Fossil No Yes[cu] Yes[cu] No No No Yes[cu] No No No Yes[cu] ? No
ZFS No Yes with FUSE[105] or as an external kernel module[106] Yes with Read/Write Developer Preview[107] No Yes[108] No Yes No No No Yes No No
Btrfs No Yes ? No Yes with WinBtrfs[109] ? No ? ? ? ? ? No
VMFS2 No ? ? No No ? No No ? ? ? ? No
VMFS3 No ? ? No No ? No No ? ? ? ? No
IBM HFS No No No No No No No No No No No Yes No
IBM zFS No No No No No No No No No No No Yes No
ReFS No Needs Paragon ReFS for Linux ? No Yes (from Windows Server 2012 and from Windows 8.1) ? ? ? ? ? ? ? No
ISO 9660 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No
Rock Ridge No Yes Yes No No No Yes No No Yes Yes ? No
Joliet («CDFS») No Yes Yes Yes Yes ? Yes Yes Yes ? Yes ? No
SquashFS No Yes Partial (There are ports of unsquashfs and mksquashfs.) No Partial (There are ports of unsquashfs and mksquashfs.) No Partial (There are ports of unsquashfs and mksquashfs and fusefs-port.[110][111]) No No No No No No
BlueStore/Cephfs No Yes No[cv] No No[cw] No No[cv] No No No No No No
File system DOS Linux macOS Windows 9x Windows NT «classic» Mac OS FreeBSD OS/2 BeOS Minix Solaris z/OS Android

Improve Article

Save Article

  • Read
  • Discuss
  • Improve Article

    Save Article

    File System in Linux :
    Linux supports more than 12 file systems with NFS technology. When Linux (that is, operating system code) is linked, the default file system option needs to be specified. other file systems can be called dynamically depending on requirements. Ext file system is the most popular option. It is similar to the Berkeley file system.

    This file system assumes that the disk begins with a boot block and then the disk is created from a series of other blockgroups. Block groups are numbered sequentially, and contain several subfields.

    The overall organization is shown in figure.

    The details of the sub-fields in a block group are as follows-

    1. Super Block – Specifies the number of blocks, the number of i-nodes, block size etc.
    2. Group Description – Contains information about the bitmap location, number of free blocks, i-nodes, directories in the group, etc.
    3. Block Bitmap – Contains a list of free blocks.
    4. I-node Bitmap – Contains a list of free I-nodes.
    5. I-nodes – These are the actual i-nodes. Each I-node is 128 byte long.

    Linux supports the following file types-

    1. Directory – This is simply a list of names.
    2. Ordinary File – This is a file containing data or application program or executable.
    3. Symbolic Link – This file is actually a link to (or path of) another file.
    4. Special File – This refers to a device driver.
    5. Named pipe – This is a common channel between two or more processes for data exchange.

    File System in Windows :- Windows 2000 (W2K) supports a number of file systems including the file allocation table (FAT) that runs on Windows 95, MS-DOS and OS/2. But the developers of W@K also designed a new file system, the W2K file system (NTFS), that is intended to meet high-end requirements for workstations and servers.

    Examples of high-end applications include the following-

    1. Client/server applications such as file servers, computer servers and database servers.
    2. Resource-intensive engineering and scientific applications.
    3. Network applications for large corporate systems.

    Key Features of NTFS :
    NTFS is a flexible and powerful file system, built on a simple file system model. The most notable features of NTFS include the following-

    1. Recoverability
    2. Security
    3. Large disks and large files
    4. Multiple data streams
    5. General Indexing Facility

    NTFS Volume and File Structure :
    NTFS makes use of the following disk storage concepts-

    1. Sector :
      The smallest physical storage unit on the disk. The data size in bytes is a power of 2 and is almost always 512 bytes.
    2. Cluster :
      One or more contiguous (next to each other on the same track) sectors. The cluster size in sectors is a power of 2.
    3. Volume :
      A logical partition on a disk, consisting of one or more clusters and used by a file system to allocate space. At any time, a volume consists of a file system information, a collection of files, and any additional unallocated space remaining on the volume that can be allocated to files. A volume can be all or a portion of a single disk or it can extend across multiple disks. If hardware or software RAID 5 is employed, a volume consists of stripes spanning multiple disks.

    Linux’s file system has quite a few differences from the Windows file system. You won’t find any drive letters or backslashes, but you will find an alien-looking layout where files can have the same name, differing only in capitalization.

    This isn’t an exhaustive list. It is intended for new Linux users who aren’t aware of all the differences between Linux and Windows. There are many more differences that apply.

    Directory Structure

    You won’t find any Windows, Program Files, or Users folders if you start browsing around the file system on your Linux computer. (Although the /home/ directory is very similar to the Users folder.)

    The Linux directory structure doesn’t just use different names for folders, it uses an entirely different layout. For example, on Windows, an application might store all its files in C:Program FilesApplication. On Linux, its files would be split between multiple locations – its binaries in /usr/bin, its libraries in /usr/lib, and its configuration files in /etc/.

    We have explained what each directory on the Linux file system is and what it’s for. For the details, read: HTG Explains: The Linux Directory Structure Explained

    Case Sensitivity

    On Windows, you can’t have a file named file and another file named FILE in the same folder. The Windows file system isn’t case sensitive, so it treats these names as the same file.

    On Linux, the file system is case sensitive. This means that you could have files named file, File, and FILE in the same folder. Each file would have different contents – Linux treats capitalized letters and lower-case letters as different characters.

    Backslashes vs. Forward Slashes

    Windows uses backslashes, just as DOS did. For example, the path to a user’s directory on Windows is:

    C:UsersName

    On Linux, the path to a user’s home directory is:

    /home/name

    You will also notice that URLs in your web browser – even on Windows – use forward slashes. For example, it’s https://www.howtogeek.com/article, not http:\www.howtogeek.comarticle.

    No Drive Letters – It’s All Under /

    Windows exposes partitions and devices at drive letters. Whether you have multiple hard drives, multiple partitions on the same hard drive, or removable devices connected, each file system is available under its own drive letter.

    Linux doesn’t have drive letters. Instead, it makes other file systems accessible at arbitrary directories. (Windows can do this too, but this isn’t how it works out of the box.)

    On Linux, everything is under / – the root directory. There are no files above the root directory, as there are files outside of C: on Windows. When you connect a device to your computer, it will become available under /media/. The contents of the directory display the contents of the mounted partition.

    If you have multiple hard drives or hard drive partitions, you could mount them anywhere you like on your file system. For example, you could place your home directories on a separate partition by mounting another partition at /home. However, you could mount a partition anywhere you like – you could even mount it at /myBackupDrive.

    Everything is a File

    Just as every mounted file system is a directory under / (the root directory), everything on Linux is a file. For example, your first hard drive is represented by /dev/sda, your CD drive is available at /dev/cdrom, while your mouse is represented by /dev/mouse.

    This phrase is actually a bit of an oversimplification – everything isn’t really a file on Linux. But understanding what this phrase means will help you understand how Linux works. To learn more, read: HTG Explains: What “Everything Is a File” Means on Linux

    You Can Delete or Modify Open Files

    On Linux and other UNIX-like operating systems, applications don’t lock exclusive access to files as often as they do on Windows. For example, let’s say you’re watching a video file in VLC on Windows. The credits are playing and you’re done watching it, so you try to delete it. You’ll see an error message- – you need to stop watching the file in VLC before you can delete it, rename it, or do anything else to it.

    On Linux, you could generally delete or modify the video file as it was playing. You won’t see error messages saying the file is in use.


    These differences should apply to other UNIX-like operating systems, too. There may be some differences, however – for example, Mac OS X isn’t case-sensitive. It’s case-insensitive, just like Windows.

    READ NEXT

    • › The 6 Best Lightweight Linux Distros
    • › How to Change Your Age on TikTok
    • › The New HP Pro x360 Fortis Is a 2-In-1 Laptop Under $500
    • › How to Screen Record on iPhone
    • › This Huge Curved Ultrawide Monitor From LG Is $337 Today
    • › PSA: You Can Email Books and Documents to Your Kindle
    • › Get PC Power With Tablet Portability in the Surface Pro 9 for $200 Off

    A computer’s file system is a method of storing and organizing computer data, which makes it easy to access and find. A file system uses the abstract logical concept of files and tree directories instead of using the concept of data blocks for physical devices such as hard disks and CD-ROMs, so that users using a file system to save data do not have to care about how much data is actually saved on the hard disk (or CD-ROM) at the address of the data block, but only need to You only need to remember the directory and file name of the file. Before writing new data, the user does not have to care about which block address on the hard disk is not used, the storage space management (allocation and release) function on the hard disk is done automatically by the file system, the user only needs to remember which file the data is written to.

    Strictly speaking, a file system is a set of abstract data type that implements operations such as storage, hierarchical organization, access and retrieval of data.

    Linux file system

    The basic components of Linux I/O: everything is a file

    Things in Linux like documents, directories (called folders under Mac OS X and Windows), keyboards, monitors, hard disks, removable media devices, printers, modems, virtual terminals, and input/output resources like inter-process communication (IPC) and network communication are all streams of bytes defined in file system space. The most significant benefit of everything being considered a file is that for the input/output resources listed above, only the same set of Linux tools, utilities and APIs are required. you can use the same set of api’s (read, write) and tools (cat , redirect, pipe) for most resources in unix.

    Everything is a file means that for all file (directories, character devices, block devices, sockets, printers, etc.) operations, reading and writing can be handled with functions like fopen()/fclose()/fwrite()/fread(). The hardware distinction is masked, and all devices are abstracted into files, providing a unified interface to the user. Although the types are different, the same set of interface is provided for them. Further, operations on files can also be performed across file systems.

    The disadvantage of everything being a file is that to use any hardware device you have to perform a mount operation with a directory in the root directory, otherwise you can’t use it. We know that Linux itself has a file directory structure with the root directory as the root of the tree, and so does each device, which is independent of each other. If we want to find the directory structure of the device files through the root directory on Linux, we have to merge these two file system directories into one, and that is what mounting really means.

    File System

    VFS, a software layer in the Linux kernel, is used to provide a file system interface to user-space programs; it also provides an abstraction in the kernel that allows different file systems to coexist. All file systems in the system not only rely on VFS to coexist, but also to work together. In addition to the standard Linux file systems Ext2/Ext3/Ext4, Windows’ vfat NTFS, etc., there are many other file systems such as reiserfs, xfs, and the network file system nfs. Linux provides support for these file systems through VFS, an intermediate layer.

    VFS, upwards, provides a standard file manipulation interface to the application layer. Downward, it provides a standard interface to file systems so that file systems from other operating systems can be easily ported to Linux.

    VFS provides as large a generic model of the underlying file system as possible, making this model contain an ensemble of all file system functions. Thus VFS encapsulates all the functionality and abstractions of the underlying file system, and VFS is responsible for forwarding requests from the application layer to a specific file system.

    Most current Linux filesystems use the ext4 filesystem by default, just as previous Linux distributions used ext3, ext2, and the older ext by default.

    Disks

    Disk refers to the system’s storage device, commonly mechanical hard drives, solid state drives, etc. If it is found that the data the application wants to read is not in the page cache, it is time to actually initiate an I/O request to the disk. The process of disk I/O goes through the generic block layer of the kernel, the I/O scheduling layer, the device driver layer, and finally to the specific hardware device for processing.

    • Generic block layer. Receives disk requests from the upper layer and eventually issues I/O requests. It is similar to the role of VPS.
    • I/O Scheduling Layer. Merges and sequences requests according to the set scheduling algorithm. Disk requests that cannot be received are immediately handed off to the driver layer for processing.
    • Block device driver layer. Depending on the specific physical device, the corresponding driver is selected to complete the final I/O request by manipulating the hardware device.

    A Brief History of EXT

    MINIX File System

    Before ext was available, the MINIX file system was used. If you are not familiar with the history of Linux, it is understood that MINIX was a very small Unix-like system for IBM PC/AT microcomputers. Andrew Tannenbaum developed it for educational purposes and released the source code (in print format!) in 1987. .

    Although you can read the source code of MINIX in detail, it is not actually free and open source software (FOSS). The publisher of Tannebaum’s book required you to pay a $69 license fee to run MINIX, which was included in the cost of the book. Nevertheless, it was very inexpensive for the time, and the use of MINIX grew rapidly, quickly outstripping Tannebaum’s original intent to use it to teach operating system coding. Throughout the 1990s, you could find MINIX installations in universities all over the world. At this time, a young Linus Torvalds used MINIX to develop the original Linux kernel, which was first announced in 1991 and then released under the GPL open source agreement in December 1992.

    MINIX had its own filesystem, which early versions of Linux relied on. Like MINIX, the Linux file system was as small as a toy; the MINIX file system could handle file names of up to 14 characters and only 64 MB of storage space. By 1991, the average hard drive size had reached 40-140 MB, and it was clear that Linux needed a better file system.

    ext

    While Linus was developing the fledgling Linux kernel, Rémy Card worked on the first generation of the ext file system. ext was first implemented and released in 1992, and ext used the new Virtual File System (VFS) abstraction layer in the Linux kernel. Unlike the previous MINIX file system, ext could handle up to 2 GB of storage and handle 255 character file names, solving the worst problems of the MINIX file system. But ext did not dominate for long, mainly due to its primitive timestamps (only one timestamp per file, rather than the familiar timestamp with inode, most recent file access time, and latest file modification time we are familiar with today.) Just a year later, ext2 replaced it.

    ext2

    Rémy soon realized the limitations of ext, so a year later he designed ext2 to replace it. While ext was still rooted in a “toy” operating system, ext2 was designed from the start as a commercial-grade filesystem, following the design principles of BSD’s Berkeley filesystem. ext2 offered a maximum file size at the GB level and a filesystem size at the TB level, putting it firmly in the big league of filesystems in the 1990s. ext2 was firmly entrenched in the file system league in the 1990s. It was soon widely used, both in the Linux kernel and eventually in MINIX, and third-party modules were used to make it available for MacOS and Windows.

    But there were still some problems to be solved here: the ext2 file system, like most file systems of the 1990s, was prone to catastrophic data corruption if the system crashed or lost power while writing data to disk. Over time, they also suffered severe performance losses due to fragmentation (a single file stored in multiple locations, physically its scattered across a spinning disk). Despite these problems, today ext2 is used in some special cases. Most commonly, as a file system format for portable USB drives

    ext3

    In 1998, six years after ext2 was adopted, Stephen Tweedie announced that he was working on improving ext2. This became ext3, and was adopted into the Linux kernel mainline in November 2001 in kernel version 2.4.15.

    For the most part, ext2 worked well in Linux distributions, but like FAT, FAT32, HFS and other file systems of the time, it was prone to catastrophic damage in the event of a power failure. If a power failure occurs while writing data to a filesystem, it can be left in what is called an “inconsistent” state — where things are only half done and the other half is not. This can result in the loss or corruption of a large number of files that are unrelated to the file being saved or even cause the entire file system to be unmountable.

    ext3 and other file systems from the late 1990s, such as Microsoft’s NTFS, use logs to solve this problem. A log is a special allocated area on disk whose writes are stored in a transaction; if that transaction completes a disk write, the data in the log is committed to the file system itself. If the system crashes before that operation is committed, the restarted system recognizes it as an incomplete transaction and rolls it back as if it had never happened. This means that the files being processed may still be lost, but the file system itself remains consistent and all other data is safe.

    Three levels of logging are implemented in Linux kernels using the ext3 file system: journal, ordered, and writeback.

    • journal: the lowest risk mode, writes data and metadata to the journal before committing it to the file system. This ensures that the file being written is consistent with the entire file system, but it significantly reduces performance.
    • Sequential : The default mode for most Linux distributions; sequential mode writes metadata to the log and commits the data directly to the file system. As the name implies, the order of operations here is fixed: first, metadata is committed to the log; second, data is written to the file system before the metadata associated with the log is updated to the file system. This ensures that metadata associated with incomplete writes remains in the log in the event of a crash, and that the file system can clean up those incomplete write transactions when the log is rolled back. In sequential mode, a system crash may cause errors in files to be actively written during the crash, but the file system itself – and the files that were not actively written – are guaranteed to be safe.
    • Write-back: The third mode – and the least secure – logging mode. In write-back mode, like sequential mode, metadata is recorded to the log, but data is not. Unlike sequential mode, both metadata and data can be written in any order that is conducive to getting the best performance. This can significantly improve performance, but is much less secure. While write-back mode still guarantees the security of the file system itself, files written before a crash or collapse can easily be lost or corrupted.

    Similar to ext2 before it, ext3 uses 16-bit internal addressing. This means that ext3 can handle a maximum file size of 2 TiB on a file system with a maximum size of 16 TiB for a 4K block size.

    ext4

    Theodore Ts’o (who was the lead developer of ext3 at the time) published ext4 in 2006, which was added to the Linux mainline two years later in kernel version 2.6.28. Ts’o describes ext4 as an interim technology that significantly extends ext3 but still relies on older technologies. Ts’o describes ext4 as an interim technology that significantly extends ext3 but still relies on older technologies. He expects that ext4 will eventually be replaced by a true next-generation file system.

    ext4 is functionally very similar to ext3 in terms of features, but supports large filesystems, improved resistance to fragmentation, higher performance, and better timestamps.

    Differences between ext3 and ext4:

    • Backward compatibility
      • ext4 is specifically designed to be as backwards compatible with ext3 as possible. this not only allows ext3 filesystems to be upgraded to ext4 in-place; it also allows ext4 drivers to automatically mount ext3 filesystems in ext3 mode, thus making it unnecessary to maintain two separate codebases.
    • Large file systems
      • ext3 filesystem uses 32-bit addressing, which limits it to supporting only 2 TiB file sizes and 16 TiB filesystem system sizes (this assumes a block size of 4 KiB; some ext3 filesystems use smaller block sizes and are therefore further limited to them).
      • ext4 uses 48-bit internal addressing and can theoretically allocate files up to 16 TiB in size on the filesystem, where the filesystem size can be up to 1,000,000 TiB (1 EiB).
    • Allocation improvements
      • ext4 makes significant improvements to the way blocks are allocated before they are written to disk, which can significantly improve read and write performance.
    • Sections
      • A segment (extent) is a series of contiguous physical blocks (up to 128 MiB, assuming a block size of 4 KiB) that can be reserved and addressed at once. Using sectors reduces the number of inodes required for a given file and significantly reduces fragmentation and improves performance when writing large files.
    • Multiblock Allocation
      • ext3 calls the block allocator once for each newly allocated block. When multiple writes open the allocator at the same time, it can easily lead to severe fragmentation. However, ext4 uses deferred allocation, which allows it to consolidate writes and better determine how to allocate blocks for writes that have not yet been committed.
    • Persistent pre-allocation
      • When pre-allocating disk space for a file, most file systems must write zeros to that file’s blocks at creation time. ext4 allows for the alternative use of fallocate(), which guarantees the availability of space (and tries to find contiguous space for it) without writing to it first. This significantly improves the performance of writing and future reading of written data from streams and database applications.
    • Delayed allocation
      • This is an intriguing and controversial feature. Deferred allocation allows ext4 to wait to allocate the actual block of data that will be written until it is ready to commit the data to disk. (By contrast, ext3 allocates blocks immediately even if data is still being written to the write cache.) Delaying block allocation allows the file system to make better choices about how to allocate blocks as data accumulates in the cache, reducing fragmentation (writes and, later, reads) and significantly improving performance. Unfortunately, however, it increases the possibility of data loss for programs that have not yet called the fsync() method specifically (when the programmer wants to ensure that the data is completely flushed to disk).
    • Unlimited subdirectories
      • ext3 is limited to 32,000 subdirectories; ext4 allows an unlimited number of subdirectories. Starting with the 6.23 kernel release, ext4 uses HTree indexing to reduce the performance loss of large numbers of subdirectories.
    • Log validation
      • ext3 does not perform checksumming of logs, which causes problems for controller devices with disks or self-contained caches that are outside the direct control of the kernel. If a controller or disk with its own cache is out of write order, it could break ext3’s journaling transaction order, potentially destroying files written during (or some time before) a crash. In theory, this problem could improve performance (and performance benchmarks against competitors) using write barriers, but increases the likelihood of data corruption that should be prevented.
      • Checksumming the logs and allowing the file system to realize that some of its entries are invalid or out of order when it is first mounted after a crash. Thus, this avoids the error of rolling back partial entries or out-of-order log entries and further corrupting the file system – even if parts of the storage device falsely do or do not comply with write barriers.
    • Fast filesystem checks
      • Under ext3, the entire filesystem is checked when fsck is called – including deleted or empty files. In contrast, ext4 marks blocks and sectors in the inode table as unallocated, thus allowing fsck to skip them entirely. This greatly reduces the time it takes to run fsck on most file systems, and it was implemented in kernel 6.24.
    • Improved timestamps
      • ext3 provides timestamps at a granularity of one second. While sufficient for most purposes, mission-critical applications often require tighter time control. ext4 makes it possible to use it for those enterprise, scientific, and mission-critical applications by providing timestamps at the nanosecond level.
      • The ext3 file system also does not provide enough bits to store dates after January 18, 2038. ext4 adds two bits here, extending the Unix epoch by 408 years. If you’re reading this in 2446 AD, you’ve probably moved to a better file system – if you’re still measuring time since January 1, 1970 at 00:00 (UTC), this will give me peace of mind when I die.
    • Online defragmentation
      • Neither ext2 nor ext3 directly support online defragmentation – that is, they defragment the filesystem when mounted. ext2 has an included utility, e2defrag, whose name implies – it needs to be run offline when the filesystem is not offline when the filesystem is unmounted. (Obviously, this is very problematic for the root filesystem.) The situation is even worse in ext3 – while ext3 is less susceptible to severe fragmentation than ext2, running e2defrag on ext3 filesystems can lead to catastrophic corruption and data loss.
      • Although ext3 was initially considered “fragmentation free”, the use of massively parallel write processes for the same file (e.g. BitTorrent) clearly shows that this is not entirely the case. There are some user-space means and workarounds, but they are slower and less satisfactory in every way than a true, filesystem-aware, kernel-level defragmentation process.
      • ext4 solves this problem with e4defrag and is an online, kernel-mode, filesystem-aware, block- and sector-level defragmentation utility.

    On-going ext4 development

    While the lead developers of ext consider it only a stopgap measure for a true next-generation file system, there are no likely candidates ready (due to technical or licensing issues) to be deployed as a root file system for some time. There are still some key features to be developed in future versions of ext4, including metadata checksums, first-class quota support, and large allocation blocks.

    • Metadata checksums
      • Since ext4 has redundant superblocks, it provides a way for the file system to checksum the metadata within them, determining for itself whether the primary superblock is corrupted and requires the use of a spare block. It is possible to recover from a corrupted superblock without a checksum – but the user first needs to realize that it is corrupted and then try to mount the filesystem manually using the alternate method. Since in some cases mounting a file system read/write with a corrupt primary superblock may cause further damage that even experienced users cannot avoid, this is not a perfect solution either!
      • The metadata checksum of ext4 is very weak compared to the extremely powerful per-block checksums offered by next-generation file systems such as Btrfs or ZFS. But it’s better than nothing. While checksumming everything sounds simple! – in fact, there are some significant challenges in linking checksums to the filesystem.
    • First-class quota support
      • Quotas? We’ve had these since the day ext2 came along! Yes, but they’ve always been an afterthought to add things, and they’ve always been guilty of being silly. It’s probably not worth going into detail here, but the design docs list the ways in which quotas will move from user space to the kernel and can be implemented more correctly and efficiently.
    • Large allocation blocks
      • Those pesky storage systems keep getting bigger and bigger as time goes on. Since some SSDs already use 8K hardware block sizes, ext4’s current limit on 4K blocks is becoming increasingly restrictive. Larger blocks can significantly reduce fragmentation and improve performance at the cost of increased “slack” space (the space left over when you only need a portion of a block to store the last piece of a file or files).

    ext4’s practical limitations

    ext4 is a robust and stable filesystem. Most people today should be using it as a root filesystem, but it can’t handle all the demands. Let’s briefly touch on some things you shouldn’t expect – now or possibly in the future.

    While ext4 can handle data up to 1 EiB in size (equivalent to 1,000,000 TiB), you really shouldn’t try to do so. In addition to being able to remember the addresses of many more blocks, there are issues with scale. And right now ext4 will not handle (and probably never will) more than 50-100 TiB of data.

    ext4 is also insufficient to guarantee data integrity. With significant advances in logging it is back to a time when ext3 did not cover many of the common causes of data corruption. If data has been corrupted on disk – due to faulty hardware, the effects of cosmic rays (yes, really), or just data degradation over time – ext4 cannot detect or repair that corruption.

    Based on the above two points, ext4 is just a pure file system, not a storage volume manager. This means that even if you have multiple disks – that is, parity or redundancy – you could theoretically recover corrupted data from ext4, but there is no way to know if using it would be to your advantage. While it is theoretically possible to separate the file system and storage volume management system in separate layers without losing automatic corruption detection and repair capabilities, this is not how current storage systems are designed, and it would present significant challenges for new designs.

    Other file systems under Linux

    XFS

    XFS has the same status as a non-ext filesystem in the mainline in Linux. It is a 64-bit logging file system that has been built into the Linux kernel since 2001, providing high performance for large file systems and high concurrency (i.e., a large number of processes all writing to the file system immediately). Starting with RHEL 7, XFS became the default file system for Red Hat Enterprise Linux. For home or small business users, it still has some drawbacks: retooling an existing XFS file system is a huge pain, and it makes less sense to create another one and replicate the data.

    While XFS is stable and high-performance, there are not enough specific end-use differences between it and ext4 to warrant recommending its use anywhere other than by default (e.g. RHEL7), unless it solves a specific problem for ext4, such as file systems larger than 50 TiB capacity. XFS is not in any way a “next generation” file system to ZFS, Btrfs, or even WAFL (a proprietary SAN file system). Like ext4, it should be seen as a stopgap for a better way.

    ZFS

    Developed by Sun Microsystems, ZFS is named after the zettabyte – the equivalent of 1 trillion gigabytes – because it can theoretically address large storage systems. As a true next-generation file system, ZFS offers volume management (the ability to handle multiple individual storage devices in a single file system), block-level cryptographic checksums (allowing for extremely accurate data corruption detection), automatic corruption repair (where redundant or parity-checked storage is available), fast asynchronous incremental replication, inline compression, and more.

    The biggest problem with ZFS from the Linux user’s point of view is the license, which is a CDDL license, a semi-licensed license that conflicts with the GPL. There is a lot of controversy about the implications of using ZFS in the Linux kernel, ranging from “it’s a GPL violation” to “it’s a CDDL violation” to “it’s perfectly fine, it hasn’t been tested in court. It hasn’t been tested in court.” Most notably, Canonical has had ZFS code inlined in its default kernel since 2016, and there has been no legal challenge.

    Btrfs

    Btrfs is short for B-Tree Filesystem, often pronounced “butter” – released by Chris Mason in 2007 during his tenure at Oracle. Btrfs is intended to have most of the same goals as ZFS, providing multiple device management, per-block checksums, asynchronous replication, inline compression, and more.

    As of 2018, Btrfs is fairly stable and can be used as a standard single-disk file system, but should probably not rely on a volume manager. It has serious performance issues compared to ext4, XFS, or ZFS in many common use cases, and its next-generation features – replication, multi-disk topology, and snapshot management – can be so numerous that the results can range from catastrophic performance degradation to actual data loss.

    The maintenance status of Btrfs is controversial; SUSE Enterprise Linux adopted it as the default file system in 2015, and Red Hat announced in 2017 that it would no longer support Btrfs starting with RHEL 7.4. It may be worth noting that the product supports Btrfs deployments as single-disk file systems, rather than multi-disk volume managers as in ZFS. volume manager, even Synology uses Btrfs for its storage devices, but it manages disks in layers on top of traditional Linux kernel RAID (mdraid).

    Mac OS file system

    Mac OS has a long history of development and has gone through many different file systems. The more famous file systems: UFS, HFS+, and APFS.

    UFS

    In 1985, Steve Jobs left Apple and founded NeXT, which developed the NeXTSTEP operating system based on BSD, the predecessor of the now familiar Mac OS. This was the most advanced file system at the time, and had a huge impact on the design of later file systems.

    UFS, or the Unix File System, also known as the Berkeley Fast File System, was not an Apple original, but was first published in 1984 by Marshall Kirk McKusick and William Joy (founders of Sun). UFS is arguably the progenitor of the modern file system, making it truly usable in production environments. While pre-UFS file systems used up to 5% of the disk bandwidth, UFS increased that number to 50%. This is primarily due to two design features in UFS.

    • Increasing the base block size from 1024 bytes to 4096 bytes
    • The addition of the Cylinder Group concept, which optimizes the distribution of data and metadata on the disk and reduces the number of head seeks when reading and writing files (reducing the number of head seeks is a major performance optimization direction for HDD-era file systems)

    The disk layout for UFS is shown above. The disk is divided into multiple Cylinder Groups, each of which contains a copy of the Superblock and the meta-information inside the Cylinder Group. If the Inode and Data Block are placed next to each other on the disk, it means that no additional seek time is needed.

    UFS was first implemented on BSD systems, and has since been ported to Unix operating systems such as Sun’s Solaris, IBM’s System V, and HP-UX, including many storage products from the current storage giant EMC, where the operating system is Unix and the file system is based on UFS. There is no UFS implementation on Linux, but the famous ext2 file system is heavily based on UFS in its design. Ext3 and ext4 were extensions of the ext2 design, and also inherited UFS ideas.

    In February 1997, Apple completed its acquisition of NeXT, and Steve Jobs returned to Apple. UFS support remained in the Mac OS until Mac OS X Lion, when it was removed.

    HFS+

    UFS did not remain the default file system in Mac OS for long after Apple acquired NeXT. In January 1998, one year after Apple acquired NeXT, Mac OS 8.1 was released with the HFS Plus (HFS+) file system to replace UFS. By design, HFS+ had a number of improvements over its predecessor, including a 16-bit to 32-bit upgrade, Unicode support, maximum file support of 2^63 bytes, and more. The most attractive feature of HFS+ is Time Machine. Anyone who has used the Time Machine feature knows that it is a very cool and useful feature that can be used to roll back a file system to a previous point in time, to back up a file system, to retrieve historical versions of files, and to do system migrations.

    Despite this, HFS+ is a controversial file system, and has even been denounced by Linus as the worst file system ever made. The main criticisms of HFS+ are the following.

    • case insensitivity (the latest version supports case sensitivity, but the default configuration is still not case insensitive)
    • no checksum verification of data content
    • timestamp is only supported down to the second level
    • concurrent access is not supported
    • Snapshots are not supported
    • sparse file is not supported
    • Use big-endian for storage

    From a technical point of view, HFS+ doesn’t look like a modern file system at all. Although it can do cool things like Time Machine, it is too backward and has too many hard parts compared to other file systems, such as case insensitivity and no support for Sparse File. So HFS+ can hardly be called a good file system.

    APFS

    In 2017, Apple officially released the Apple File System with the Mac OS High Sierra release, and at WWDC 2016, Apple already announced the APFS project. To distinguish it from AFS (Apple File Service), APFS is used as an acronym.

    HFS is the predecessor of HFS+, which was designed in 1985, more than 30 years ago. With the development of CPU, memory, and storage media technologies, the hardware we use today has changed dramatically compared to 30 years ago. CPUs have evolved in the direction of multi-core, memory capacity has increased and single machines can now support terabytes of memory, and storage media has gradually shifted from HDDs to SSDs. After 30 years of development, HFS has reached the end of its technical life and it is very difficult to improve HFS anymore.

    Starting in 2014, under Giampaolo’s leadership, Apple began designing and developing a new file system, APFS, which was not based on an existing file system, but rather built from the ground up and released and brought online in just three years, when it typically takes at least 10 years for a file system to go from development to stability.

    Apple’s requirements for the new file system were as follows.

    • Be adaptable to multiple application scenarios, from smartwatches, to smartphones, to laptops
    • Secure and reliable data
    • Ability to take advantage of multi-core CPUs and the concurrency of new hardware devices

    At the same time, APFS offers more features than HFS+.

    • Guaranteed crash safe
    • 64-bit file system (HFS+ is a 32-bit file system)
    • sparse file support (HFS+ does not support sparse file!)
    • Scalable metadata design
    • Snapshot and clone support
    • Metadata support for checksum checksum

    Mac OS users who upgrade to High Sierra will automatically upgrade their file system from HFS+ to APFS, which is possible because Apple has designed a clever upgrade process.

    • Read the Inode from the disk in the HFS+ format
    • Find a free space on the disk and write the new Inode to the free space in APFS format
    • Modify the Superblock on disk, write the new Superblock to disk in APFS format, and the new Superblock will index the APFS Inode and free up the space occupied by the original HFS+ Inode

    In terms of performance, although Apple claims that APFS is optimized for SSDs, a number of websites have tested the performance of APFS and found that APFS performance on SSDs is lower than HFS+.

    Windows file system

    The common file system formats under Windows are: FAT32, NTFS, exFAT

    FAT32

    Windows platform’s traditional file format universal format, any USB storage device will be pre-installed this file system, can be used on any operating platform. Windows 95 version 2 was first introduced to replace FAT16 (support file maximum capacity of 2GB), compatibility is very good, but the disadvantage is that there is a limit on the file size, does not support more than 4GB files. So, for many large games, image files, compressed packages, videos, it is not a solution. In addition, the maximum capacity of the FAT32 format hard drive partition is 2TB, FAT32 is behind the times, so don’t use it if you can. Now when formatting a USB drive, FAT32 is still the default operation, as is Windows 10, more for conservative considerations of compatibility.

    exFAT

    The most suitable file format for USB flash drives, which is tailored by Microsoft for flash USB flash drives, with advanced performance and technical support, while optimizing protection for flash memory without causing excess damage.

    exFAT (Extended File Allocation Table File System, also known as FAT64, i.e. Extended File Allocation Table) is a format introduced by Microsoft in Windows Embeded 5.0 and above (including Windows CE 5.0, 6.0, Windows Mobile5, 6, 6.1), a file system suitable for flash memory, was introduced to solve the problem that FAT32 and others do not support 4G and larger files. For flash memory, NTFS file system is not suitable for use, exFAT is more suitable. The main benefits include: enhanced interoperability between desktops/laptops, mobile devices, maximum 16EB for a single file, improved space allocation lines in the remaining space allocation table, up to 65536 files in the same directory, and support for access control. The biggest disadvantage is that there is no file logging feature, so that the modification records of files on the disk cannot be recorded.

    exFAT uses the remaining space bitmap to manage capacity allocation and improve deletion performance, which is important to improve write performance, especially compared to NTFS. but note that it is not possible to install Windows on exFAT partitions. both Windows Vista/7 rely heavily on NTFS for features such as file licensing. However, due to the limitations of Microsoft’s licensing mechanism, exFAT is not widely available and is not particularly used in consumer electronics.

    NTFS

    The most widely used format for Windows platform is also the best available, supporting large capacity files and very large partitions, and has many advanced technologies including long file names, compressed partitions, event tracking, file indexing, high fault tolerance, data protection and recovery, encrypted access, etc. However, NTFS is still designed for mechanical hard drives and will record detailed hard drive read and write operations, so it can be very burdensome and harmful for flash memory (such as USB drives, SSDs, SD cards, etc.) and can easily affect the lifetime. Flash memory storage chips are limited in the number of reads and writes, and using a logging file system means that all operations on the disk are logged. The large number of small files read and write is extremely harmful to the flash memory and will shorten its life. That’s why NTFS is not recommended for USB drives.

    Why do computers still use the NTFS file system designed for mechanical disks when using solid state drives? Because there is no better choice!

    ReFS

    Resilient File System (ReFS). It is a proprietary file system introduced by Microsoft in Windows Server 2012 and is intended to be the “next generation” file system after NTFS, which is designed to overcome the significant problems that have arisen since NTFS was conceived and is geared towards changing data storage needs. This includes automatic integrity checking and data cleanup, avoidance of the need to run chkdsk, data decay prevention, built-in hard drive failure and redundancy handling, integrated RAID functionality, data and metadata update switching to copy/allocate on write, handling of very long paths and filenames, and storage virtualization and storage pooling, including logical volumes of almost any size (independent of the physical size of the drive used). . Starting with Win10 1709 Fall Creators Update, only Win10 Enterprise and Win10 Pro Workstation editions offer the ReFS partitioning option; other Win10 editions are no longer supported.

    ReFS is mostly compatible with NTFS and its main purpose is to maintain a high level of stability by automatically verifying that data is not corrupted and doing its best to recover it. When used in conjunction with the introduced Storage Spaces, it provides better data protection. There are also performance improvements for processing hundreds of millions of files.

    Home / Technology / IT / Systems / Difference Between Linux File System and Windows File System

    Linux File System vs Windows File System

    A file system (also known as filesystem) is a technique for storing data in an organized and a human-readable form. The basic unit of a data file system is called a file. A file system is a very important component residing in most data storage devices like hard drives, CDs and DVDs. A file system helps the devices to maintain the physical location of the files. Furthermore, a file system can allow its files to be accessed from a network by becoming a client to network protocols like NFS.

    What is Windows File System?

    Windows mainly support FAT (File Allocation Table) and NTFS (New Technology File system). Windows NT 4.0, Windows 200, Windows XP, Windows .NET server and Windows workstation use NTFS as their preferred file system. Still, FAT can be used with floppy disks and older Windows versions (for multi-boot systems). FAT is the initial file system used in Windows. FAT was used with DOS, and its three versions are FAT12, FAT16 and FAT32. The number of bits used to identify a cluster is the number that is used as the suffix in the name. FAT12, FAT16 and FAT32 have 32MB, 4GB and 32GB as the maximum partition sizes.

    NTFS has completely different data organization architecture. Basically, Microsoft developed NTFS to compete with UNIX, by replacing the much more simple FAT. However, the newest FAT version called exFAT is claimed to have certain advantages over NTFS. A FAT partition can be easily converted to a NTFS partition without loosing data. NTFS supports features like indexing, quota tracking, encryption, compression and repair points. Windows uses drive letter to distinguish partitions. Traditionally, The C drive is the primary partition. Primary partition is used to install and boot Windows. Drive letter can be used for mapping network drives as well.

    What is Linux File System?

    A variety of files systems can be sued with Linux. Commonly used file systems are ext* family (ext, ext2, ext3 and ext4) and XFS. Silicon Graphics developed XFS, which is a journaling system with high performance. The ext (extended file system) was developed in early 1990’s. It was the first file system used in Linux operating system. Remy Card developed it by getting inspiration from the UFS (UNIX File System).

    On Linux, everything is a file. If something is not a file, then it is a process. Programs, audio, video, I/O devices and other devices are considered as files. In Linux, there is no difference between a file and a directory. A directory is simply a file containing names of a set of other files. Special files are a mechanism used for I/O (found in /dev). Sockets (another special file type) provide inter-process communication. Named pipes (much like sockets) are used for inter-process communication without network semantics.

    What is the difference between Linux File System and Windows File System?

    Windows uses FAT and NTFS as file systems, while Linux uses a variety of file systems. Unlike Windows, Linux is bootable from a network drive. In contrast to Windows, everything is either a file or a process in Linux. Linux has two kinds of major partitions called data partitions and swap partitions. Because of the existence of swap partitions, you never run out of memory in Linux (like in windows). In terms of recovery tools, only a limited number of tools can be used on Windows, while there is a large number of UNIX based recovery tools available for Linux file systems.

    It’s time to make the big switch from your Windows or Mac OS operating system.

    Mac OS uses a UNIX core. Your switch from Mac OS to Linux will be relatively smooth.

    It’s the Windows users who will need some adjusting. In this tutorial will introduce the Linux OS and compare it with Windows.

    Linux Vs Windows

    In this Linux vs Windows tutorial, we will introduce the Linux OS and see the difference between Linux and Windows.

    • Windows Vs. Linux: File System
    • Linux Types of Files
    • Windows Vs. Linux: Users
    • Windows Vs. Linux: File Name Convention
    • Windows Vs. Linux: HOME Directory
    • Windows Vs. Linux: Other Directories
    • Windows Vs. Linux: Key Differences

    Click here if the video is not accessible

    Windows Vs. Linux File System

    When we compare file system in Windows and Linux, in Microsoft Windows, files are stored in folders on different data drives like C: D: E:

    But, in Linux, files are ordered in a tree structure starting with the root directory.

    This root directory can be considered as the start of the file system, and it further branches out various other subdirectories. The root is denoted with a forward slash ‘/’.

    A general tree file system on your UNIX may look like this.

    Linux Vs Windows

    • Linux is an open source operating system so user can change source code as per requirement whereas Windows OS is a commercial operating system so user doesn’t have access to source code.
    • Linux is very well secure as it is easy to detect bugs and fix whereas Windows has a huge user base, so it becomes a target of hackers to attack windows system.
    • Comparing Windows file system vs Linux file system, Linux runs faster even with older hardware whereas Windows are slower compared to Linux.
    • Linux peripherals like hard drives, CD-ROMs, printers are considered files whereas Windows, hard drives, CD-ROMs, printers are considered as devices
    • Linux files are ordered in a tree structure starting with the root directory whereas in Windows, files are stored in folders on different data drives like C: D: E:
    • In Linux you can have 2 files with the same name in the same directory while in Windows, you cannot have 2 files with the same name in the same folder.
    • In Linux you would find the system and program files in different directories whereas in Windows, system and program files are usually saved in C: drive.

    Types of Files

    In Linux and UNIX, everything is a file. Directories are files, files are files, and devices like Printer, mouse, keyboard etc.are files.

    Let’s look into the File types in more detail.

    General Files

    General Files also called as Ordinary files. They can contain image, video, program or simply text. They can be in ASCII or a Binary format. These are the most commonly used files by Linux Users.

    Directory Files

    These files are a warehouse for other file types. You can have a directory file within a directory (sub-directory).You can take them as ‘Folders’ found in Windows operating system.

    Device Files:

    In MS Windows, devices like Printers, CD-ROM, and hard drives are represented as drive letters like G: H:. In Linux, there are represented as files.For example, if the first SATA hard drive had three primary partitions, they would be named and numbered as /dev/sda1, /dev/sda2 and /dev/sda3.

    Note: All device files reside in the directory /dev/

    All the above file types (including devices) have permissions, which allow a user to read, edit or execute (run) them. This is a powerful Linux/Unix feature. Access restrictions can be applied for different kinds of users, by changing permissions.

    Windows Vs. Linux: Users

    There are 3 types of users in Linux.

    1. Regular
    2. Administrative(root)
    3. Service

    Regular User

    A regular user account is created for you when you install Ubuntu on your system. All your files and folders are stored in /home/ which is your home directory. As a regular user, you do not have access to directories of other users.

    Root User

    Other than your regular account another user account called root is created at the time of installation. The root account is a superuser who can access restricted files, install software and has administrative privileges. Whenever you want to install software, make changes to system files or perform any administrative task on Linux; you need to log in as a root user. Otherwise, for general tasks like playing music and browsing the internet, you can use your regular account.

    Service user

    Linux is widely used as a Server Operating System. Services such as Apache, Squid, email, etc. have their own individual service accounts. Having service accounts increases the security of your computer. Linux can allow or deny access to various resources depending on the service.

    Note:

    1. You will not see service accounts in Ubuntu Desktop version.
    2. Regular accounts are called standard accounts in Ubuntu Desktop

    In Windows, there are 4 types of user account types.

    1. Administrator
    2. Standard
    3. Child
    4. Guest

    Windows Vs. Linux: File Name Convention

    In Windows, you cannot have 2 files with the same name in the same folder. See below –

    Linux Vs Windows

    While in Linux, you can have 2 files with the same name in the same directory, provided they use different cases.

    Linux Vs Windows

    Windows Vs. Linux: HOME Directory

    For every user in Linux, a directory is created as /home/

    Consider, a regular user account “Tom”. He can store his personal files and directories in the directory “/home/tom”. He can’t save files outside his user directory and does not have access to directories of other users. For instance, he cannot access directory “/home/jerry” of another user account”Jerry”.

    The concept is similar to C:Documents and Settings in Windows.

    When you boot the Linux operating system, your user directory (from the above example /home/tom) is the default working directory. Hence the directory “/home/tom is also called the Home directory which is a misnomer.

    The working directory can be changed using some commands which we will learn later.

    Windows Vs. Linux: Other Directories

    Comparing Windows vs Linux for other directories, in Windows, System and Program files are usually saved in C: drive. But, in Linux, you would find the system and program files in different directories. For example, the boot files are stored in the /boot directory, and program and software files can be found under /bin, device files in /dev. Below are important Linux Directories and a short description of what they contain.

    Linux Vs Windows

    These are most striking differences between Linux and other Operating Systems. There are more variations you will observe when switching to Linux and we will discuss them as we move along in our tutorials.

    Windows Vs. Linux:

    Here is the main difference between Windows and Linux:

    Windows Linux
    Windows uses different data drives like C: D: E to stored files and folders. Unix/Linux uses a tree like a hierarchical file system.
    Windows has different drives like C: D: E There are no drives in Linux
    Hard drives, CD-ROMs, printers are considered as devices Peripherals like hard drives, CD-ROMs, printers are also considered files in Linux/Unix
    There are 4 types of user account types 1) Administrator, 2) Standard, 3) Child, 4) Guest There are 3 types of user account types 1) Regular, 2) Root and 3) Service Account
    Administrator user has all administrative privileges of computers. Root user is the super user and has all administrative privileges.
    In Windows, you cannot have 2 files with the same name in the same folder Linux file naming convention is case sensitive. Thus, sample and SAMPLE are 2 different files in Linux/Unix operating system.
    In windows, My Documents is default home directory. For every user /home/username directory is created which is called his home directory.

    Like this post? Please share to your friends:
  • Linux convert windows file to linux
  • List volume тома отсутствуют windows 10
  • List of all windows xp games
  • List disk командная строка windows 10
  • List command in windows command prompt