Home > Enterprise Linux Tips > Administrator > Access and repair an ext3 file system with the superblock
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ADMINISTRATOR

Access and repair an ext3 file system with the superblock


Sander van Vugt, Contributor
10.07.2009
Rating: -4.25- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


You won't normally see many problems with your server's file system, but occasionally things go wrong and it will be damaged. In this article, you'll learn how to access a damaged ext3 file system.

If you receive a file system error, you will lose file system access. If it is an ext2 or ext3 file system, however, there is still a way in. Advanced mount options will help allow you to access data that you may have considered lost.

In order to gain this access, you need the superblock. This is a 1 KB block that contains all metadata about the file system, which is what you need to mount the file system. It is normally stored as the second 1 KB block on an ext3 file system. To show the contents of the superblock, you can use the utility. Listing 1 shows what the contents of the superblock looks like:

Listing 1: Contents of the superblock as displayed with debugfs

.

The problem with this command, however, is that it expects you to specify the position of the superblock in 1024-byte blocks, whereas the default block size for a modern ext3 volume or partition is 4096 bytes. Therefore, to tell the mount command where it can find the superblock, you have to multiply t...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Linux backup and storage
The Ext4 file system: A real improvement in Linux file storage?
After delay, Fedora 10 finally available
Comparing blades with rack servers on price, performance
Whirlwind Tech Tour: Linux questions and expert responses
SteelEye combines Linux server failover and remote data replication
Centralized access with iSCSI wraps it up: Open source SANs, part 4
Setting up DRBD in an open source SAN: Open source SANs, part 2
Adding Heartbeat to your open source SAN: Open source SANs, part 3
Installing the MySQL database server securely
Ubuntu remote backup

Linux monitoring and troubleshooting
Recovering a lost administration password on Ubuntu Server
Solving Linux server hangs stemming from kernel issues
How to solve logical volume management issues
Troubleshooting Logical Volume Manager boot problems
How to fix master boot record partition table problems
Five Linux commands you have (probably) never heard of
Backing up the Linux master boot record
Fixing Linux boot problems with GRUB
How well do you know Linux commands and tools?
Installing Nagios on Linux and unravelling software code names

Administrator
Creating virtual appliances with Novell SUSE Studio
Solving Linux server hangs stemming from kernel issues
How to solve logical volume management issues
Troubleshooting Logical Volume Manager boot problems
Linux provisioning automation with Cobbler
How to fix master boot record partition table problems
Five Linux commands you have (probably) never heard of
How to install and get started with OpenQRM
Backing up the Linux master boot record
Configuring YUM on Linux

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
DRBD (Distributed Replicated Block Device)  (SearchEnterpriseLinux.com)
gzip  (SearchEnterpriseLinux.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


he position of the superblock by four. This means you should enter the block value 141072 when the first backup superblock is stored on block 32768. If, for example, your /dev/sda5 file system had a problem, you could try mounting it with the command .

Now that you have mounted the problematic file system and limited the scope of the problem to the superblock, it is time to actually fix the problem. There are both easy and not-as-easy options available. Let's start with the tougher solution, in which you can copy the backup superblock back to the location of the old superblock with the utility. To do this, use the code . Once finished, your file system should be accessible just as it was before.

If you don't like this complex and somewhat geeky way of recovering the lost superblock, you can always go for the easy solution. Just enter the code and your superblock will be noted as damaged and get repaired for you.

ABOUT THE AUTHOR: Sander van Vugt is an author and independent technical trainer, specializing in Linux since 1994. Vugt is also a technical consultant for high-availability (HA) clustering and performance optimization, as well as an expert on SLED 10 administration.

Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts