All of lore.kernel.org
 help / color / mirror / Atom feed
* 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

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 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.