All of lore.kernel.org
 help / color / mirror / Atom feed
* Need help retrieving data
@ 2006-08-24 17:43 Brian Davis
  2006-08-24 20:43 ` Hans Reiser
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Davis @ 2006-08-24 17:43 UTC (permalink / raw)
  To: reiserfs-list

Hello,

I've paid the 25 dollars, but I haven't gotten a 
response yet so I'm trying this list....

I have a disk which has a single partition with reiserfs version 3 on it.

One day I put the disk on a 3Ware 7506-4LP RAID controller card and 
tried to mount the partition through the normal mechanisms. (mount -t 
xfs /dev/..). It was not part of a RAID array, it was just setup as a 
single disk on the controller.

When I did this, mount hung for what seemed to be a long time and then 
Seg Faulted.  Since then I have not been able to mount the partition on 
either the RAID controller or a normal IDE controller.

I get the following error when trying to mount:

localhost ~ # mount -t reiserfs /dev/hde1 /stuff
mount: wrong fs type, bad option, bad superblock on /dev/hde1,
      missing codepage or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Checking /var/log/messages reveals the following:

ReiserFS: hde1: found reiserfs format "3.6" with standard journal
ReiserFS: hde1: using ordered data mode
ReiserFS: hde1: journal params: device hde1, size 8192, journal first 
block 18, max trans len 1024, max batch 900, max commit age 30, max 
trans age 30
ReiserFS: hde1: checking transaction log (hde1)
ReiserFS: hde1: warning: vs-7000: search_by_entry_key: search_by_key 
returned item position == 0

I then run reiserfsck, which doesn't find any errors:

localhost ~ # reiserfsck /dev/hde1
reiserfsck 3.6.19 (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/hde1
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 Tue Aug 22 19:21:46 2006
###########
Replaying journal..
Reiserfs journal '/dev/hde1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished                              
Comparing bitmaps..finished
Checking Semantic tree:
finished                                                                       

No corruptions found
There are on the filesystem:
       Leaves 40825
       Internal nodes 270
       Directories 2351
       Other files 34336
       Data block pointers 34474385 (536372 of them are zero)
       Safe links 0
###########
reiserfsck finished at Tue Aug 22 19:26:56 2006
###########

Trying to mount again after running reiserfsck still results in the same 
error as above.

I'm at a loss for the next steps to take, I'm hoping you can help be get 
my data back from this drive/partition.

Thanks,
Brian




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

* Re: Need help retrieving data
  2006-08-24 17:43 Need help retrieving data Brian Davis
@ 2006-08-24 20:43 ` Hans Reiser
  2006-08-25 14:22   ` Brian Davis
  2006-09-01 10:30   ` Alex Efros
  0 siblings, 2 replies; 9+ messages in thread
From: Hans Reiser @ 2006-08-24 20:43 UTC (permalink / raw)
  To: Brian Davis; +Cc: reiserfs-list, reiserfs-dev, Alexander Zarochentcev

I am very sorry to inform you that our fsck guy is on vacation, and we
have no effective backup for him.

Hans

Brian Davis wrote:
> Hello,
>
> I've paid the 25 dollars, but I haven't gotten a response yet so I'm
> trying this list....
>
> I have a disk which has a single partition with reiserfs version 3 on it.
>
> One day I put the disk on a 3Ware 7506-4LP RAID controller card and
> tried to mount the partition through the normal mechanisms. (mount -t
> xfs /dev/..). It was not part of a RAID array, it was just setup as a
> single disk on the controller.
>
> When I did this, mount hung for what seemed to be a long time and then
> Seg Faulted.  Since then I have not been able to mount the partition
> on either the RAID controller or a normal IDE controller.
>
> I get the following error when trying to mount:
>
> localhost ~ # mount -t reiserfs /dev/hde1 /stuff
> mount: wrong fs type, bad option, bad superblock on /dev/hde1,
>      missing codepage or other error
>      In some cases useful info is found in syslog - try
>      dmesg | tail  or so
>
> Checking /var/log/messages reveals the following:
>
> ReiserFS: hde1: found reiserfs format "3.6" with standard journal
> ReiserFS: hde1: using ordered data mode
> ReiserFS: hde1: journal params: device hde1, size 8192, journal first
> block 18, max trans len 1024, max batch 900, max commit age 30, max
> trans age 30
> ReiserFS: hde1: checking transaction log (hde1)
> ReiserFS: hde1: warning: vs-7000: search_by_entry_key: search_by_key
> returned item position == 0
>
> I then run reiserfsck, which doesn't find any errors:
>
> localhost ~ # reiserfsck /dev/hde1
> reiserfsck 3.6.19 (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/hde1
> 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 Tue Aug 22 19:21:46 2006
> ###########
> Replaying journal..
> Reiserfs journal '/dev/hde1' in blocks [18..8211]: 0 transactions
> replayed
> Checking internal tree..finished                             
> Comparing bitmaps..finished
> Checking Semantic tree:
> finished                                                                      
>
> No corruptions found
> There are on the filesystem:
>       Leaves 40825
>       Internal nodes 270
>       Directories 2351
>       Other files 34336
>       Data block pointers 34474385 (536372 of them are zero)
>       Safe links 0
> ###########
> reiserfsck finished at Tue Aug 22 19:26:56 2006
> ###########
>
> Trying to mount again after running reiserfsck still results in the
> same error as above.
>
> I'm at a loss for the next steps to take, I'm hoping you can help be
> get my data back from this drive/partition.
>
> Thanks,
> Brian
>
>
>
>
>


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

* Re: Need help retrieving data
  2006-08-24 20:43 ` Hans Reiser
@ 2006-08-25 14:22   ` Brian Davis
  2006-08-25 16:02     ` Bernd Schubert
  2006-09-01 10:30   ` Alex Efros
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Davis @ 2006-08-25 14:22 UTC (permalink / raw)
  To: Hans Reiser; +Cc: reiserfs-list, reiserfs-dev, Alexander Zarochentcev

Do you guys think that a rebuild-tree will fix this problem?

Hans Reiser wrote:
> I am very sorry to inform you that our fsck guy is on vacation, and we
> have no effective backup for him.
>
> Hans
>
> Brian Davis wrote:
>   
>> Hello,
>>
>> I've paid the 25 dollars, but I haven't gotten a response yet so I'm
>> trying this list....
>>
>> I have a disk which has a single partition with reiserfs version 3 on it.
>>
>> One day I put the disk on a 3Ware 7506-4LP RAID controller card and
>> tried to mount the partition through the normal mechanisms. (mount -t
>> xfs /dev/..). It was not part of a RAID array, it was just setup as a
>> single disk on the controller.
>>
>> When I did this, mount hung for what seemed to be a long time and then
>> Seg Faulted.  Since then I have not been able to mount the partition
>> on either the RAID controller or a normal IDE controller.
>>
>> I get the following error when trying to mount:
>>
>> localhost ~ # mount -t reiserfs /dev/hde1 /stuff
>> mount: wrong fs type, bad option, bad superblock on /dev/hde1,
>>      missing codepage or other error
>>      In some cases useful info is found in syslog - try
>>      dmesg | tail  or so
>>
>> Checking /var/log/messages reveals the following:
>>
>> ReiserFS: hde1: found reiserfs format "3.6" with standard journal
>> ReiserFS: hde1: using ordered data mode
>> ReiserFS: hde1: journal params: device hde1, size 8192, journal first
>> block 18, max trans len 1024, max batch 900, max commit age 30, max
>> trans age 30
>> ReiserFS: hde1: checking transaction log (hde1)
>> ReiserFS: hde1: warning: vs-7000: search_by_entry_key: search_by_key
>> returned item position == 0
>>
>> I then run reiserfsck, which doesn't find any errors:
>>
>> localhost ~ # reiserfsck /dev/hde1
>> reiserfsck 3.6.19 (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/hde1
>> 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 Tue Aug 22 19:21:46 2006
>> ###########
>> Replaying journal..
>> Reiserfs journal '/dev/hde1' in blocks [18..8211]: 0 transactions
>> replayed
>> Checking internal tree..finished                             
>> Comparing bitmaps..finished
>> Checking Semantic tree:
>> finished                                                                      
>>
>> No corruptions found
>> There are on the filesystem:
>>       Leaves 40825
>>       Internal nodes 270
>>       Directories 2351
>>       Other files 34336
>>       Data block pointers 34474385 (536372 of them are zero)
>>       Safe links 0
>> ###########
>> reiserfsck finished at Tue Aug 22 19:26:56 2006
>> ###########
>>
>> Trying to mount again after running reiserfsck still results in the
>> same error as above.
>>
>> I'm at a loss for the next steps to take, I'm hoping you can help be
>> get my data back from this drive/partition.
>>
>> Thanks,
>> Brian
>>
>>
>>
>>
>>
>>     
>
>
>   

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

* Re: Need help retrieving data
  2006-08-25 14:22   ` Brian Davis
@ 2006-08-25 16:02     ` Bernd Schubert
  0 siblings, 0 replies; 9+ messages in thread
From: Bernd Schubert @ 2006-08-25 16:02 UTC (permalink / raw)
  To: reiserfs-list
  Cc: Brian Davis, Hans Reiser, reiserfs-dev, Alexander Zarochentcev

Hi Brian,

On Friday 25 August 2006 16:22, Brian Davis wrote:
> Do you guys think that a rebuild-tree will fix this problem?

I have no knowlegde about the reiserfs internals, but here's just a general 
advice - if you have sufficient free storage, use dd to backup your partition 
e.g. into an image file and run reiserfsck on this backup image-file as much 
as you want.

Otherwise, assuming Sasha is following the common russian holidays, he should 
be back next week or the week after.

Btw, that brings me up to an interesting question to the reiser folks. Here 
are the edge conditions:
  - one has a damaged partition as Brian has and it cannot be repaired
  - one backups this partion into an image file on a reiser3.6 partion
  - the "host" reiser3.6 partition has no other files, only this image file
  - now run 'reiserfsck --rebuild-tree --scan-whole-partition" on the "host" 
partition
  ==> Would this bring back the files into the "host" partition?

Cheers,
Bernd

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

* Re: Need help retrieving data
  2006-08-24 20:43 ` Hans Reiser
  2006-08-25 14:22   ` Brian Davis
@ 2006-09-01 10:30   ` Alex Efros
  2006-09-01 11:45     ` Alexander Zarochentsev
  1 sibling, 1 reply; 9+ messages in thread
From: Alex Efros @ 2006-09-01 10:30 UTC (permalink / raw)
  To: reiserfs-list


I've similar problem. Looks like --rebuild-tree finally fixed everything, but
there is a bug in reiserfsck because it doesn't see any errors while mount
unable to work.
I've a copy of this partition in file (3GB) on my harddrive in broken state
(i.e. before running any reiserfsck). I can't upload it, of course, :) but
if you wish to analyse it I can run anything you say on this file and send
you results. I'll keep this file while I'm waiting for your answers - about
a week.
(I'm not really subscribed to list, so please CC: me, but I'll monitor this
thread using web gate www.nabble.com anyway.)

I've no idea how filesystem become damaged. Only suspicious thing was dead
CMOS battery (this comp is old Celeron 333), but I don't really think dead
CMOS battery can affect this... So, linux was booted 2-3 times after BIOS
warning 'Press F1 to continue' and on next boot Grub refuse to boot with
'Error 17'. There no bad blocks on this partition.

I've moved harddrive to another comp and checked reiserfs, results is below.
Here is configuration of these computers (both has Gentoo Hardened
installed).
Original:
    sys-fs/reiserfsprogs-3.6.19
    bzImage-2.6.14-hardened-r7
Fixer:
    sys-fs/reiserfsprogs-3.6.19
    bzImage-2.6.16-hardened-r10

-----------------------------------------------------------

# mount -t reiserfs /dev/hdc5 /mnt/cdrom/

2006-08-31_08:49:02.92678 kern.warn: ReiserFS: hdc5: warning: sh-2021:
reiserfs_fill_super: can not find reiserfs on hdc5

-----------------------------------------------------------

# reiserfsck /dev/hdc5
reiserfsck 3.6.19 (2003 www.namesys.com)
...
reiserfs_open: the reiserfs superblock cannot be found on /dev/hdc5.
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.

-----------------------------------------------------------

# reiserfsck --rebuild-sb /dev/hdc5
...
reiserfs_open: the reiserfs superblock cannot be found on /dev/hdc5.

what the version of ReiserFS do you use[1-4]
        (1)   3.6.x
        (2) >=3.5.9 (introduced in the middle of 1999) (if you use linux
2.2, choose this one)
        (3) < 3.5.9 converted to new format (don't choose if unsure)
        (4) < 3.5.9 (this is very old format, don't choose if unsure)
        (X)   exit
1

Enter block size [4096]: 
4096

No journal device was specified. (If journal is not available, re-run with
--no-journal-available option specified).
Is journal default? (y/n)[y]: y

Did you use resizer(y/n)[n]: n

rebuild-sb: You either have a corrupted journal or have just changed
the start of the partition with some partition table editor. If you are
sure that the start of the partition is ok, rebuild the journal header.
Do you want to rebuild the journal header? (y/n)[n]: y

Reiserfs super block in block 16 on 0x1605 of format 3.6 with standard
journal
Count of blocks on the device: 769104
Number of bitmaps: 24
Blocksize: 4096
Free blocks (count of blocks - used [journal, bitmaps, data, reserved]
blocks): 0
Root block: 0
Filesystem is NOT clean
Tree height: 0
Hash function used to sort names: not set
Objectid map size 0, max 972
Journal parameters:
        Device [0x0]
        Magic [0x0]
        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: 0
UUID: 4390ff17-0cca-462a-ae4f-8aa75f9f3dd8
LABEL: 
Set flags in SB:
Is this ok ? (y/n)[n]: y
The fs may still be unconsistent. Run reiserfsck --check.

-----------------------------------------------------------

# reiserfsck /dev/hdc5
...
###########
reiserfsck --check started at Thu Aug 31 11:55:23 2006
###########
Replaying journal..
Trans replayed: mountid 946, transid 887592, desc 4062, len 7, commit 4070,
next trans offset 4053
Trans replayed: mountid 946, transid 887593, desc 4071, len 1, commit 4073,
next trans offset 4056
Trans replayed: mountid 946, transid 887594, desc 4074, len 7, commit 4082,
next trans offset 4065
Trans replayed: mountid 946, transid 887595, desc 4083, len 1, commit 4085,
next trans offset 4068
Trans replayed: mountid 946, transid 887596, desc 4086, len 16, commit 4103,
next trans offset 4086
Trans replayed: mountid 946, transid 887597, desc 4104, len 7, commit 4112,
next trans offset 4095
Reiserfs journal '/dev/hdc5' in blocks [18..8211]: 6 transactions replayed
hecking internal tree..finished                               
Comparing bitmaps..finished
Checking Semantic tree:
finished                                                                       
No corruptions found
There are on the filesystem:
        Leaves 47645
        Internal nodes 307
        Directories 28553
        Other files 217465
        Data block pointers 661164 (25894 of them are zero)
        Safe links 1
###########
reiserfsck finished at Thu Aug 31 11:59:37 2006
###########

-----------------------------------------------------------

# mount -t reiserfs /dev/hdc5 /mnt/cdrom/

2006-08-31_09:07:44.70007 kern.notice: ReiserFS: hdc5: found reiserfs format
"3.6" with standard journal
2006-08-31_09:07:44.94496 kern.notice: ReiserFS: hdc5: using ordered data
mode
2006-08-31_09:07:44.95777 kern.notice: ReiserFS: hdc5: journal params:
device hdc5, size 8192, journal first block 18, max trans len 1024, max
batch 900, max commit age 30, max trans age 30
2006-08-31_09:07:44.95868 kern.notice: ReiserFS: hdc5: checking transaction
log (hdc5)
2006-08-31_09:07:45.02493 kern.warn: ReiserFS: hdc5: warning: vs-7000:
search_by_entry_key: search_by_key returned item position == 0

-----------------------------------------------------------

# reiserfsck /dev/hdc5
...
###########
reiserfsck --check started at Thu Aug 31 12:08:42 2006
###########
Replaying journal..
Reiserfs journal '/dev/hdc5' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished                               
Comparing bitmaps..finished
Checking Semantic tree:
finished                                                                       
No corruptions found
There are on the filesystem:
        Leaves 47645
        Internal nodes 307
        Directories 28553
        Other files 217465
        Data block pointers 661164 (25894 of them are zero)
        Safe links 1
###########
reiserfsck finished at Thu Aug 31 12:13:01 2006
###########

-----------------------------------------------------------

# mount -t reiserfs /dev/hdc5 /mnt/cdrom/

2006-08-31_09:13:26.36449 kern.notice: ReiserFS: hdc5: found reiserfs format
"3.6" with standard journal
2006-08-31_09:13:26.61720 kern.notice: ReiserFS: hdc5: using ordered data
mode
2006-08-31_09:13:26.62994 kern.notice: ReiserFS: hdc5: journal params:
device hdc5, size 8192, journal first block 18, max trans len 1024, max
batch 900, max commit age 30, max trans age 30
2006-08-31_09:13:26.63087 kern.notice: ReiserFS: hdc5: checking transaction
log (hdc5)
2006-08-31_09:13:26.69717 kern.warn: ReiserFS: hdc5: warning: vs-7000:
search_by_entry_key: search_by_key returned item position == 0

-----------------------------------------------------------

# reiserfsck --rebuild-tree /dev/hdc5
...
Replaying journal..
Reiserfs journal '/dev/hdc5' in blocks [18..8211]: 0 transactions replayed
###########
reiserfsck --rebuild-tree started at Thu Aug 31 12:15:35 2006
###########

Pass 0:
####### Pass 0 #######
Loading on-disk bitmap .. ok, 691456 blocks marked used
Skipping 8234 blocks (super block, journal, bitmaps) 683222 blocks will be
read
0%....20%....40%....60%block 496367: The number of items (31) is incorrect,
should be (1) - corrected
block 496367: The free space (5825) is incorrect, should be (4048) -
corrected
pass0: vpf-10110: block 496367, item (0): Unknown item type found [37280 205
0x10002 ??? (15)] - deleted
....80%....100%                        left 0, 3036 /sec
246017 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not
set).
        "r5" hash is selected
Flushing..finished
        Read blocks (but not data blocks) 683222
                Leaves among those 47647
                        - leaves all contents of which could not be saved
and deleted 2
                Objectids found 246880

Pass 1 (will try to insert 47645 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....100%                         left 0, 680
/sec
Flushing..finished
        47645 leaves read
                47351 inserted
                294 not inserted
####### Pass 2 #######

Pass 2:
0%....20%....40%....60%....80%....100%                           left 0, 0
/sec
Flushing..finished
        Leaves inserted item by item 294
Pass 3 (semantic):
####### Pass 3 #########
Flushing..finished                                                             
        Files found: 212104
        Directories found: 28554
        Symlinks found: 3668
        Others: 311
Pass 3a (looking for lost dir/files):
####### Pass 3a (lost+found pass) #########
Looking for lost directories:
Looking for lost files:7 /sec
Flushing..finishede 0, 0 /sec
        Objects without names 1
        Files linked to /lost+found 1
Pass 4 - finished   done 6512, 77 /sec
Flushing..finished
Syncing..finished
###########
reiserfsck finished at Thu Aug 31 12:22:32 2006
###########

-----------------------------------------------------------

# mount -t reiserfs /dev/hdc5 /mnt/cdrom/

2006-08-31_09:23:32.10428 kern.notice: ReiserFS: hdc5: found reiserfs format
"3.6" with standard journal
2006-08-31_09:23:32.34628 kern.notice: ReiserFS: hdc5: using ordered data
mode
2006-08-31_09:23:32.37018 kern.notice: ReiserFS: hdc5: journal params:
device hdc5, size 8192, journal first block 18, max trans len 1024, max
batch 900, max commit age 30, max trans age 30
2006-08-31_09:23:32.37114 kern.notice: ReiserFS: hdc5: checking transaction
log (hdc5)
2006-08-31_09:23:32.41506 kern.notice: ReiserFS: hdc5: Using r5 hash to sort
names


-- 
View this message in context: http://www.nabble.com/Need-help-retrieving-data-tf2160099.html#a6096245
Sent from the ReiserFS - General forum at Nabble.com.


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

* Re: Need help retrieving data
  2006-09-01 10:30   ` Alex Efros
@ 2006-09-01 11:45     ` Alexander Zarochentsev
  2006-09-02  9:32       ` Alex Efros
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Zarochentsev @ 2006-09-01 11:45 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alex Efros

On 1 September 2006 14:30, Alex Efros wrote:
> I've similar problem. Looks like --rebuild-tree finally fixed
> everything, but there is a bug in reiserfsck because it doesn't see
> any errors while mount unable to work.
> I've a copy of this partition in file (3GB) on my harddrive in broken
> state (i.e. before running any reiserfsck). I can't upload it, of
> course, :) but if you wish to analyse it I can run anything you say
> on this file and send you results. I'll keep this file while I'm
> waiting for your answers - about a week.
> (I'm not really subscribed to list, so please CC: me, but I'll
> monitor this thread using web gate www.nabble.com anyway.)
>
> I've no idea how filesystem become damaged. Only suspicious thing was
> dead CMOS battery (this comp is old Celeron 333), but I don't really
> think dead CMOS battery can affect this... So, linux was booted 2-3
> times after BIOS warning 'Press F1 to continue' and on next boot Grub
> refuse to boot with 'Error 17'. There no bad blocks on this
> partition.
>
> I've moved harddrive to another comp and checked reiserfs, results is
> below. Here is configuration of these computers (both has Gentoo
> Hardened installed).
> Original:
>     sys-fs/reiserfsprogs-3.6.19
>     bzImage-2.6.14-hardened-r7
> Fixer:
>     sys-fs/reiserfsprogs-3.6.19
>     bzImage-2.6.16-hardened-r10
>
> -----------------------------------------------------------
>
> # mount -t reiserfs /dev/hdc5 /mnt/cdrom/
>
> 2006-08-31_08:49:02.92678 kern.warn: ReiserFS: hdc5: warning:
> sh-2021: reiserfs_fill_super: can not find reiserfs on hdc5
>
> -----------------------------------------------------------
>
> # reiserfsck /dev/hdc5
> reiserfsck 3.6.19 (2003 www.namesys.com)
> ...
> reiserfs_open: the reiserfs superblock cannot be found on /dev/hdc5.
> 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.
>
> -----------------------------------------------------------
>
> # reiserfsck --rebuild-sb /dev/hdc5
> ...
> reiserfs_open: the reiserfs superblock cannot be found on /dev/hdc5.
>
> what the version of ReiserFS do you use[1-4]
>         (1)   3.6.x
>         (2) >=3.5.9 (introduced in the middle of 1999) (if you use
> linux 2.2, choose this one)
>         (3) < 3.5.9 converted to new format (don't choose if unsure)
>         (4) < 3.5.9 (this is very old format, don't choose if unsure)
>         (X)   exit
> 1
>
> Enter block size [4096]:
> 4096
>
> No journal device was specified. (If journal is not available, re-run
> with --no-journal-available option specified).
> Is journal default? (y/n)[y]: y
>
> Did you use resizer(y/n)[n]: n
>
> rebuild-sb: You either have a corrupted journal or have just changed
> the start of the partition with some partition table editor. If you
> are sure that the start of the partition is ok, rebuild the journal
> header. Do you want to rebuild the journal header? (y/n)[n]: y
>
> Reiserfs super block in block 16 on 0x1605 of format 3.6 with
> standard journal
> Count of blocks on the device: 769104
> Number of bitmaps: 24
> Blocksize: 4096
> Free blocks (count of blocks - used [journal, bitmaps, data,
> reserved] blocks): 0
> Root block: 0
> Filesystem is NOT clean
> Tree height: 0
> Hash function used to sort names: not set
> Objectid map size 0, max 972
> Journal parameters:
>         Device [0x0]
>         Magic [0x0]
>         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: 0
> UUID: 4390ff17-0cca-462a-ae4f-8aa75f9f3dd8
> LABEL:
> Set flags in SB:
> Is this ok ? (y/n)[n]: y
> The fs may still be unconsistent. Run reiserfsck --check.
>
> -----------------------------------------------------------
>
> # reiserfsck /dev/hdc5
> ...
> ###########
> reiserfsck --check started at Thu Aug 31 11:55:23 2006
> ###########
> Replaying journal..
> Trans replayed: mountid 946, transid 887592, desc 4062, len 7, commit
> 4070, next trans offset 4053
> Trans replayed: mountid 946, transid 887593, desc 4071, len 1, commit
> 4073, next trans offset 4056
> Trans replayed: mountid 946, transid 887594, desc 4074, len 7, commit
> 4082, next trans offset 4065
> Trans replayed: mountid 946, transid 887595, desc 4083, len 1, commit
> 4085, next trans offset 4068
> Trans replayed: mountid 946, transid 887596, desc 4086, len 16,
> commit 4103, next trans offset 4086
> Trans replayed: mountid 946, transid 887597, desc 4104, len 7, commit
> 4112, next trans offset 4095
> Reiserfs journal '/dev/hdc5' in blocks [18..8211]: 6 transactions
> replayed hecking internal tree..finished
> Comparing bitmaps..finished
> Checking Semantic tree:
> finished
> No corruptions found
> There are on the filesystem:
>         Leaves 47645
>         Internal nodes 307
>         Directories 28553
>         Other files 217465
>         Data block pointers 661164 (25894 of them are zero)
>         Safe links 1
> ###########
> reiserfsck finished at Thu Aug 31 11:59:37 2006
> ###########
>
> -----------------------------------------------------------
>
> # mount -t reiserfs /dev/hdc5 /mnt/cdrom/
>
> 2006-08-31_09:07:44.70007 kern.notice: ReiserFS: hdc5: found reiserfs
> format "3.6" with standard journal
> 2006-08-31_09:07:44.94496 kern.notice: ReiserFS: hdc5: using ordered
> data mode
> 2006-08-31_09:07:44.95777 kern.notice: ReiserFS: hdc5: journal
> params: device hdc5, size 8192, journal first block 18, max trans len
> 1024, max batch 900, max commit age 30, max trans age 30
> 2006-08-31_09:07:44.95868 kern.notice: ReiserFS: hdc5: checking
> transaction log (hdc5)
> 2006-08-31_09:07:45.02493 kern.warn: ReiserFS: hdc5: warning:
> vs-7000: search_by_entry_key: search_by_key returned item position ==
> 0
>
> -----------------------------------------------------------

yes, it is the same bug, looks like fsck --rebuild-sb doesn't set hash 
function id in the super block and then fsck --check misses the error.

unfortunately no fix for fsck is available yet.

-- 
Alex.

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

* Re: Need help retrieving data
  2006-09-01 11:45     ` Alexander Zarochentsev
@ 2006-09-02  9:32       ` Alex Efros
  2006-09-02 11:26         ` Alexander Zarochentsev
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Efros @ 2006-09-02  9:32 UTC (permalink / raw)
  To: reiserfs-list


Hi!

So, I did everything correctly to fix it? --rebuild-tree doesn't broke
anything?

> unfortunately no fix for fsck is available yet.

If you provide fixed reiserfsck version, I can run it on my image to test it
and confirm image become mountabe after --rebuild-sb. But I can't leave this
3GB image on my drive for months, so if you wish this testing from me -
please provide fixed version in about 7-10 days or at least notify me when
it will be ready - if your need more time I probably move it to DVD-RW.

P.S. We can continue discussing this by email and in russian, if you wish.

--
   WBR, Alex.
-- 
View this message in context: http://www.nabble.com/Need-help-retrieving-data-tf2160099.html#a6110980
Sent from the ReiserFS - General forum at Nabble.com.


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

* Re: Need help retrieving data
  2006-09-02  9:32       ` Alex Efros
@ 2006-09-02 11:26         ` Alexander Zarochentsev
  2006-09-04 13:56           ` Vladimir V. Saveliev
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Zarochentsev @ 2006-09-02 11:26 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alex Efros

On 2 September 2006 13:32, Alex Efros wrote:
> Hi!
>
> So, I did everything correctly to fix it? --rebuild-tree doesn't
> broke anything?

usually not.

but reiserfsck --rebuild-tree is a complex operation. It has a possibility to 
insert wrong blocks into the tree if your fs was used to store another 
reiserfs image. and you have a chance to hit new reiserfsck bug.

> > unfortunately no fix for fsck is available yet.
>
> If you provide fixed reiserfsck version, I can run it on my image to
> test it and confirm image become mountabe after --rebuild-sb. But I
> can't leave this 3GB image on my drive for months, so if you wish

to make the partition mountable again it is enough to change 
one byte in the super block from 0 (hash is not set) to 3 (r5 hash).  
It can be done by a hex editor.

hexdump -C of block #16 (reiserfs uses 4k-size blocks, numbers start with 0):

...
00000030  06 00 01 00 52 65 49 73  45 72 32 46 73 00 00 00  |....ReIsEr2Fs...|
00000040  03 00 00 00 05 00 c6 04  02 00 00 00 89 28 00 00  |......Æ.....‰(..|
          ^^ 
          this byte.
...

according with:

struct reiserfs_super_block_v1 {
...
        char s_magic[10];       /* reiserfs magic string indicates that
                                 * file system is reiserfs:
                                 * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */
        __le16 s_fs_state;      /* it is set to used by fsck to mark which
                                 * phase of rebuilding is done */
        __le32 s_hash_function_code;    /* indicate, what hash function is being use
...

> this testing from me - please provide fixed version in about 7-10

> days or at least notify me when it will be ready - if your need more
> time I probably move it to DVD-RW.

I already have a broken fs to experiment with. 

-- 
Alex.


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

* Re: Need help retrieving data
  2006-09-02 11:26         ` Alexander Zarochentsev
@ 2006-09-04 13:56           ` Vladimir V. Saveliev
  0 siblings, 0 replies; 9+ messages in thread
From: Vladimir V. Saveliev @ 2006-09-04 13:56 UTC (permalink / raw)
  To: reiserfs-list; +Cc: Alexander Zarochentsev, Alex Efros

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]

Hello

On Saturday 02 September 2006 15:26, Alexander Zarochentsev wrote:
> On 2 September 2006 13:32, Alex Efros wrote:
> > Hi!
> >
> > So, I did everything correctly to fix it? --rebuild-tree doesn't
> > broke anything?
>
> usually not.
>
> but reiserfsck --rebuild-tree is a complex operation. It has a possibility
> to insert wrong blocks into the tree if your fs was used to store another
> reiserfs image. and you have a chance to hit new reiserfsck bug.
>
> > > unfortunately no fix for fsck is available yet.

I think it is not fsck bug. When hash code is unknown - it can be defined on 
mount. The attached patch is supposed to fix broken hash detection.

> >
> > If you provide fixed reiserfsck version, I can run it on my image to
> > test it and confirm image become mountabe after --rebuild-sb. But I
> > can't leave this 3GB image on my drive for months, so if you wish
>
> to make the partition mountable again it is enough to change
> one byte in the super block from 0 (hash is not set) to 3 (r5 hash).
> It can be done by a hex editor.
>
> hexdump -C of block #16 (reiserfs uses 4k-size blocks, numbers start with
> 0):
>
> ...
> 00000030  06 00 01 00 52 65 49 73  45 72 32 46 73 00 00 00 
> |....ReIsEr2Fs...| 00000040  03 00 00 00 05 00 c6 04  02 00 00 00 89 28 00
> 00  |......ф.....┴(..| ^^
>           this byte.
> ...
>
> according with:
>
> struct reiserfs_super_block_v1 {
> ...
>         char s_magic[10];       /* reiserfs magic string indicates that
>                                  * file system is reiserfs:
>                                  * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs"
> */ __le16 s_fs_state;      /* it is set to used by fsck to mark which *
> phase of rebuilding is done */
>         __le32 s_hash_function_code;    /* indicate, what hash function is
> being use ...
>
> > this testing from me - please provide fixed version in about 7-10
> >
> > days or at least notify me when it will be ready - if your need more
> > time I probably move it to DVD-RW.
>
> I already have a broken fs to experiment with.

[-- Attachment #2: reiserfs-fix-fill_super.patch --]
[-- Type: text/x-diff, Size: 3177 bytes --]


diff -puN fs/reiserfs/super.c~reiserfs-fix-fill_super fs/reiserfs/super.c
--- linux-2.6.18-rc4-mm1/fs/reiserfs/super.c~reiserfs-fix-fill_super	2006-09-01 21:13:02.000000000 +0400
+++ linux-2.6.18-rc4-mm1-vs/fs/reiserfs/super.c	2006-09-03 11:33:12.000000000 +0400
@@ -1384,7 +1384,7 @@ static __u32 find_hash_out(struct super_
 	do {			// Some serious "goto"-hater was there ;)
 		u32 teahash, r5hash, yurahash;
 
-		make_cpu_key(&key, inode, ~0, TYPE_DIRENTRY, 3);
+		make_cpu_key(&key, inode, LLONG_MAX, TYPE_DIRENTRY, 3);
 		retval = search_by_entry_key(s, &key, &path, &de);
 		if (retval == IO_ERROR) {
 			pathrelse(&path);
@@ -1549,7 +1549,7 @@ static int reiserfs_fill_super(struct su
 	struct reiserfs_super_block *rs;
 	char *jdev_name;
 	struct reiserfs_sb_info *sbi;
-	int errval = -EINVAL;
+	int errval;
 
 	sbi = kmalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL);
 	if (!sbi) {
@@ -1576,12 +1576,14 @@ static int reiserfs_fill_super(struct su
 	if (reiserfs_parse_options
 	    (s, (char *)data, &(sbi->s_mount_opt), &blocks, &jdev_name,
 	     &commit_max_age) == 0) {
+		errval = -EINVAL;
 		goto error;
 	}
 
 	if (blocks) {
 		SWARN(silent, s, "jmacd-7: reiserfs_fill_super: resize option "
 		      "for remount only");
+		errval = -EINVAL;
 		goto error;
 	}
 
@@ -1593,6 +1595,7 @@ static int reiserfs_fill_super(struct su
 		SWARN(silent, s,
 		      "sh-2021: reiserfs_fill_super: can not find reiserfs on %s",
 		      reiserfs_bdevname(s));
+		errval = -EINVAL;
 		goto error;
 	}
 
@@ -1610,6 +1613,7 @@ static int reiserfs_fill_super(struct su
 		      "You may need to run fsck or increase size of your LVM partition");
 		SWARN(silent, s,
 		      "Or may be you forgot to reboot after fdisk when it told you to");
+		errval = -EINVAL;
 		goto error;
 	}
 
@@ -1649,6 +1653,7 @@ static int reiserfs_fill_super(struct su
 	if (journal_init(s, jdev_name, old_format, commit_max_age)) {
 		SWARN(silent, s,
 		      "sh-2022: reiserfs_fill_super: unable to initialize journal space");
+		errval = -ENODEV;
 		goto error;
 	} else {
 		jinit_done = 1;	/* once this is set, journal_release must be called
@@ -1658,11 +1663,14 @@ static int reiserfs_fill_super(struct su
 	if (reread_meta_blocks(s)) {
 		SWARN(silent, s,
 		      "jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init");
+		errval = -ENODEV;
 		goto error;
 	}
 
-	if (replay_only(s))
+	if (replay_only(s)) {
+		errval = -EINVAL;
 		goto error;
+	}
 
 	if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
 		SWARN(silent, s,
@@ -1677,6 +1685,7 @@ static int reiserfs_fill_super(struct su
 	if (!root_inode) {
 		SWARN(silent, s,
 		      "jmacd-10: reiserfs_fill_super: get root inode failed");
+		errval = -ENODEV;
 		goto error;
 	}
 
@@ -1688,6 +1697,7 @@ static int reiserfs_fill_super(struct su
 	s->s_root = d_alloc_root(root_inode);
 	if (!s->s_root) {
 		iput(root_inode);
+		errval = -ENOMEM;
 		goto error;
 	}
 	// define and initialize hash function
@@ -1695,6 +1705,7 @@ static int reiserfs_fill_super(struct su
 	if (sbi->s_hash_function == NULL) {
 		dput(s->s_root);
 		s->s_root = NULL;
+		errval = -ENODEV;
 		goto error;
 	}
 

_

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

end of thread, other threads:[~2006-09-04 13:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 17:43 Need help retrieving data Brian Davis
2006-08-24 20:43 ` Hans Reiser
2006-08-25 14:22   ` Brian Davis
2006-08-25 16:02     ` Bernd Schubert
2006-09-01 10:30   ` Alex Efros
2006-09-01 11:45     ` Alexander Zarochentsev
2006-09-02  9:32       ` Alex Efros
2006-09-02 11:26         ` Alexander Zarochentsev
2006-09-04 13:56           ` Vladimir V. Saveliev

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.