Linux LVM Logical Volume error recovery case __linux

Source: Internet
Author: User

Use LVM to establish a logical volume as/dev/mapper/test-test.

Due to an abnormal shutdown, a logical volume error was made and cannot be mounted.

So check the logical volume and prompt:

# fsck.ext3-f/dev/mapper/test-test
E2fsck 1.38 (30-jun-2005)
Fsck.ext3:Attempt to read blocks from filesystem resulted into short read while trying to open/dev/mapper/test-test
Could this is a zero-length partition?

Then, look at the information for this logical volume:

# mkfs.ext3-n/dev/mapper/test-test
MKE2FS 1.38 (30-jun-2005)
FileSystem label=
OS Type:linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6553600 inodes, 13107200 blocks
655360 blocks (5.00%) reserved for the Super user
The Data block=0
Block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Then, try it and fix it with a spare super block:

# Fsck.ext3-b 163840/dev/mapper/test-test
E2fsck 1.38 (30-jun-2005)
Fsck.ext3:Attempt to read blocks from filesystem resulted into short read while trying to open/dev/mapper/test-test
Could this is a zero-length partition?

The result is still an error. Then try restarting the LVM service and performing

/ETC/INIT.D/LVM stop

/ETC/INIT.D/LVM start

And then execute:

# Fsck.ext3-b 163840/dev/mapper/test-test
E2fsck 1.38 (30-jun-2005)
EXT3 recovery flag is clear, but journal has data.
Recovery flag not set in Backup Superblock, so running journal anyway.
/dev/mapper/test-test:recovering Journal
Pass 1:checking inodes, blocks, and sizes
Pass 2:checking directory structure
Pass 3:checking Directory Connectivity
Pass 4:checking Reference counts
Pass 5:checking Group summary information

/dev/mapper/test-test: * * * * FILE SYSTEM was MODIFIED * * * * *
/dev/mapper/test-test:31/6553600 files (3.2% non-contiguous), 1823265/13107200 blocks

Perform/etc/init.d/checkfs.sh start, or you can check and repair the file system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.