Linux - File System

> Operating System - Kernel (Windows, Unix, Linux) > Linux / Unix > Linux - Disk (storage devices)

1 - About

File system in a Linux Context.

A file system is created on a partition

Advertising

3 - File System Hierarchy Standard (FHS)

4 - Supported file systems

The supported file systems include (but are not limited to):

The file system after an installation of OEL is an ext2fs

5 - How to

5.1 - Create

mkfs.ext3 -c /dev/sdb1
# or
mkfs -t ext4 /dev/sda3
# or
mkfs -t xfs /dev/sda3
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
65536000 inodes, 131070310 blocks
6553515 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
4000 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000

Checking for bad blocks (read-only test): done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

where:

Advertising

5.2 - See

When listing a partition, you should be able to see it

Example with parted. Below you can see that the file system is xfs on each partition.

parted -l
Model: Msft Virtual Disk (scsi)
Disk /dev/sda: 191GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  525MB  524MB  primary  xfs          boot
 2      525MB   191GB  191GB  primary  xfs

5.3 - Mount

In order to access any file system, it is first necessary to mount it (ie mount the partition) to make it available.

Example:

mkdir /mountpoint
mount /dev/sda3 /mountpoint

Then you need to add it to fstab to got the mount on reboot.

6 - Documentation / Reference

os/linux/disk/fs.txt · Last modified: 2019/06/04 12:59 by gerardnico