LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-12-2020, 12:13 AM   #1
tecsun
LQ Newbie
 
Registered: Dec 2020
Location: Kuala Lumpur, Malaysia
Distribution: CentOS, Ubuntu
Posts: 4

Rep: Reputation: Disabled
After recovered LVM from Too Small for Target, XFS does not mount


Hello everyone. I've encountered the same issue as discussed in this original thread:
https://www.linuxquestions.org/quest...et-4175620516/

However, my filesystem cannot be mount. Appreciate if anyone could help.

Here's the description of my problem.
Quote:
Hi rknichols & JWolberg,

This thread is very helpful! I'm facing the exact problem, the server suddenly cannot see the volume when I was copying data over SMB into the volume. All disks health are good. Not using any thin-provisioning. I have no clue at all why it happened.

I've managed to recover my volume following the steps discussed above. However, after creating /dev/zzbigdev, I cannot mount it.
Code:
mount: Structure needs cleaning
I'm using:
  • Ubuntu 14.04
  • LVM2 on a mdadm RAID-6
  • The volume formatted with XFS

I googled and people are suggesting to do xfs_metadump to a file to test it. But whenever I run xfs_metadump, it either give an error (see below) or just hang there (the server still responding to putty but cannot login new session, it displays nothing after password is enter. GUI screen also halted). I've restarted the server multiple times but still cannot. Any clue?
Code:
root@xe5:~# xfs_metadump /dev/xe5-2tr6/lfcold /media/lfxe3/8TB-backup/recover/output.dump
xfs_metadump: cannot init perag data (117)
xfs_metadump: duplicate name for inode 0 in dir inode 6500231229

*** Error in `xfs_db': free(): invalid next size (normal): 0x0000000000ca8000 ***
 
Old 12-12-2020, 08:21 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The storage device contains a filesystem with inconsistent data that, it seems, can't be repaired automatically (when necessary, XFS performs automatic repairs at mount time). I guess that human intervention is required to decide whether some data can be deleted.

I would run xfs_repair and carefully analyze the output to see what kind of data would be overwritten to restore consistency. xfs_db could be used to recover data without mounting.

Also search the internet for "structure needs cleaning". I found this very detailed discussion of the risks and issues involved in xfs_repair: https://serverfault.com/questions/85...ing-xfs-errors.

Last edited by berndbausch; 12-12-2020 at 08:24 PM.
 
Old 12-13-2020, 08:15 AM   #3
tecsun
LQ Newbie
 
Registered: Dec 2020
Location: Kuala Lumpur, Malaysia
Distribution: CentOS, Ubuntu
Posts: 4

Original Poster
Rep: Reputation: Disabled
I managed to ddrescue to an image file, and run xfs_repair -L to the image file. However, the recovered files are mostly in lost+found, losing directory structure and filename. =( Too much manual work need to be done, so I'm going to try another approach.

I'm wondering if I grow the size of the /dev/md0 (my raid device,which claim by LVM that it is too small... it is kinda weird that it happened suddenly though)。 I will post the result here.

Thanks for the link.
 
Old 12-13-2020, 04:51 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,146

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
It's probably too late for that - the errors are in the filesystem structure itself. Adding space to the array is pretty safe, but I'm never keen to do recovery on the real data - work on another image. Create another vg (non-RAID is fine) and screw around with a copy of the data over there.

Note my sigline.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot bring LVM online. Too small for target. JWolberg Linux - Server 27 12-12-2020 12:14 AM
LXer: My Nerd Life: Too Loud, Too Funny, Too Smart, Too Fat LXer Syndicated Linux News 0 01-24-2014 05:21 AM
[SOLVED] Can a xfs partition be recovered after being partitioned to etx4? Yaze Linux - General 15 10-12-2013 07:56 PM
How do I find the target directory (not the target fs) of a mount -bind raananh Linux - Newbie 2 01-13-2013 09:18 AM
kdebase not recognizing XFree86-xfs package as xfs mikeyt_333 Linux - Software 1 08-17-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration