Force Check Linux File System Under Maintenance Mode
One of the server running Backuppc and using USB storage to store the backup and I called it harisbackup. Its has one habit, in a period of a month, it will detect having a file system problem. The file system type is ext2. Before using ext2, I had use ext3, but USB storage keep on detaching itself after a few days. Changing to ext2 resolved the issue.
If you want to used, external storage, USB connecton is not a good option if you want to keep it permanent mounted. Used Firewire or Iscsi and format it with ext2 or reiserfs. ext4 not yet tested. I believe high IO between mounted file system and OS in long period of time like days, the device will disconnect itself.
If you get error messages as per below when rebooting the system. (Im using Linux Centos 5).
----- Start Message -----
harisbackup contains a file system with errors, check forced
harisbackup : | =============== |% (until it finish)
unattached inode 2050
root : UNEXPECTED INCONSISTENCY; run fsck MANUALLY
(i.e. , without -a or -p options)
*** An error occured during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance.
(Or type Control-D for normal startup);
---- End message ----
Keyin your root pasword and issue this command
fsck -p
This will check the hard disk. Time estimation around 45 minutes for 1 tera (1000GB) hard disk.
If the above command fail, need to force check
fsck -f -v
You may be ask with questions, just answer "y".
*** warning *** you may lose or already lost files. Answering "Y" may copy full or partial files to lost+found.
When finish just type exit and system will reboot.
One of the server running Backuppc and using USB storage to store the backup and I called it harisbackup. Its has one habit, in a period of a month, it will detect having a file system problem. The file system type is ext2. Before using ext2, I had use ext3, but USB storage keep on detaching itself after a few days. Changing to ext2 resolved the issue.
If you want to used, external storage, USB connecton is not a good option if you want to keep it permanent mounted. Used Firewire or Iscsi and format it with ext2 or reiserfs. ext4 not yet tested. I believe high IO between mounted file system and OS in long period of time like days, the device will disconnect itself.
If you get error messages as per below when rebooting the system. (Im using Linux Centos 5).
----- Start Message -----
harisbackup contains a file system with errors, check forced
harisbackup : | =============== |% (until it finish)
unattached inode 2050
root : UNEXPECTED INCONSISTENCY; run fsck MANUALLY
(i.e. , without -a or -p options)
*** An error occured during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance.
(Or type Control-D for normal startup);
---- End message ----
Keyin your root pasword and issue this command
fsck -p
This will check the hard disk. Time estimation around 45 minutes for 1 tera (1000GB) hard disk.
If the above command fail, need to force check
fsck -f -v
You may be ask with questions, just answer "y".
*** warning *** you may lose or already lost files. Answering "Y" may copy full or partial files to lost+found.
When finish just type exit and system will reboot.