* e2fsck: Device or resource busy
@ 2008-06-02 18:29 Christian Kujau
2008-06-02 20:21 ` Theodore Tso
0 siblings, 1 reply; 4+ messages in thread
From: Christian Kujau @ 2008-06-02 18:29 UTC (permalink / raw)
To: linux-ext4
Hi there,
I'm trying to repair a severely damaged ext4 partition. Actually, I don't
care any more for the data, I just wanted to see how far I could get,
because the "damage" here is: the partition was 1/3 of a RAID-0 setup :)
So, if you're interested, read on. If not, please ignore this one...
So, after trying to (forcefully) repair an image of the parition[0], I'm
getting this now:
--------------------------------------------------------------
# losetup /dev/loop1 /mnt/cifs/backup/sdb2.img
# losetup -a
/dev/loop1: [0013]:1715743 (/mnt/cifs/backup/sdb2.img)
# file -s /dev/loop1
/dev/loop1: , 44.1 kHz, Stereo
# /opt/e2fsprogs/sbin/e2fsck /dev/loop1
e2fsck 1.41-WIP (27-Apr-2008)
/opt/e2fsprogs/sbin/e2fsck: Superblock invalid, trying backup blocks...
/opt/e2fsprogs/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/loop1
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
# /opt/e2fsprogs/sbin/e2fsck -b 8193 /dev/loop1
e2fsck 1.41-WIP (27-Apr-2008)
/opt/e2fsprogs/sbin/e2fsck: Device or resource busy while trying to open /dev/loop1
Filesystem mounted or opened exclusively by another program?
# losetup -a
/dev/loop1: [0013]:1715743 (/mnt/cifs/backup/sdb2.img)
# lsof -ln | grep loop
loop1 5065 0 cwd DIR 8,5 4096 2 /
loop1 5065 0 rtd DIR 8,5 4096 2 /
loop1 5065 0 txt unknown /proc/5065/exe
--------------------------------------------------------------
Does anyone have an idea why it says "Device or resource busy" as soon as
I specify an alternate superblock? Details and strace:
http://nerdbynature.de/bits/e2fsprogs.pu/sdb2/2008-06-02/
Thanks,
Christian.
[0] http://nerdbynature.de/bits/e2fsprogs.pu/sdb2/2008-05-25/
--
BOFH excuse #47:
Complete Transient Lockout
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: e2fsck: Device or resource busy
2008-06-02 18:29 e2fsck: Device or resource busy Christian Kujau
@ 2008-06-02 20:21 ` Theodore Tso
2008-06-02 22:23 ` Christian Kujau
0 siblings, 1 reply; 4+ messages in thread
From: Theodore Tso @ 2008-06-02 20:21 UTC (permalink / raw)
To: Christian Kujau; +Cc: linux-ext4
On Mon, Jun 02, 2008 at 08:29:24PM +0200, Christian Kujau wrote:
> Hi there,
>
> I'm trying to repair a severely damaged ext4 partition. Actually, I don't
> care any more for the data, I just wanted to see how far I could get,
> because the "damage" here is: the partition was 1/3 of a RAID-0 setup :)
The key thing that you need to do when trying to recover from RAID
setups where you are missing one or more disks is to align the pieces
so they are in their original places, with the missing pieces replaced
with a /dev/zero device.
There is a starting point here which you may find helpful:
http://debian.co.nz/Recovery+of+RAID+and+LVM2.html
http://tldp.org/HOWTO/LVM-HOWTO/index.html
http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html
(I'm assuming here you were using software RAID; if this was a
hardware RAID setup, then you need to know what sort of low-level
format was used by your hardware RAID device.)
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: e2fsck: Device or resource busy
2008-06-02 20:21 ` Theodore Tso
@ 2008-06-02 22:23 ` Christian Kujau
2008-06-03 0:00 ` Theodore Tso
0 siblings, 1 reply; 4+ messages in thread
From: Christian Kujau @ 2008-06-02 22:23 UTC (permalink / raw)
To: Theodore Tso; +Cc: linux-ext4
On Mon, 2 Jun 2008, Theodore Tso wrote:
> The key thing that you need to do when trying to recover from RAID
> setups where you are missing one or more disks is to align the pieces
> so they are in their original places, with the missing pieces replaced
> with a /dev/zero device.
Hm, interesting, I did not consider that yet. Thanks for the links, I'll
have a look. But again: I don't really care for the data, I was just
playing around and wondering why it reported "Device or resource busy"
when I expected something like "unable to find superblock".
> (I'm assuming here you were using software RAID; if this was a
Yes, it was software RAID.
Thanks again,
Christian.
--
BOFH excuse #112:
The monitor is plugged into the serial port
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: e2fsck: Device or resource busy
2008-06-02 22:23 ` Christian Kujau
@ 2008-06-03 0:00 ` Theodore Tso
0 siblings, 0 replies; 4+ messages in thread
From: Theodore Tso @ 2008-06-03 0:00 UTC (permalink / raw)
To: Christian Kujau; +Cc: linux-ext4
On Tue, Jun 03, 2008 at 12:23:48AM +0200, Christian Kujau wrote:
> On Mon, 2 Jun 2008, Theodore Tso wrote:
>> The key thing that you need to do when trying to recover from RAID
>> setups where you are missing one or more disks is to align the pieces
>> so they are in their original places, with the missing pieces replaced
>> with a /dev/zero device.
>
> Hm, interesting, I did not consider that yet. Thanks for the links, I'll
> have a look. But again: I don't really care for the data, I was just
> playing around and wondering why it reported "Device or resource busy"
> when I expected something like "unable to find superblock".
That will only happen if someone else has opened the device with
O_EXCL. Are you sure you didn't ^Z an e2fsck or some such and then
started a second one, or some such?
Is this repeatable?
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-03 0:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-02 18:29 e2fsck: Device or resource busy Christian Kujau
2008-06-02 20:21 ` Theodore Tso
2008-06-02 22:23 ` Christian Kujau
2008-06-03 0:00 ` Theodore Tso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).