Essay filesystem repair 2019.8.7

xfs file system repair:

damage:

[root@localhost ~]# mkdir /d

[root@localhost ~]# mount /dev/sdb1 /d

[root@localhost ~]# touch /d/{a..f}

[root@localhost ~]# ls /d

a  b  c  d  e  f  lost+found

[root@localhost ~]# umount /dev/sdb1

[root@localhost ~]# dd if=/dev/zero of=/dev/sdb1 bs=512 count=4

Records read 4 + 0

Write a record of 4 + 0

2048 bytes (2.0 kB) has been copied, 0.000218494 seconds, 9.4 MB / sec

[root@localhost ~]# mount /dev/sdb1 /d

mount: / dev / sdb1 write protection, will be mounted read-only

mount: unknown filesystem type "(null)"

repair:

[root@localhost ~]# xfs_repair /dev/sdb1

[root@localhost ~]# mount /dev/sdb1 /d

[root@localhost ~]#

 

ext4 file system repair:

damage:

[root@localhost ~]# mkdir /d

[root@localhost ~]# mount /dev/sdb1 /d

[root@localhost ~]# touch /d/{a..f}

[root@localhost ~]# ls /d

a  b  c  d  e  f  lost+found

[root@localhost ~]# umount /dev/sdb1

[root@localhost ~]# dd if=/dev/zero of=/dev/sdb1 bs=512 count=4

Records read 4 + 0

Write a record of 4 + 0

2048 bytes (2.0 kB) has been copied, 0.000218494 seconds, 9.4 MB / sec

[root@localhost ~]# mount /dev/sdb1 /d

mount: / dev / sdb1 write protection, will be mounted read-only

mount: unknown filesystem type "(null)"

repair:

 

Guess you like

Origin www.cnblogs.com/lyqlyqlyq/p/11314475.html