top of page
Writer's pictureMukesh Chanderia

Linux Commands Part 14 - Disk Management

Updated: Aug 21, 2021

Types of Disk :


SATA : sda, sdb and sdc <-- Disk1 , Disk2 & Disk3 Respectively

PATA (legacy) : hda,hdb and hdc <-- Disk1 , Disk2 & Disk3 Respectively


Partitions : sda1,sda2 and sda3 ⇽- Disk SDA

Partition : hda1,hda2 and hda3 ⇽- Disk HDD


The Total number of partition can be created is Four out of which either all four can be primary or 3 primary and one extended.


This extended partition will have n number of logical partitions.


MBR : Master Boot Recorder is responsible for creation of maximum 4 partitions.

So if you chose to create all partition as primary as max partition in hard disk will be 4.


But if you create 3 Primary and one extended then further max 11 partitions can be build in extended.

Ext2 = RHEL4

ext3 = RHEL5

ext4 = RHEL6

ext5 = RHEL7



Step 1 : list number of disks


[root@RedHat adminji]# fdisk -l

Disk /dev/sdb: 64 GiB, 68719476736 bytes, 134217728 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk label type: GPT

Disk identifier: B8265C8F-141E-4E0B-B7DE-9DE6F75CCF40


Device Start End Sectors Size Type

/dev/sdb1 1026048 2050047 1024000 500M Linux file system

/dev/sdb2 2050048 134215679 132165632 63G Linux LVM

/dev/sdb14 2048 10239 8192 4M BIOS boot

/dev/sdb15 10240 1024000 1013761 495M EFI System


Disk /dev/sda: 4 GiB, 4294967296 bytes, 8388608 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: dos

Disk identifier: 0x27d11b8e


Device Boot Start End Sectors Size Id Type

/dev/sda1 2048 8386559 8384512 4G 7 HPFS/NTFS/exFAT


Alternate way to find out disk

[root@RedHat adminji]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sda 8:0 0 4G 0 disk

└─sda1 8:1 0 4G 0 part /mnt

sdb 8:16 0 64G 0 disk


Step 2) Now add one more disk and can see new disk sbc


[root@RedHat adminji]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sda 8:0 0 4G 0 disk

└─sda1 8:1 0 4G 0 part /mnt

sdb 8:16 0 64G 0 disk

sdc 8:32 0 1T 0 disk




5 views0 comments

Comentários


bottom of page