All of lore.kernel.org
 help / color / mirror / Atom feed
* reiserfs in cryptoloop file is corrupt: all data lost?
@ 2005-10-19 19:27 Detlef Grittner
  2005-10-19 20:25 ` evilninja
  0 siblings, 1 reply; 3+ messages in thread
From: Detlef Grittner @ 2005-10-19 19:27 UTC (permalink / raw)
  To: reiserfs-list

I used a cryptoloop device with an reiserfs and made a copy/backup of 
the file containing the data.
I'm not completely sure, but I think it was mounted, when I copied it. 
Maybe this was a mistake.
Now I need the data from the backup and I can't mount the reiserfs using 
the cryptoloop device.
dmesg tells me the following:

ReiserFS: loop0: found reiserfs format "3.6" with standard journal
ReiserFS: loop0: using ordered data mode
reiserfs: using flush barriers
ReiserFS: loop0: journal params: device loop0, size 8192, journal first 
block 18, max trans len 1024, max batch 900, max commit age 30, max 
trans age 30
ReiserFS: loop0: checking transaction log (loop0)
ReiserFS: warning: is_tree_node: node level 123 does not match to the 
expected one 3
ReiserFS: loop0: warning: vs-5150: search_by_key: invalid format found 
in block 2195471. Fsck?
ReiserFS: loop0: warning: vs-13070: reiserfs_read_locked_inode: i/o 
failure occurred trying to find stat data of [1 2 0x0 SD]
ReiserFS: loop0: Using r5 hash to sort names
ReiserFS: loop0: warning: xattrs/ACLs enabled and couldn't find/create 
.reiserfs_priv. Failing mount.

An appropriate fstab entry, so a user is allowed to mount the device 
looks like this:
/home/userX/data         /home/userX/crypto  reiserfs   
user,noauto,loop=/dev/loop0,encryption=twofish256,phash=sha512,itercountk=100 
0 0

I have done a reiserfsck --check, which told me I should run reiserfsck 
--rebuild-sb and then a reiserfsck --rebuild-tree. The last one 
obviously failed and just told me that there is no reiserfs meta data.

Is there any hope to recover the data or is the filesystem already 
completely corrupted?
I want to know, if it is worth a try, otherwise I won't spend time and 
money on it.

Regards,

Detlef Grittner

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: reiserfs in cryptoloop file is corrupt: all data lost?
  2005-10-19 19:27 reiserfs in cryptoloop file is corrupt: all data lost? Detlef Grittner
@ 2005-10-19 20:25 ` evilninja
  2005-10-20 21:24   ` Detlef Grittner
  0 siblings, 1 reply; 3+ messages in thread
From: evilninja @ 2005-10-19 20:25 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Detlef Grittner

Detlef Grittner schrieb:
> An appropriate fstab entry, so a user is allowed to mount the device 
> looks like this:
> /home/userX/data         /home/userX/crypto  reiserfs   
> user,noauto,loop=/dev/loop0,encryption=twofish256,phash=sha512,itercountk=100 

so, you're using a file-backed cryptoloop setup? these setups are often 
reported to deadlock. but this only as a side-note...

> I have done a reiserfsck --check, which told me I should run reiserfsck 
> --rebuild-sb and then a reiserfsck --rebuild-tree. The last one 
> obviously failed and just told me that there is no reiserfs meta data.

you ran reiserfsck on what? on the losetup'ed /dev/loop0 i hope ;-)
please provide the output of the reiserfsck run. please make sure that 
you're running a current version of reiserfsprogs / current kernel.

> I want to know, if it is worth a try, otherwise I won't spend time and 
> money on it.

well, it's only $25 at http://www.namesys.com/support.html ;-)

Christian.
-- 
BOFH excuse #34:

(l)user error

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: reiserfs in cryptoloop file is corrupt: all data lost?
  2005-10-19 20:25 ` evilninja
@ 2005-10-20 21:24   ` Detlef Grittner
  0 siblings, 0 replies; 3+ messages in thread
From: Detlef Grittner @ 2005-10-20 21:24 UTC (permalink / raw)
  To: reiserfs-list

evilninja wrote:
> [...]
> you ran reiserfsck on what? on the losetup'ed /dev/loop0 i hope ;-)
> please provide the output of the reiserfsck run. please make sure that 
> you're running a current version of reiserfsprogs / current kernel.
>
>
Yes, I use it on the losetup'ed /dev/loop0. Well, it took me some while 
to copy the 10 GB file for another run, but finally here is the complete 
output.

linux:/home/detgri # debugreiserfs /dev/loop0
debugreiserfs 3.6.18 (2003 www.namesys.com)


Filesystem state: consistent

Reiserfs super block in block 16 on 0x700 of format 3.6 with standard 
journal
Count of blocks on the device: 2621568
Number of bitmaps: 80
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] 
blocks): 660079
Root block: 2195471
Filesystem is clean
Tree height: 4
Hash function used to sort names: "r5"
Objectid map size 2, max 972
Journal parameters:
        Device [0x0]
        Magic [0x563f2dc5]
        Size 8193 blocks (including 1 for journal header) (first block 18)
        Max transaction length 1024 blocks
        Max batch size 900 blocks
        Max commit age 30
Blocks reserved by journal: 0
Fs state field: 0x0:
sb_version: 2
inode generation number: 1441
UUID: 5d2ea9cd-673d-469a-9cc9-50583421df1d
LABEL:
Set flags in SB:
        ATTRIBUTES CLEAN

==========================================


linux:/home/detgri # reiserfsck --check /dev/loop0
reiserfsck 3.6.18 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/loop0
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you 
do):Yes
bread: Cannot read the block (2621567): (Invalid argument).

reiserfs_open: Your partition is not big enough to contain the
filesystem of (2621567) blocks as was specified in the found super block.

Failed to open the filesystem.

If the partition table has not been changed, and the partition is
valid  and  it really  contains  a reiserfs  partition,  then the
superblock  is corrupted and you need to run this utility with
--rebuild-sb.

Abgebrochen

==========================================

linux:/home/detgri # reiserfsck --rebuild-sb /dev/loop0
reiserfsck 3.6.18 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will check superblock and rebuild it if needed
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you 
do):Yes

Did you use resizer(y/n)[n]: n
rebuild-sb: wrong block count occured (2621568), fixed (2621440)
Reiserfs super block in block 16 on 0x700 of format 3.6 with standard 
journal
Count of blocks on the device: 2621440
Number of bitmaps: 80
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved] 
blocks): 660079
Root block: 2195471
Filesystem is clean
Tree height: 4
Hash function used to sort names: "r5"
Objectid map size 2, max 972
Journal parameters:
        Device [0x0]
        Magic [0x563f2dc5]
        Size 8193 blocks (including 1 for journal header) (first block 18)
        Max transaction length 1024 blocks
        Max batch size 900 blocks
        Max commit age 30
Blocks reserved by journal: 0
Fs state field: 0x1:
         some corruptions exist.
sb_version: 2
inode generation number: 1441
UUID: 5d2ea9cd-673d-469a-9cc9-50583421df1d
LABEL:
Set flags in SB:
        ATTRIBUTES CLEAN
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.

==========================================


linux:/home/detgri # reiserfsck --check /dev/loop0
reiserfsck 3.6.18 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/loop0
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you 
do):Yes
###########
reiserfsck --check started at Thu Oct 20 23:13:21 2005
###########
Replaying journal..
No transactions found
Checking internal tree..block 2195471: The level of the node (123) is 
not correct, (3) expected
 the problem in the internal node occured (2195471), whole subtree is 
skipped
finished
Comparing bitmaps..vpf-10640: The on-disk and the correct bitmaps differs.
Bad nodes were found, Semantic pass skipped
1 found corruptions can be fixed only when running with --rebuild-tree
###########
reiserfsck finished at Thu Oct 20 23:13:25 2005
###########


==========================================


linux:/home/detgri # reiserfsck --rebuild-tree /dev/loop0
reiserfsck 3.6.18 (2003 www.namesys.com)

*************************************************************
** Do not  run  the  program  with  --rebuild-tree  unless **
** something is broken and MAKE A BACKUP  before using it. **
** If you have bad sectors on a drive  it is usually a bad **
** idea to continue using it. Then you probably should get **
** a working hard drive, copy the file system from the bad **
** drive  to the good one -- dd_rescue is  a good tool for **
** that -- and only then run this program.                 **
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will rebuild the filesystem (/dev/loop0) tree
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you 
do):Yes
Replaying journal..
No transactions found
###########
reiserfsck --rebuild-tree started at Thu Oct 20 23:14:12 2005
###########

Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 1959871 blocks marked used
Skipping 8282 blocks (super block, journal, bitmaps) 1951589 blocks will 
be read
0%....20%....40%....60%....80%....100%                        left 0, 
6920 /sec
Could not find a hash in use. Using "r5"
        "r5" hash is selected
Flushing..finished
        Read blocks (but not data blocks) 1951589
                Leaves among those 0
                Objectids found 2

Pass 1 (will try to insert 0 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished

Flushing..finished
        0 leaves read
                0 inserted
####### Pass 2 #######
Flushing..finished


No reiserfs metadata found.  If you are sure that you had the reiserfs
on this partition,  then the start  of the partition  might be changed
or all data were wiped out. The start of the partition may get changed
by a partitioner  if you have used one.  Then you probably rebuilt the
superblock as there was no one.  Zero the block at 64K offset from the
start of the partition (a new super block you have just built) and try
to move the start of the partition a few cylinders aside  and check if
debugreiserfs /dev/xxx detects a reiserfs super block. If it does this
is likely to be the right super block version.
If this makes you nervous, try  www.namesys.com/support.html,  and for
$25 the author of fsck,  or a colleague  if he is out,  will  step you
through it all.

Abgebrochen


==========================================

I'm absolutely sure that the file contained a reiserfs and I haven't 
changed any partitions. It's really only one cryptoloop file.

I'm using a SuSE 10.0 with the tools that are delivered with it.

linux:/home/detgri # uname -a
Linux linux 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 x86_64 
x86_64 x86_64 GNU/Linux


Any ideas, what I should do next?


Detlef

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-20 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-19 19:27 reiserfs in cryptoloop file is corrupt: all data lost? Detlef Grittner
2005-10-19 20:25 ` evilninja
2005-10-20 21:24   ` Detlef Grittner

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.