lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Jun 2008 20:29:24 +0200 (CEST)
From:	Christian Kujau <lists@...dbynature.de>
To:	linux-ext4@...r.kernel.org
Subject: e2fsck: Device or resource busy

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists