歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> fdisk -l顯示信息詳解

fdisk -l顯示信息詳解

日期:2017/2/28 14:35:45   编辑:Linux教程

fdisk -l顯示信息詳解

[[email protected] ~]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x00044938
Device Boot Start End Blocks Id System
/dev/sda1 * 1 638 5120000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 638 893 2048000 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 893 1020 1024000 82 Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
/dev/sda4 1020 1306 2292736 5 Extended
/dev/sda5 1021 1306 2291712 83 Linux

解析
Disk /dev/sda: 10.7 GB, 10737418240 bytes
塊設備名稱為/dev/sda,此設備的大小為10.7GB,這個數字不是特別精確,我系統是10GB;10737418240 bytes這是轉換成字節後的大小,即:10737418240/1024/1024/1024=10GB (注:bytes=B,表示“字節”,bit=b,表示“位”)
255 heads, 63 sectors/track, 1305 cylinders
255 heads:表示磁頭數為255
63 sectors/track:表示每磁道上有63個扇區
1305 cylinders:表示共有1305個柱面,柱面是分區的最小單位
Units = cylinders of 16065 * 512 = 8225280 bytes

16065=255*63 因為每一個磁頭都是在同一個柱面的,63表示每個磁道上的扇區數量,這兩個數的乘積表示一個柱面上的扇區數量;所以16065*512表示一個柱面的大小是8225280字節
Sector size (logical/physical): 512 bytes / 512 bytes
表示一個扇區的大小是512字節

總結:所以一個磁盤的大小=一個柱面大小*柱面的總數=磁頭數量*每個磁道上的扇區數*一個扇區大小*柱面總數

:磁盤大小=8225280*1305=10733990400bytes=9.99GB=255*63*512*1305
上例中顯示出我們的磁盤只有1305個柱面,但下邊的分區信息中出現了1306個柱面數,不必太在意,linux顯示的這些數據不會十分精確。

Copyright © Linux教程網 All Rights Reserved