Recover a Corrupt File System

The Linux File system

The Linux file system is a collection of directories and files stored on the disk. You can verify which file system your server utilizes by running the below command:

[root@example ~]# df –T
Filesystem    Type   1K-blocks      Used       Available    Use%   Mounted on
/dev/sda1     ext3      5160576    1795916   3102516    37%       /
tmpfs            tmpfs     1048576         0            1048576    0%     /dev/shm

By running the command df –T  (print file system type) , we can see this server has an Ext3 file system. Ext3 is an enhanced version of Ext2 with improved journaling, which allows for greater reliability and even faster file system recoveries.

A Corrupt File System

If you are in the middle of doing a system update or scaling the machine’s resources and the machine is then powered off unexpectedly, the server might suffer from a corrupt file system. When the file system becomes corrupt, it is unable to boot into normal mode.

You are able to verify if the file system is corrupt by rebooting the machine into Recovery through the Zunicore User portal. Once the machine is rebooted into Recovery, you can try to run the following commands to determine the file system’s status:

[root@onapp ~]# mkdir /zunicore
[root@onapp ~]# mount /dev/sdb1 /zunicore
EXT3-fs warning: mounting fs with errors, running e2fsk is recommended

Restore the Corrupted System

You can easily restore a corrupted file system while using Zunicore’s Recovery feature. To correct the file system, you will need to run the fsck command. Fsck is a file system check utility that can check the system for inconsistencies and also repair discovered issues.

When you are using the Zunicore Recovery feature, your disk’s drive is labeled sdb1. So, you will need to run the fsck command against /dev/sdb1.

[root@onapp ~]# fsck -yf /dev/sdb1
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Filesystem contains large files, but lacks LARGE_FILE flag in superblock.
Fix? yes

The fsck option –y will fix errors without prompting you each time the system attempts to fix a discovered issue.  The –f option will perform a quick check of any system that was not properly unmounted  before a system halt.

Once the fsck command is complete, you can reboot the system into normal mode.

0 Responses to “Recover a Corrupt File System”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Twitter Updates

  • @PoonHealey Hello, We do not offer phone support for the Zunicore platform. You can get a hold of us with live chat. Live chat is av... 1 year ago
  • @artifaktCom Hello, An API will be available soon that will allow you to obtain this output. Right now, the API is undergoing signifi... 1 year ago
  • @jonathansuter Hello, We can reply back with any answers you need. Please update this with any questions that you have. 1 year ago
  • @RyanCorner Hello, We will forward this information to our development team. We will update this ticket when completed. 1 year ago
  • @beagile Hello, You would have to use the templates we offer. But if you spin up two VHDs on the server, you can always copy the data... 1 year ago
  • @indiejustin Hello Justin, Can you create a ticket in our internal system so i can verify you and then determine the issue of the VM. 1 year ago
  • @kangawallafox Hello Shaun. I am not seeing a ticket under your name. Please respond to the ticket via the user portal and we will respond. 1 year ago
  • @josephoenix Hello Joseph. Please submit a ticket to [email protected] stating you'd like to deactivate your account and we'll handle it. 1 year ago
  • @Open_Universe That is great to hear. If any assistance is needed, please let us know. Have a great day and enjoy your time in the cloud! 2 years ago
  • @Open_Universe If you can provide the email address that is associated with your account, we will create a ticket and inform you when ready 2 years ago

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: