Linux查看系統塊大小


Linux系統的塊大小(Block Size)怎么查看呢?下面總結一些常用的查看塊大小(block size)的方法。

 

方法1: fdisk -l查看block size

 

 

[root@KerryDB ~]# fdisk -l /dev/sda1

 

Disk /dev/sda1: 106 MB, 106896384 bytes, 208782 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Alignment offset: 512 bytes

 

方法2:stat命令查看block size

 

[root@KerryDB ~]# stat / | grep "IO Block"
  Size: 260             Blocks: 0          IO Block: 4096   directory
 
[root@KerryDB ~]# stat -f /
  File: "/"
    ID: fd0000000000 Namelen: 255     Type: xfs
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 13100800   Free: 11998605   Available: 11998605
Inodes: Total: 26214400   Free: 26170926

 

 

 

方法3:tune2fs命令查看block size

 

[root@mylnx ~]# tune2fs -l /dev/sda1 | grep "Block size"
Block size:               1024

 

這里可以是/dev/sda1, 對於LVM文件系統,可以使用下面命令

 

# tune2fs -l /dev/mapper/VolGroup04-LogVol00 | grep -i 'block size'
Block size:               4096

 

方法4:blockdev命令查看block size

 

[root@KerryDB ~]# blockdev --getbsz /dev/sda2
4096


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM