On a deployment site, a storage device is used to store video files. The application server runs the SUSE 0 SP3 OS. LUN file systems mounted to the application server use the ext3 format. Based on the customer’s requirement, all stored video files need to be deleted, but these video files cannot be deleted by running the rm –rf command. After disks in the storage device are mounted to the application server, some video files can be deleted at first, but after a while, other video files cannot be deleted and an error that many file systems are in the read-only state is generated.
The alarm information is as follows:
storage_xz_09:/home/sa212/Disk11 # rm -rf 61*
rm: cannot remove `610126770_2008-01-02-10-21-31-548.tim': Read-only file system
rm: cannot remove `610126770_2008-01-02-14-22-03-803.hik': Read-only file system
rm: cannot remove `610126770_2008-01-02-14-22-03-803.tim': Read-only file system
rm: cannot remove `610126770_2008-01-02-16-22-19-930.hik': Read-only file system
rm: cannot remove `610126770_2008-01-02-16-22-19-930.tim': Read-only file system
rm: cannot remove `612199907_2007-12-20-09-38-38-541.hik': Read-only file system
The log information is as follows:
Jan 4 18:11:49 storage_xz_09 kern.err kernel: ext3_free_blocks: aborting transaction: Journal has aborted in __ext3_journal_get_undo_access<2>EXT3-fs error (device sdw1) in ext3_free_blocks: Journal has aborted
Step 1 Unmount the disks in the storage device from the application server
Step 2 Run the fsck.ext3 /dev/sdx command to restore the partitions of SAN resources.
Step 3 Mount the disks again and run the rm -rf command to delete all video files.
Step 4 If the customer does not need to retain the original data, this fault can be rectified by reformatting disk partitions
When disk /dev/sdx is just mounted to the application server, run the cat /proc/mounts command to find that the disk is in the rw state. Once video files cannot be deleted, run the cat /proc/mounts command again to find that the disk is in the ro state. I/O errors are generated on part of video files. Run the tune2fs -l /dev/sdx command to check the file systems and find that the file systems in the format of ext3 are damaged.
The file systems in the formats of ext2 and ext3 may be damaged in case of an unexpected shutdown or power failure. In the case, the fault occurs. To properly shut down the application server, unmount the storage resources from the server, stop the iSCSI service, and then run the shutdown command.