您的当前位置:首页正文

Linux查看系统块大小

2024-07-05 来源:九壹网
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 sectorsUnits = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesAlignment 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: xfsBlock size: 4096 Fundamental block size: 4096

Blocks: Total: 13100800 Free: 11998605 Available: 11998605Inodes: 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/sda24096

因篇幅问题不能全部显示,请点此查看更多更全内容