centos

sys.6.2 linux磁盘及文件系统管理(管理工具)

 

关键词:创建文件系统的工具、检测及修复文件系统的工具、查看其属性的工具、调整文件系统的特性;

前言:

创建文件系统的工具:mkfs.ext2 , mkfs.ext3 , mkfs.ext4 , mkfs.xfs , …
检测及修复文件系统的工具:fsck.ext4 , fsck.xfs , …
查看文件系统属性的工具:dumpe2fs , tune2fs , …
调整文件系统的特性:tune2fs , …

1、内核级文件系统的组成部分
文件系统驱动:有内核提供;
文件系统管理工具:由用户空间的应用程序提供;

2、ext系列文件系统的管理工具
mkfs.ext4 , mkfs.xfs …

创建文件系统的命令:
mkfs   -t   ext4 = mkfs.ext4 = mke2fs   -t   ext4

mke2fs命令
命令解释:
mke2fs – create  an  ext2/ext3/ext4   filesystem

命令用法:
mke2fs [ -c | -l filename ] [ -b block-size ] [ -D ] [ -f fragment-size ] [ -g blocks-per-group ] [ -G number-of-groups ] [ -i bytes-per-inode ] [ -I inode-size ] [ -j ] [ -J journal-options ] [ -N number-of-inodes ] [ -n ] [ -m reserved-blocks-percentage ] [ -o cre‐ator-os ] [ -O feature[,…] ] [ -q ] [ -r fs-revision-level ] [ -E extended-options ] [ -v ] [ -F ] [ -L volume-label ] [ -M last-mounted-directory ] [ -S ] [ -t fs-type ] [ -T usage-type ] [ -U UUID ] [ -V ] device [ blocks-count ]

mke2fs  -O  journal_dev  [ -b block-size ] [ -L volume-label ] [ -n ] [ -q ] [ -v ] external-journal [ blocks-count ]

OPTIONS:
-t {ext2|ext3|ext4} : 指明要创建的文件系统类型;mkfs  -t  ext4 = mkfs.ext4 = mke2fs  -t  ext4
-b {1024|2048|4096} : 指明文件系统的块大小;
-L LABEL : 指明卷标名称;
-N number-of-inodes : 指定inode的数量;
-m # : 指定为超级用户保留的文件系统块的百分比; “-m 3″表示预留3%的块空间; 默认预留5%;

-j : 创建有日志功能的文件系统ext3 ; 特例,mke2fs   -j = mke2fs  -t  ext3 = mkfs  -t  ext3
-i   n : bytes-per-inode ,指明inode与字节的比例;每个inode多少字节;
-O [^]FEATURE : 不带脱字符,表示指定特性创建文件系统;带脱字符,表示不带指定特性创建文件系统;

ext文件系统创建完成后,可根据需要更改某些特性:
——————————————-
e2label命令卷标的查看与设定
e2label – Change  the  label  on  an  ext2/ext3/ext4  filesystem

e2label   device :查看某个分区的卷标;
e2label   device   LABEL : 设定某个分区的卷标;

tune2fs命令 : 在ext2/ext3/ext4文件系统上调整可调的文件系统参数(可调整部分参数)
tune2fs – adjust  tunable  filesystem  parameters  on  ext2/ext3/ext4   filesystems

tune2fs  [OPTIONS]  device

NOTE : block  size ,块大小在文件系统创建后是不能修改的;

可调整的部分参数:
预留块数量空间的百分比;
卷标名称;
文件系统类型;

OPTIONS:
-l : 查看超级块的内容;
-L   LABEL : 修改卷标;
-m # : 调整预留空间百分比(预留块数量);

-j : 把ext2文件系统升级为ext3文件系统;
-O [^]FEATURE : 开启或关闭文件系统的某种特性;
-o [^]mount_options : 开启或关闭某种默认挂载选项;

dumpe2fs命令显示ext系列文件系统的属性信息
dumpe2fs – dump  ext2/ext3/ext4   filesystem   information

dumpe2fs   device : 显示超级块信息,以及所有块组的信息;
dumpe2fs   -h   device : 仅显示超级块信息;

3、blkid :定位/打印块设备属性(比如,卷标名称,UUID,文件系统类型等);
blkid – locate/print   block   device   attributes
~]# blkid   /dev/sdb1

blkid  device : 定位/打印块设备属性;
blkid   -L   LABEL : 根据LABEL(卷标名)来定位设备(分区);
blkid   -U   UUID : 更具UUID来定位设备;

4、文件系统的检测修复工具
因进程意外终止或系统崩溃等原因导致定稿操作非正常终止时,可能会造成文件损坏;
此时,应该要在离线状态下检测并修复文件系统(文件系统在非挂载状态下);

4.1  ext系列文件系统的专用检测修复工具
e2fsck – check a Linux ext2/ext3/ext4 file system

e2fsck [OPTIONS] device

OPTIONS:
-y : 对所有问题自动回答为yes;
-f : 即使文件系统处于clean状态,也要强制进行检测;

4.2 通用文件系统的检测修复工具
fsck – check and repair a Linux filesystem

fsck [OPTIONS] device

OPTIONS:
-t fstype : 指明要检测修复的文件系统的类型;
## fsck -t ext4 = fsck.ext4
-a : 无须交互而自动修复所有错误;不推荐使用;
-r : 交互式检测修复;

5、swap文件系统
Linux系统上的交换分区必须使用独立的文件系统;且文件系统的System ID必须为82;

mkswap命令:创建swap设备;
mkswap   [OPTIONS]   divice

OPTIONS:
-L   LABEL :指明卷标名称;
-f : 强制创建;

Windows无法识别Linux的文件系统;
存储设备需要在Windows和Linux系统交叉使用时,应该把存储设备格式化为vfat文件系统;mkfs.vfat   device ;

启用交换分区:
swapon   [OPTION] [DEVICE]
swapon   -a : 启用定义在’/etc/fstab’文件中的所有swap设备;

禁用交换分区:
swapoff   DEVICE

lsmod : 查看当前内核已装载的模块;可以通过编译进内核的方式或者加载进内核的方式来装载模块;

[root@localhost tmp]# lsmod
Module                  Size  Used by
snd_seq_midi           13565  0 
snd_seq_midi_event     14899  1 snd_seq_midi
iosf_mbi               13523  0 
crc32_pclmul           13113  0 
ghash_clmulni_intel    13259  0 
aesni_intel            69884  0 
lrw                    13286  1 aesni_intel
gf128mul               14951  1 lrw
glue_helper            13990  1 aesni_intel
ablk_helper            13597  1 aesni_intel
cryptd                 20359  3 ghash_clmulni_intel,aesni_intel,ablk_helper
ppdev                  17671  0 
snd_ens1371            25194  0 
joydev                 17377  0 
vmw_balloon            18190  0 
snd_rawmidi            31294  2 snd_ens1371,snd_seq_midi
pcspkr                 12718  0 
snd_ac97_codec        130556  1 snd_ens1371
btusb                  41436  0 
ac97_bus               12730  1 snd_ac97_codec
btrtl                  12945  1 btusb
btbcm                  14040  1 btusb
snd_seq                62699  2 snd_seq_midi_event,snd_seq_midi
btintel                15709  1 btusb
snd_seq_device         14356  3 snd_seq,snd_rawmidi,snd_seq_midi
bluetooth             548687  5 btbcm,btrtl,btusb,btintel
snd_pcm               106416  2 snd_ac97_codec,snd_ens1371
snd_timer              29810  2 snd_pcm,snd_seq
snd                    83383  7 snd_ac97_codec,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_ens1371,snd_seq_device
soundcore              15047  1 snd
rfkill                 22391  1 bluetooth
nfit                   49183  0 
sg                     40721  0 
libnvdimm             132047  1 nfit
parport_pc             28165  0 
parport                46395  2 ppdev,parport_pc
i2c_piix4              22390  0 
shpchp                 37032  0 
vmw_vmci               67013  0 
ip_tables              27078  0 
xfs                   978100  2 
libcrc32c              12644  1 xfs
sr_mod                 22416  0 
cdrom                  42556  1 sr_mod
ata_generic            12910  0 
pata_acpi              13038  0 
sd_mod                 46322  4 
crc_t10dif             12714  1 sd_mod
crct10dif_generic      12647  0 
vmwgfx                239501  1 
drm_kms_helper        163265  1 vmwgfx
syscopyarea            12529  1 drm_kms_helper
sysfillrect            12701  1 drm_kms_helper
sysimgblt              12640  1 drm_kms_helper
fb_sys_fops            12703  1 drm_kms_helper
ttm                    99345  1 vmwgfx
crct10dif_pclmul       14289  1 
crct10dif_common       12595  3 crct10dif_pclmul,crct10dif_generic,crc_t10dif
crc32c_intel           22079  1 
drm                   370825  4 ttm,drm_kms_helper,vmwgfx
ata_piix               35038  0 
serio_raw              13413  0 
mptspi                 22542  3 
libata                242992  3 pata_acpi,ata_generic,ata_piix
scsi_transport_spi     30732  1 mptspi
mptscsih               40150  1 mptspi
e1000                 137500  0 
mptbase               105960  2 mptspi,mptscsih
i2c_core               40756  3 drm,i2c_piix4,drm_kms_helper
dm_mirror              22124  0 
dm_region_hash         20813  1 dm_mirror
dm_log                 18411  2 dm_region_hash,dm_mirror
dm_mod                123303  10 dm_log,dm_mirror
[root@localhost tmp]#

举例:磁盘分区操作;

[root@localhost ~]# 
[root@localhost ~]# fdisk -l 			查看是否有尚未分区的磁盘空间;

Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c32e3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200    83886079    40893440   8e  Linux LVM

Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 39.7 GB, 39720058880 bytes, 77578240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# fdisk /dev/sdb 			对 /dev/sdb 磁盘进行分区操作;
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xfead7da1.

Command (m for help): m 					显示可用子命令;
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): p 					显示 /dev/sdb 磁盘是否已有分区;

Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xfead7da1

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): l 					显示所有已知分区的类型及对应的ID号;

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx         
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility   
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs        
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT            
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor      
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary  
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS    
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE 
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep        
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT            
1e  Hidden W95 FAT1 80  Old Minix      

Command (m for help): n 					创建新分区;
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p 						选择创建主分区;
Partition number (1-4, default 1): 1 		选择主分区号;
First sector (2048-41943039, default 2048): 选择新分区的起始扇区;
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +1G 	 指定新分区的大小;
Partition 1 of type Linux and of size 1 GiB is set

Command (m for help): p                     显示已有的所有分区;但此时看到的信息是记录在内存中的;

Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xfead7da1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2099199     1048576   83  Linux

Command (m for help): w 					保存新创建分区的信息至磁盘;
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# kpartx -af /dev/sdb     强制内核更新分区表;
[root@localhost ~]# 
[root@localhost ~]# cat /proc/partitions    查看内核已识别的所有分区, /dev/sdb1 能看到,表示分区已被识别;
major minor  #blocks  name

   8        0   41943040 sda
   8        1    1048576 sda1
   8        2   40893440 sda2
   8       16   20971520 sdb
   8       17    1048576 sdb1
  11        0    1048575 sr0
 253        0   38789120 dm-0
 253        1    2097152 dm-1
 253        2    1048576 dm-2
[root@localhost ~]#

创建 xfs 文件系统,并挂载:

[root@localhost ~]# df -lh
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   37G  1.9G   36G   5% /
devtmpfs                 478M     0  478M   0% /dev
tmpfs                    488M     0  488M   0% /dev/shm
tmpfs                    488M  6.7M  481M   2% /run
tmpfs                    488M     0  488M   0% /sys/fs/cgroup
/dev/sda1               1014M  153M  862M  16% /boot
tmpfs                     98M     0   98M   0% /run/user/0
[root@localhost ~]# mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1              isize=512    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@localhost ~]# 
[root@localhost ~]# mount /dev/sdb1 /sdb1
[root@localhost ~]# 
[root@localhost ~]# df -lh
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   37G  1.9G   36G   5% /
devtmpfs                 478M     0  478M   0% /dev
tmpfs                    488M     0  488M   0% /dev/shm
tmpfs                    488M  6.7M  481M   2% /run
tmpfs                    488M     0  488M   0% /sys/fs/cgroup
/dev/sda1               1014M  153M  862M  16% /boot
tmpfs                     98M     0   98M   0% /run/user/0
/dev/sdb1               1014M   33M  982M   4% /sdb1
[root@localhost ~]#

创建 ext4 文件系统并挂载:

[root@localhost ~]# mkfs.ext4 /dev/sdb2
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
  32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

[root@localhost ~]# mkdir /sdb2
[root@localhost ~]# 
[root@localhost ~]# mount /dev/sdb2 /sdb2
[root@localhost ~]# 
[root@localhost ~]# df -lh
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   37G  1.9G   36G   5% /
devtmpfs                 478M     0  478M   0% /dev
tmpfs                    488M     0  488M   0% /dev/shm
tmpfs                    488M  6.7M  481M   2% /run
tmpfs                    488M     0  488M   0% /sys/fs/cgroup
/dev/sda1               1014M  153M  862M  16% /boot
tmpfs                     98M     0   98M   0% /run/user/0
/dev/sdb1               1014M   33M  982M   4% /sdb1
/dev/sdb2                2.0G  6.0M  1.8G   1% /sdb2
[root@localhost ~]#

举例:查看某个分区的UUID,以及此分区的文件系统类型;

[root@localhost ~]# blkid /dev/sdb1
/dev/sdb1: UUID="ff2b0019-4dc9-4bb3-b2ba-43b7ecdb76c0" TYPE="xfs" 
[root@localhost ~]# 
[root@localhost ~]# blkid /dev/sdb2
/dev/sdb2: UUID="6573bffb-af78-4ea2-b4d1-d2303cab8cad" TYPE="ext4" 
[root@localhost ~]#

举例:tune2fs -l 显示的内容说明;

[root@localhost ~]# 
[root@localhost ~]# tune2fs -l /dev/sdb1
tune2fs 1.42.9 (28-Dec-2013)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
[root@localhost ~]# 
[root@localhost ~]# tune2fs -l /dev/sdb2
tune2fs 1.42.9 (28-Dec-2013)
Filesystem volume name:   <none>   		## 卷标名称;		
Last mounted on:          <not available>   ##  表示尚未挂载使用;
Filesystem UUID:          6573bffb-af78-4ea2-b4d1-d2303cab8cad    ## UUID号码;
Filesystem magic number:  0xEF53        ## 文件系统的魔数;
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize   ##  已启用的特性;
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              131072
Block count:              524288
Reserved block count:     26214
Free blocks:              498132
Free inodes:              131061
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      255
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat May  5 01:25:22 2018
Last mount time:          Sat May  5 01:25:44 2018
Last write time:          Sat May  5 01:25:44 2018
Mount count:              1
Maximum mount count:      -1
Last checked:             Sat May  5 01:25:22 2018
Check interval:           0 (<none>)
Lifetime writes:          65 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      74f98009-f20c-4688-8ba0-9108c8c8a196
Journal backup:           inode blocks
[root@localhost ~]#

举例:dumpe2fs 显示超级块信息、以及所有块组的信息;

[root@localhost /]# 
[root@localhost /]# dumpe2fs -h /dev/sdb2
dumpe2fs 1.42.9 (28-Dec-2013)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          6573bffb-af78-4ea2-b4d1-d2303cab8cad
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              131072
Block count:              524288
Reserved block count:     26214
Free blocks:              498132
Free inodes:              131061
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      255
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat May  5 01:25:22 2018
Last mount time:          Sat May  5 01:25:44 2018
Last write time:          Sat May  5 03:29:18 2018
Mount count:              1
Maximum mount count:      -1
Last checked:             Sat May  5 01:25:22 2018
Check interval:           0 (<none>)
Lifetime writes:          99 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      74f98009-f20c-4688-8ba0-9108c8c8a196
Journal backup:           inode blocks
Journal features:         journal_64bit
Journal size:             64M
Journal length:           16384
Journal sequence:         0x00000004
Journal start:            0

[root@localhost /]# dumpe2fs /dev/sdb2 |more
dumpe2fs 1.42.9 (28-Dec-2013)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          6573bffb-af78-4ea2-b4d1-d2303cab8cad
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg di
r_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              131072
Block count:              524288
Reserved block count:     26214
Free blocks:              498132
Free inodes:              131061
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      255
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat May  5 01:25:22 2018
Last mount time:          Sat May  5 01:25:44 2018
Last write time:          Sat May  5 03:29:18 2018
Mount count:              1
Maximum mount count:      -1
Last checked:             Sat May  5 01:25:22 2018
Check interval:           0 (<none>)
Lifetime writes:          99 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:	          256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      74f98009-f20c-4688-8ba0-9108c8c8a196
Journal backup:           inode blocks
Journal features:         journal_64bit
Journal size:             64M
Journal length:           16384
Journal sequence:         0x00000004
Journal start:            0


Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
  Checksum 0x5c5b, unused inodes 8181
  Primary superblock at 0, Group descriptors at 1-1
  Reserved GDT blocks at 2-256
  Block bitmap at 257 (+257), Inode bitmap at 273 (+273)
  Inode table at 289-800 (+289)
  24281 free blocks, 8181 free inodes, 2 directories, 8181 unused inodes
  Free blocks: 8487-32767
  Free inodes: 12-8192
Group 1: (Blocks 32768-65535) [INODE_UNINIT, ITABLE_ZEROED]
  Checksum 0xaf3b, unused inodes 8192
  Backup superblock at 32768, Group descriptors at 32769-32769
  Reserved GDT blocks at 32770-33024
  Block bitmap at 258 (bg #0 + 258), Inode bitmap at 274 (bg #0 + 274)
  Inode table at 801-1312 (bg #0 + 801)
  32511 free blocks, 8192 free inodes, 0 directories, 8192 unused inodes
  Free blocks: 33025-65535
  Free inodes: 8193-16384
Group 2: (Blocks 65536-98303) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
  Checksum 0x814c, unused inodes 8192
... ...

 

Leave a Reply

Your email address will not be published. Required fields are marked *