From: Eric Sandeen <sandeen@sandeen.net>
To: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: xfs@oss.sgi.com
Subject: Re: badly destroyed XFS (on LVM) - how to repair?
Date: Mon, 14 May 2012 10:12:30 -0500 [thread overview]
Message-ID: <4FB120DE.4030703@sandeen.net> (raw)
In-Reply-To: <1763478.Vy9F5bcWiZ@saturn>
On 5/12/12 7:49 AM, Michael Monnerie wrote:
> (This might be an LVM problem, but who knows?)
>
> I have here an XFS that was on a server running within a XenServer
> machine. In the end it existed of 4x 2TB disks:
> # pvscan
> PV /dev/xvdg VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvdf VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvdc VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvde VG sharestore lvm2 [1.95 TiB / 0 free]
> Total: 4 [7.81 TiB] / in use: 4 [7.81 TiB] / in no VG: 0 [0 ]
>
> Then by accident the admin made "fdisk /dev/xvdg", created a partition
> like this:
> Platte /dev/xvdg: 1073 MByte, 1073741824 Byte
> 139 Köpfe, 8 Sektoren/Spuren, 1885 Zylinder
> Einheiten = Zylinder von 1112 × 512 = 569344 Bytes
> Disk identifier: 0xb30cf4db
>
> Gerät boot. Anfang Ende Blöcke Id System
> /dev/xvdg1 1 1886 1048448 82 Linux Swap
>
> (partittion starting sector 63), and did "mkswap /dev/xvdg1". After a
> reboot, LVM did not recognize the full disk anymore.
>
> # pvscan
> Couldn't find device with uuid 396XfX-EbMZ-0J6q-C3bj-3n6d-vruJ-6Oiy7w.
> PV unknown device VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvdf VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvdc VG sharestore lvm2 [1.95 TiB / 0 free]
> PV /dev/xvde VG sharestore lvm2 [1.95 TiB / 0 free]
> Total: 4 [7.81 TiB] / in use: 4 [7.81 TiB] / in no VG: 0 [0
>
> This is where I jumped in. I must say that in the meantime the source VM
> got deleted, and that I only got access to the data disks. I believe
> /dev/xvdg was the very first of those LVM disks before, but I'm not
> sure.
>
> I tried "pvcreate --uuid 396XfX-EbMZ-0J6q-C3bj-3n6d-vruJ-6Oiy7w --
> norestorefile /dev/xvdg", which did not succeed.
> Then I made a backup of the first sectors of /dev/xvdg, and did
> "dd if=/dev/xvdf of=/dev/xvdg bs=512 count=63", and tried again with
> "pvcreate --uuid 396XfX-EbMZ-0J6q-C3bj-3n6d-vruJ-6Oiy7w --norestorefile
> /dev/xvdg" - this time it worked. Strange thing: /dev/sharestore/public
> is not created, it's only accessible via /dev/dm-0, but
> I can mount the XFS but it's destroyed, "ls" shows:
> ls: cannot access /1/hope: Invalid argument
> ls: cannot access /1/jog: Invalid argument
> ls: cannot access /1/maza: Invalid argument
> ls: cannot access /1/public: Invalid argument
> ls: cannot access /1/upload: Invalid argument
> ls: cannot access /1/du.old: Invalid argument
> ls: cannot access /1/.fsr: Invalid argument
> total 45
Anything in dmesg?
> drwxrwx--- 17 root 1000 4096 May 1 00:00 ./
> drwxr-xr-x 25 root root 632 May 12 12:42 ../
> ??????????? ? ? ? ? ? .fsr
> drwx------ 7 1007 nogroup 4096 Oct 19 2010 anse/
> -rw-r--r-- 1 root root 951 Jan 1 00:10 du.20120101
> -rw-r--r-- 1 root root 456 Feb 1 00:10 du.20120201
> -rw-r--r-- 1 root root 455 Mar 1 00:11 du.20120301
> -rw-r--r-- 1 root root 464 Apr 1 00:06 du.20120401
> -rw-r--r-- 1 root root 464 May 1 00:00 du.20120501
> ??????????? ? ? ? ? ? du.old
> -rwx------ 1 root root 253 Nov 7 2010 find-inode.sh*
> ??????????? ? ? ? ? ? hope
> drwxrwxr-x+ 4 1007 nogroup 49 Nov 29 2009 itm/
> ??????????? ? ? ? ? ? jog
> drwx------ 6 makedns nogroup 4096 Aug 24 2010 lama/
> ??????????? ? ? ? ? ? maza
> drwx------ 2 1008 nogroup 68 Jan 12 2010 paan/
> ??????????? ? ? ? ? ? public
> drwxrwxr-t 5 root www 4096 Mar 17 11:33 tmp/
> drwxr-xr-x 2 nobody root 144 Mar 17 11:41 torrent/
> ??????????? ? ? ? ? ? upload
> drwx------ 2 1003 nogroup 88 Nov 23 2009 vop/
>
> Then I made a xfs_metadump, and xfs_repair, both with version 3.0.1,
> which seems to not work. xfs_repair said this:
>
> # xfs_repair -n /dev/dm-0 2>&1|tee xfs.log
> Phase 1 - find and verify superblock...
...
> No modify flag set, skipping filesystem flush and exiting.
>
> So it found no error. I then installed xfsprogs 3.1.8, and tried the
> repair on the metadump:
>
> # xfs_repair xfs.metadump
You have to mdrestore the metadump before you can point repair it it, so that's not a valid operation. No
<later>
> Seems like it's an XFS problem - could someone help me here?
Considering that the problem began when the block device got
repartitioned etc, I don't see how this can be an XFS problem...
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-05-14 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-12 12:49 badly destroyed XFS (on LVM) - how to repair? Michael Monnerie
2012-05-12 13:43 ` Emmanuel Florac
2012-05-12 17:33 ` Michael Monnerie
2012-05-14 14:54 ` Michael Monnerie
2012-05-14 15:12 ` Eric Sandeen [this message]
2012-05-15 1:13 ` Michael Monnerie
-- strict thread matches above, loose matches on Subject: below --
2012-05-12 17:16 Michael Monnerie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB120DE.4030703@sandeen.net \
--to=sandeen@sandeen.net \
--cc=michael.monnerie@is.it-management.at \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.