fsck
command:
fsck is a command used to check filesystem for
consistency errors and repair them on Linux filesystems.
[root@server ~]# umount /home
[root@server ~]# umount /home
or,
[root@server
~]# umount /dev/sda2
Now run fsck on the partition:
[root@server
~]# fsck /dev/sda2
Specify the file system type using -t option:
[root@server ~]# fsck -t ext4 /dev/sda2
fsck
will check the file system and ask which problems should be fixed or corrected.
If you don't wanna type y every time then you can use pass -y option to fsck:
[root@server
~]# fsck -y /dev/sda2
Please note if any files are recovered then they
are placed in /home/lost+found directory by fsck command.
Once fsck finished, remount the file system:
Once fsck finished, remount the file system:
[root@server
~]# # mount /home
That’s it ……..:)
###########Thanks
for visiting#####################
0 comments:
Post a Comment