A few days ago I encountered a Linux Ext3 file system superblock error problem.
.... bad superblock on /dev/hdc1 A colleague made a recovery, the result is to erase the data Later, I thought that the direct fsck recovery method at the time was wrong. The correct method should be like this:
1 Get the wrong disk (or device) block size. There are many ways to get it. For example, #tune2fs -l /dev/hdc1 is actually 1 K. 2 for the current error disk backup. The process of restoring the superblock is also a risky process. If there are other idle devices, use the dd command to back up the contents of the device.
3 In general, the super block error is basically the main super block error, created in the Ext2/Ext3 file system. At the same time, we will prompt on the screen that we have backed up the super block in several places. So how do you find out where these super blocks are? Let us look at the help information: -b superblockInstead of using the normal superblock, use an alternativesuperblock specified By The option is normally used when the primary superblock has been corrupted. The loca-tion of the backup superblock is dependent on the filesystem'sblocksize. For filesystems with 1k blocksizes, a backupsuperblock can be found at block 8193; for filesystems with 2kblocksizes, At block 16384; and for 4k blocksizes, at block32768.
Additional backup superblocks can be determined by using themke2fs program using the -n option to print out where the superblocks were created. The -b option to mke2fs, which spec -ifies blocksize of the filesystem must be specified in order for the superblock locations that are printed out to be accurate.
If an alternative superblock is specified and the filesystem is not opened read-only, e2fsck will make sure that the primarysuperblock Is updated responsive upon completion of the filesystem check.
4 Start recovery. If the file system block size is 1K, we can restore it with the following command:
# /sbin/fsck.ext3 -b 8193 /dev/hda4 if There is also a problem with the spare block (8193), then you can try 24577 (8192*3+1), or 40961 (8192*5+1).
You may also see that the super block is saved. It is according to the law of 1, 3, 5, 7. The specific position is in BlockSize(8192)*N+1. It is such a rule in the space of more than 500M. I don't know if it is less than 500M. Thank you.
view mysql default encoding format show variables like “character%”; If the reality-bash
I will talk about how to use the command in Linux to test the read and write input of the hard disk
First install CentOS6 to install rp-pppoe this software, the previous version of centos is installed
A flash drive is one of the most useful tools a person can have. With it, you can back up critical d
Rsync parameter parsing and rsync server
Restart Apache commands under Linux
Two measures to remedy the Linux system swap partition is too small
A sentence sentence iptables detailed Chinese manual
Linux installation using cacti
Desktop Linux opportunities come
CentOS 6.5 configuration yum install Nginx
Explain in detail how the Linux operating system kills the process
In WinXP, it is forbidden to modify the file attribute
Use Win7 to start menu search function
Win7 system Ifox video format conversion MP4 format method
What can I do if the Win10 English version cannot be changed to Chinese?
Win10 system operation tips 1 minute experience windows10 fresh sense
Windows 2000 operating system shared Internet Raiders
Windows system prompts are not internal or external commands or a solution to runnable programs.
Win8 convenient cloud synchronization Let file images be accessed everywhere