This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / linux高手请进, 有个问题关于linux disk的block size. 谢谢.各位高手, 这两天被linux的block size搞的糊里糊涂. 网上的资料十分有限, 搜了这里的历史贴也无救. 一直以外是512 bytes, 似乎没有啥命令可以看disk的block size (not file system), fdisk时候是 unit size / 1024 = block size, unit size=sector * 512 * number of sector per track, 不知道fdisk -l 这里这个block size是不是一般所讲的block size?? 例如raid里面的block size???. (cat /proc/mdstat). please help.
-unix_guy(一年了);
2004-1-9
{389}
(#1553800@0)
-
df -k ( one block size is 1024 bytes)
-eagle_no1(瞎起哄);
2004-1-9
(#1553811@0)
-
thanks pal. i have no idea if this command is relevant when there is no file system created on the device, besides, this command did not list out the actual block size.
-unix_guy(一年了);
2004-1-9
(#1553846@0)
-
1) you can use df command before you mount file system;
2) as you know "df -k" the vitual block size is 1024; then
use "df" again , you can caculae what the actual block size is.1024*(block num with "df -k" = x*(block num with "df")
x is what you want.
-eagle_no1(瞎起哄);
2004-1-9
{79}
(#1553894@0)
-
thanks, let me re-walk this.
-unix_guy(一年了);
2004-1-9
(#1554161@0)