zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Java正则表达式
    Java 字符串处理
    Number 和 Math 类
    Day05:集合操作——线性表(二) / 查找表 / 文件操作——File(一)
    Android IPC(进程间通信)Binder机制
    Android Service服务源码相关分析
    Android系统修改相关收集
    常用
    JAVA设计模式
    【转载】Reactor模式和NIO
  • 原文地址:https://www.cnblogs.com/kerrycode/p/12764361.html
Copyright © 2011-2022 走看看