Disk block size and the sector

 
 
 

fdisk Output Interpreter

# fdisk -l
Disk /dev/sda: 1.1 TiB, 1200210141184 bytes, 2344160432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disklabel type: gpt
Disk identifier: D29C9FE4-3872-4296-AF86-ED271AA22229
Device          Start        End    Sectors  Size Type
/dev/sda1        2048    1050623    1048576  512M EFI System
/dev/sda2     1050624 2277318655 2276268032  1.1T Linux filesystem
/dev/sda3  2277318656 2344159231   66840576 31.9G Linux swap
 
heads / sectors / cylinders, respectively, is the head / sector / cylinder, each sector 512Byte (now new hard Each sector has 4K) of
hard disk capacity is heads * sectors * cylinders * 512 = 255 * 63 * 17844 * 512 = 146771896320b = 146.7G
 
Hard disk storage unit is the smallest sector of the hard disk itself does not block concept

File system

If a file system according to a sector sector read data is too slow, so with the concept of block (blocks), block by block is read, the minimum unit is the block of file access .
# df -T
Filesystem     Type      1K-blocks      Used Available Use% Mounted on
udev           devtmpfs   16373320         0  16373320   0% /dev
tmpfs          tmpfs       3280540      3260   3277280   1% /run
/dev/sda2      ext4     1120143396 813369320 249850992  77% /
tmpfs          tmpfs      16402684    133916  16268768   1% /dev/shm
tmpfs          tmpfs          5120         0      5120   0% /run/lock
 
#  sudo tune2fs -l /dev/sda2 |grep "Block size"
Block size:               4096
A block is 4K, the file system in a block is composed of eight consecutive sectors.
A sector is a hard disk for the block is for the file system.

Guess you like

Origin www.cnblogs.com/yi-mu-xi/p/10939612.html