Main Menu

Search

LINUX: fdisk Command To Check the Size of Partitions / Volumes/ Disks (How To Doc)

Below fdisk command can be used to check the size of all the partitions, volumes, disks on Linux Machine.
fdisk -l

Below is example snippet of above command.

Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
64 heads, 32 sectors/track, 102400 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               2      102400   104856576   83  Linux

Disk /dev/mapper/VolGroup00-LogVol01: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup00-LogVol00: 33.8 GB, 33831256064 bytes
255 heads, 63 sectors/track, 4113 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

If you want to check the size of specific partition, volume below command can be used.

fdisk -s <name>

Below is example.
fdisk -s /dev/mapper/VolGroup00-LogVol00

Below is example snippet of above command.
# fdisk -s /dev/mapper/VolGroup00-LogVol00
33038336

Products to which Article Applies


All Linux Operating Systems

 

Additional Reference

 

https://www.tecmint.com/fdisk-commands-to-manage-linux-disk-partitions/


tarun boyella


No comments:

Post a Comment