Class 10 Partittion Part 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Class 10

Make a partition

1-4 =primary or extended

5 or above = logical

Sda

/dev/sda

Fdisk /dev/sda

Press n

Select primary or extended

Give the partition no

Give size

Press p

Press w

Inform the kernel

1. Restart the server


2. partprobe

delete the partition

fdisk /dev/sda

press d

window = filesystem

FAT = file allocation table

NTFS = new technology file system

Linux

1. EXT2 - extended = introduced in 1993 . it support max file size is 2TB and max partition size 32TB. It no
support journaling feature .
2. EXT3 : introduced in 2001 . it support max file size is 2TB and max partition size 32TB. It support
journaling feature
3. EXT4 : introduced in 2008 . it support max file size is 16TB and max partition size 1EB. It support
journaling feature
4. XFS = extent file system = introduced with RHEL 7 . it support max file size is 9EB and max partition size
18EB. It support journaling feature

Journaling feature = it is a feature of OS which recover the corrupt partition data .

See the partition filesystem


Blkid

Ext2 = mke2fs /dev/sda1 or mkfs.ext2 /dev/sda1 or mke2fs -t ext2 /dev/sda1

Ext2 = mke2fs -j /dev/sda1 or mkfs.ext3 /dev/sda1 or mke2fs -t ext3 /dev/sda1

Ext4 = mke2fs -t ext4 /dev/sda1 or mkfs.ext4 /dev/sda1

Xfs = mkfs.xfs /dev/sda1 or mkfs.xfs -f /dev/sda1

Mounting = attach the folder with partition

2 types

1. Temporary mounting = mount - restart - mount again


2. Permanent mounting = forever mounting

/dev/sda1

Mkdir /data

Mount /dev/sda1 /data

Df -h

Unmount

Umount /dev/sda1 or umount /data or umount /dev/sda1 /data

Permanent

/etc/fstab

/dev/sda1 /data xfs defaults 0 0

:wq

/dev/sda1 = partition name

/data = mount point

xfs = file system

defaults = read , write

0 = fsck (filesystem check) = kernel partition check (0 - no check , 1 = check)

0 = dumb (journaling ) (1- enable , 0 -disable)

Mount -a

Make read only


/etc/fstab

/dev/sda1 /data xfs defaults,ro 0 0

:wq

Mount -o remount /data

Swap partition , permission

You might also like