Taking the backup is a daunting task as it may lead to lost files, folders or accidental hard disk formatting. Ever your hard disk crash or leading to poor stability term? If the backup failed because of storage full or write problem to disk then following are some other ways to solve Linux & Unix system hard disk problems. These tips are based on Linux & UNIX server system to diagnose the hard disk problems by using the command line. Following methods or tips can protect against hard disk failure and backup of heterogeneous. Scroll down to pay attention to following tips to troubleshoot Backup problems.
5 Tips to solve Linux & Unix system hard disk problems like disk full or can’t write to the disk: –
-
No space left: –
In case, if your hard disk is full on Linux-Unix system and you are getting a message error of storage full then following fallocate command can help you for run out of the disk space. Follow the steps –
- First, type $df command to find out the information of total space, used space and free space.
- Now compress the files or logs by using tar or Gzip command.
- Delete unwanted files using rm command.
- Or move unwanted files to external disk by using rsync command
- Find out the largest file which is opened but deleted from system to truncate it by using the truncate command.
-
Use of cron command for daily basis backup: –
Find out one of the best ways to good backup is the toughest task, but Corn command is best to solve Linux & Unix system hard disk problems by taking daily basis backup. Make a rsync command from the previous section at 3:30 pm and edit root corn table by adding following command line –
30 3 * * * rsync -a –delete source/ destination/
Save the file and that’s all. The backup will happen at every 3:30 pm and root will get an e-mail.
-
Dump or tar command: –
These utilities were actually designed for writing a tape media. If you are using backup in incremental order, it may flow to backward with rsync command. The following summary is the difference of rsync and Dump or tar command to make it clear.
- If your Monday backup is full with Dump or tar command then it will contain everything with incremental backup and small changes as well.
- If your Monday backup is full with rsync command it will contain only the most recent changes. Just like it will contain only those files that are changed between Saturday or Sunday.
So, dump or tar method are still popular for per week backup than rsync command.
-
Is your hard drive is going to die?
Something going wrong, then you can check the errors to solve Linux & Unix system hard disk problems by using SMARTctl command. Following is the syntax to monitor this command smartctl -a /dev/DEVICE
or you can use the disk utility command to get backup same information on regular basis.
-
Read only mode: –
You may be fed up with getting an error while you are creating or saving a file to your Linux-UNIX system. Check the reason by using the following command –
$ cat > file
-bash: file: Read-only file system
Opps your file is in read-only mode. You can follow the following steps to fix this problem.
- Run mount command to find out which file is in read-only mode.
- Remount the filesystem in read- write mode by using mount -o remount,rw /ftpusers/tmp command.