xxx:/proc # fdisk -s /dev/sda
312438101
tencent:/proc # fdisk -l
Disk /dev/sda: 319.9 GB, 319936615424 bytes
255 heads, 63 sectors/track, 38896 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1306 10490413+ 83 Linux
/dev/sda2 1307 1568 2104515 82 Linux swap / Solaris
/dev/sda3 1569 4179 20972857+ 83 Linux
/dev/sda4 4180 38896 278864302+ f W95 Ext'd (LBA)
/dev/sda5 4180 6790 20972826 83 Linux
/dev/sda6 6791 38896 257891413+ 83 Linux
xxx:/proc #
xxx:/proc #
xxx:/proc #
xxx:/proc # dd if=/dev/zero f=/tmp/test count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000106 seconds, 4.8 MB/s
我们知道,dd命令如果不指定bs,则会以os的default block size来进行.
从上面知道,这个系统的缺省block size是512 bytes.
而man fdisk可得到
-s partition
The size of the partition (in blocks) is printed on the standard output.
可知,
而从312438101表示/dev/sda这块硬盘的total blocks(os block),那么,容量应该为312438101*512/(1024*1024*1024)约为150G才对, 实际上,上面显示为319.9GB(实际容量).
这是什么原因?
另外,如何修改linux的块缺省大小?
255 heads的含义?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/94384/viewspace-600345/
,如需转载,请注明出处,否则将追究法律责任。