Linux File System
Linux
 The Linux kernel is an open-source monolithic unix-like computer operating
system kernel.
 Its basic design from principles established in Unix during the 1970s and 1980s.
 Linux is a small UNIX system. Version 1.0 released in 1994, 2.2 in 1999.
 Today used on 7-10 million computers corporate computer network and Web
servers .
2
What is a File System
File System is responsible for storing information on disk and retrieving and updating
this information.
Example : FAT16, FAT32, NTFS
ext2, ext3 ,ext4…
 In Linux everything is file.
3
Types of File System
 Network File System
NFS
SMB
 Disk File System
ext2
ext3
FAT32
NTFS
4
Network File System
Network File System are physically somewhere else, but appear as if they
are mounted on one computer.
 NFS
It was developed by Sun.
 SMB
It was developed by Microsoft.
5
Physical Structure on the Disk
 Boot Block : information needs to boot the system
 Super Block : File System Specifications Size Max. number of files Free
blocks Free inodes
 inode List
 Block List : The files data
6
Boot
block
supper
block
Inode
list
Block
list
In operation, Linux Kernel need to know
7
Where those data are store.
How it can be access.
And where we save the new data.
Second standard file system (ext2) 1993
Maximum file size : 2TB
Maximum volume size: 8 TB
File name size: 255 characters
Supports:
POSIX permissions
File compression
8
THIRD standard file system (ext3)
Maximum file size : 2TB
Maximum volume size: 2 TB
File name size: 255 characters
Supports:
POSIX permissions
File compression
include a journal entry (PENDING)
9
RISAR FILE SYSTEM
User Journaling
Maximum file size : 8 TB
Maximum volume size: 16 TB
10
FOURTH standard file system (ext4)
Maximum file size : 16TB
Maximum volume size: 1 EXA-BYTE
Maximum NUMBER OF file: 4 BILION Supports:
POSIX permissions
File compression
include a USER journal entry
11
 In Linux, all files and directories are located in a tree-like structure. The topmost
directory is referred to as the file system root
 # Current directory (.)
# Parent directory (…)
12
Absolute path vs. Relative path
13
Linux two-part file system software
implementation
14
The first part of this two-part implementation is the Linux virtual file system
Root Structure
15
16
/boot Contains the static bootloader and kernel executable and
configuration files required to boot a Linux computer.
/dev This directory contains the device files for every hardware device
attached to the system. These are not device drivers, rather they
are files that represent each device on the computer and facilitate
access to those devices.
/ (root
filesystem)
The root filesystem is the top-level directory of the filesystem. It
must contain all of the files required to boot the Linux system
before other filesystems are mounted. It must include all of the
required executables and libraries required to boot the remaining
filesystems
/bin The /bin directory contains user executable files.
Brief Description
17/etc Contains the local system configuration files for the host
computer
/home Home directory storage for user files. Each user has a subdirectory
in /home.
/lib Contains shared library files that are required to boot the system.
/media A place to mount external removable media devices such as USB
thumb drives that may be connected to the host.
/mnt A temporary mountpoint for regular filesystems (as in not
removable media) that can be used while the administrator is
repairing or working on a filesystem.
/opt Optional files such as vendor supplied application programs
should be located here.
18
/sbin System binary files. These are executables used for system
administration.
/tmp Temporary directory. Used by the operating system and many
programs to store temporary files. Users may also store files here
temporarily. Note that files stored here may be deleted at any
time without prior notice.
/usr These are shareable, read-only files, including executable binaries
and libraries, man files, and other types of documentation.
/var Variable data files are stored here. This can include things like log
files, MySQL, and other database files, web server data files, email
inboxes, and much more.
Basic Comand
19
Basic Command
20
To see what a directory contain with all of hidden file
Ls –al or ls -a
Mounting
21
The mount command mounts a storage device or filesystem, making it accessible
and attaching it to an existing directory structure.
Syntax:
$ mount -t type file-system mount-point
added a disk /dev/sdb on /data directory
$ mount -t ext4 /dev/sdb /data
Unmounting
22
The unmount command "unmounts" a mounted filesystem. Run unmount
command with disk name or mount point name to unmount currently mounted disk.
Syntax:
$ umount /dev/sdb
$ umount /data
Thank
You
23

Linux file system

  • 1.
  • 2.
    Linux  The Linuxkernel is an open-source monolithic unix-like computer operating system kernel.  Its basic design from principles established in Unix during the 1970s and 1980s.  Linux is a small UNIX system. Version 1.0 released in 1994, 2.2 in 1999.  Today used on 7-10 million computers corporate computer network and Web servers . 2
  • 3.
    What is aFile System File System is responsible for storing information on disk and retrieving and updating this information. Example : FAT16, FAT32, NTFS ext2, ext3 ,ext4…  In Linux everything is file. 3
  • 4.
    Types of FileSystem  Network File System NFS SMB  Disk File System ext2 ext3 FAT32 NTFS 4
  • 5.
    Network File System NetworkFile System are physically somewhere else, but appear as if they are mounted on one computer.  NFS It was developed by Sun.  SMB It was developed by Microsoft. 5
  • 6.
    Physical Structure onthe Disk  Boot Block : information needs to boot the system  Super Block : File System Specifications Size Max. number of files Free blocks Free inodes  inode List  Block List : The files data 6 Boot block supper block Inode list Block list
  • 7.
    In operation, LinuxKernel need to know 7 Where those data are store. How it can be access. And where we save the new data.
  • 8.
    Second standard filesystem (ext2) 1993 Maximum file size : 2TB Maximum volume size: 8 TB File name size: 255 characters Supports: POSIX permissions File compression 8
  • 9.
    THIRD standard filesystem (ext3) Maximum file size : 2TB Maximum volume size: 2 TB File name size: 255 characters Supports: POSIX permissions File compression include a journal entry (PENDING) 9
  • 10.
    RISAR FILE SYSTEM UserJournaling Maximum file size : 8 TB Maximum volume size: 16 TB 10
  • 11.
    FOURTH standard filesystem (ext4) Maximum file size : 16TB Maximum volume size: 1 EXA-BYTE Maximum NUMBER OF file: 4 BILION Supports: POSIX permissions File compression include a USER journal entry 11
  • 12.
     In Linux,all files and directories are located in a tree-like structure. The topmost directory is referred to as the file system root  # Current directory (.) # Parent directory (…) 12
  • 13.
    Absolute path vs.Relative path 13
  • 14.
    Linux two-part filesystem software implementation 14 The first part of this two-part implementation is the Linux virtual file system
  • 15.
  • 16.
    16 /boot Contains thestatic bootloader and kernel executable and configuration files required to boot a Linux computer. /dev This directory contains the device files for every hardware device attached to the system. These are not device drivers, rather they are files that represent each device on the computer and facilitate access to those devices. / (root filesystem) The root filesystem is the top-level directory of the filesystem. It must contain all of the files required to boot the Linux system before other filesystems are mounted. It must include all of the required executables and libraries required to boot the remaining filesystems /bin The /bin directory contains user executable files. Brief Description
  • 17.
    17/etc Contains thelocal system configuration files for the host computer /home Home directory storage for user files. Each user has a subdirectory in /home. /lib Contains shared library files that are required to boot the system. /media A place to mount external removable media devices such as USB thumb drives that may be connected to the host. /mnt A temporary mountpoint for regular filesystems (as in not removable media) that can be used while the administrator is repairing or working on a filesystem. /opt Optional files such as vendor supplied application programs should be located here.
  • 18.
    18 /sbin System binaryfiles. These are executables used for system administration. /tmp Temporary directory. Used by the operating system and many programs to store temporary files. Users may also store files here temporarily. Note that files stored here may be deleted at any time without prior notice. /usr These are shareable, read-only files, including executable binaries and libraries, man files, and other types of documentation. /var Variable data files are stored here. This can include things like log files, MySQL, and other database files, web server data files, email inboxes, and much more.
  • 19.
  • 20.
    Basic Command 20 To seewhat a directory contain with all of hidden file Ls –al or ls -a
  • 21.
    Mounting 21 The mount commandmounts a storage device or filesystem, making it accessible and attaching it to an existing directory structure. Syntax: $ mount -t type file-system mount-point added a disk /dev/sdb on /data directory $ mount -t ext4 /dev/sdb /data
  • 22.
    Unmounting 22 The unmount command"unmounts" a mounted filesystem. Run unmount command with disk name or mount point name to unmount currently mounted disk. Syntax: $ umount /dev/sdb $ umount /data
  • 23.