Several issues that might be related


Recommended Posts

Maybe some important information: I ran reiserfsk because my disk was mounted read-only. So after running reiserfsk --rebuild-tree, parity has never been rebuilt. Shoulnd't the data remain in the read-only state in parity? That way I could at least copy the data.

 

No, parity is updated with all changes made by reiserfsck, it always reflects the current disk state.

 

Here is the log of my last run of reiserfsk --rebuild-tree. Something important to note is the notice that the drive is full. Might that help fixing the issue?

 

The drive being full might prevent reiserfsck from fixing the issue.

Link to comment
  • Replies 115
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

So here is the ouput of --check. Again the same issue:

 

reiserfsck 3.6.24

Will read-only check consistency of the filesystem on /dev/md1
Will put log info to 'stdout'
###########
reiserfsck --check started at Sun Aug 21 16:40:48 2016
###########
Replaying journal: 
Replaying journal: Done.
Reiserfs journal '/dev/md1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..

Bad root block 0. (--rebuild-tree did not complete)

Link to comment

There's a way, but I don't think you are going to like it!  Replace that 3TB drive with a 4TB drive.  But that means having to replace the parity drive too, so you will have to buy 2 4TB or larger drives.  You would have to first rebuild parity with a larger drive, then rebuild Disk 1 onto a larger drive, then try reiserfsck with the --rebuild-tree option again.  I don't know if that's possible for you, but I can't think of any other ideas.  Unless reiserfsck can finish sufficiently to build a root block and superblock, you can't mount the drive to copy stuff off.

 

Just want to concur with everything johnnie.black has been saying.  I think once we gave you the rebuild-tree option, it became your go-to option, but unfortunately it's not a good option unless absolutely necessary.  You ALWAYS want to do the --check first, and then follow its instructions.  The rebuild-tree option is not a simple repair option, as it first tears down what's there before rebuilding from the ground up a new file system, similar to what formatting does.  It may not be able to recover every file, and it may recover previously deleted files.  You REALLY don't want to use it, unless there's no other option.

 

I would also like to say it's not a good idea to overfill a ReiserFS formatted drive.  We had a recent discussion about this, and basically concluded it's best to keep Reiser drives below 90% to 95% at most, *unless* you are using it as an archive drive with no further file maintenance (format it, fill it up, then only read from it).

Link to comment

Not sure that idea will work as the rebuild will start by creating a 3TB partition on the 4TB disk.  Normally the 3TB is then expanded to fill the 4TB disk after the rebuild finishes.  I am not sure that the file system can be expanded to use the additional space if it has corruption.

You're right of course, and I did think of that.  There's 2 parts to an expansion - first (I believe) unRAID creates the partition table, with a full partition for unRAID, effectively expanding the size, then once the rebuild is complete expands the file system.  The first part should not be a problem.  For the second part, it can't even mount the file system to resize it, but then we don't care what happens to the existing file system, because we're going to use the --rebuild-tree option, which effectively starts from scratch on the whole partition.

 

But you're right, I don't think we know of anyone that's tried this, so there may still be some unknown reason it won't work.

Link to comment

Based on Rob's idea, this should also work and you only need one new disk:

 

-get a new 4TB disk

-connect it to your server but leave it unassigned

-use dd to clone disk1 to the new disk

-run reiserfsck on the unassigned new disk

-if successful you can then format disk1 and copy all data from the new disk

Link to comment

Hi everyone, sorry for replying that late. I actually already have a spare 4TB drive. Which way should I go? Trying the suggestion with only one new drive? This sounds quite safe since I only copy over data, right? I will do so over the weekend and report back. Thank you!

Link to comment

I'd use the single disk option 1st, it's safe and if it doesn't work you can still try the other one.

 

Use dd to clone the disk, stop the array before (though since disk is unmountable maybe it could be done with the array started, not sure):

 

dd if=/dev/sdX of=/dev/sdY bs=32M

 

X=source

Y=destination

 

Double check destination, selecting the wrong disk will delete everything on it.

Link to comment

There you go:

 

blkid /dev/sd*
/dev/sda1: UUID="5157afb6-e1a7-4a84-9d1b-b69c91f0814b" TYPE="reiserfs" 
/dev/sdb1: UUID="a64652b7-7c29-40d9-8cbd-9866f9173ffa" TYPE="reiserfs" 
/dev/sdc1: UUID="5157afb6-e1a7-4a84-9d1b-b69c91f0814b" TYPE="reiserfs" 
/dev/sdd1: UUID="c92356c9-a7c0-457b-9028-1e2f8af5056e" TYPE="reiserfs" 
/dev/sde1: UUID="6b6ee183-0518-40ab-876e-52a02078e866" TYPE="xfs" 
/dev/sdf1: UUID="6f56005e-83fc-46d4-88f8-fdc8803c512e" TYPE="reiserfs" 
/dev/sdg1: LABEL="UNRAID" UUID="6D9E-07E1" TYPE="vfat" 

 

Looking good, right?

Link to comment

Yes, you can now run reiserfsck on the cloned disk, start with --check, tough it will almost certainly tell you to use --rebuild-tree, if you're running with the disk unassigned you need to use the partition, e.g.:

 

reiserfsck --check /dev/sdc1

 

If it finishes you can temporarily assign the cloned disk to the cache slot (if you do this check that filesystem for the cache disk is set to auto or reiser), it's possible but I believe unlikely, that it doesn't mount for having a duplicate UUID, I think this would only be a problem if you tried to mount it on the array, but if it doesn't mount post the diagnostics.

Link to comment

Yes:

 

$ reiserfsck --check /dev/sdc1
reiserfsck 3.6.24

Will read-only check consistency of the filesystem on /dev/sdc1
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 Sep  1 00:55:17 2016
###########
Replaying journal: Done.
Reiserfs journal '/dev/sdc1' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..  

Bad root block 0. (--rebuild-tree did not complete)

Aborted

 

Running --rebuild-tree now.

Link to comment

Exactly, that is what happened:

 

pass0: vpf-10110: block 179677646, item (0): Unknown item type found [150995201 99584 0x184001d  (12)] - deleted
block 180182935: The number of items (27200) is incorrect, should be (1) - corrected
block 180182935: The free space (33792) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180182935, item (0): Unknown item type found [369099140 99584 0x1850006  (12)] - deleted
block 180188895: The number of items (27200) is incorrect, should be (1) - corrected
block 180188895: The free space (33792) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180188895, item (0): Unknown item type found [369099140 99584 0x1850006  (12)] - deleted
block 180189189: The number of items (27200) is incorrect, should be (1) - corrected
block 180189189: The free space (33792) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180189189, item (0): Unknown item type found [369099140 99584 0x1850006  (12)] - deleted
block 180221320: The number of items (34) is incorrect, should be (1) - corrected
block 180221320: The free space (388) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180221320, item (0): Unknown item type found [285213060 99584 0x1850009  (12)] - deleted
block 180224721: The number of items (34) is incorrect, should be (1) - corrected
block 180224721: The free space (388) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180224721, item (0): Unknown item type found [285213060 99584 0x1850009  (12)] - deleted
block 180227787: The number of items (34) is incorrect, should be (1) - corrected
block 180227787: The free space (388) is incorrect, should be (4048) - corrected
pass0: vpf-10110: block 180227787, item (0): Unknown item type found [285213060 99584 0x1850009  (12)] - deleted
...40%....60%....80%....100%                       left 0, 31534 /sec
334125 directory entries were hashed with "r5" hash.
        "r5" hash is selected
Flushing..finished
        Read blocks (but not data blocks) 732536066
                Leaves among those 790548
                        - leaves all contents of which could not be saved and deleted 21
                Objectids found 334126

Pass 1 (will try to insert 790527 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%....20%....40%....60%....80%....Not enough allocable blocks, checking bitmap...there are 1 allocable blocks, btw

out of disk space
Aborted

Link to comment

You can try to expand the partition, don't know if it will work on a corrupted filesystem.

 

sfdisk /dev/sdX

 

X = cloned disk

 

Look at the starting sector of current partition and use the same number to create a new one using the full size, e.g., if it's 64 type 64 and press enter.

 

Then type write and enter to apply changes.

 

Finally:

 

resize_reiserfs /dev/sdX1

 

If the resize succeeds run reiserfsck again, if it fails you can try the disk rebuild.

 

Any doubts ask

 

Link to comment

Hey, some help would be useful. I don't know what I am supposed to enter:

 

$ sfdisk /dev/sdc
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdc: 486401 cylinders, 255 heads, 63 sectors/track
Old situation:
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 486401/255/63).
For this listing I'll assume that geometry.

Units = cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+ 266305- 266306- 2147483647+  ee  GPT
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

Link to comment

Sfdisk output looks very different from mine (maybe older version?), I'm using unRAID v6.2.

 

Wait a while to see if anyone else as some advice or you can try using 0 as the starting sector.

 

~# sfdisk /dev/sdb

 

Welcome to sfdisk (util-linux 2.27.1).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

Checking that no-one is using this disk right now ... OK

 

Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disklabel type: gpt

Disk identifier: F6042B07-7C4A-4781-83EE-991D98AE6CD1

 

Old situation:

 

Device    Start        End    Sectors  Size Type

/dev/sdb1    64 5860533134 5860533071  2.7T Linux filesystem

 

Type 'help' to get more information.

Link to comment

I am running on 6.1.9. What would I type to achieve what your are suggesting? I tried just entering 0 but didn't proceed after that:

 

~# sfdisk /dev/sdc
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdc: 486401 cylinders, 255 heads, 63 sectors/track
Old situation:
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 486401/255/63).
For this listing I'll assume that geometry.

Units = cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+ 266305- 266306- 2147483647+  ee  GPT
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

/dev/sdc1 :0
/dev/sdc1          0+ 486400  486401- 3907016032   83  Linux
/dev/sdc2 :

 

Does this look good? What am I supposed to enter for sdc2?

Link to comment

I tried v6.1.9 on my test server and the sfdisk output looks like yours, so that's definitely the problem:

 

 sfdisk /dev/sdb
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdb: 364801 cylinders, 255 heads, 63 sectors/track
Old situation:
sfdisk: Warning: The partition table looks like it was made
  for C/H/S=*/256/63 (instead of 364801/255/63).
For this listing I'll assume that geometry.

Units = cylinders of 8257536 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+ 266305- 266306- 2147483647+  ee  GPT
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

 

This is the same disk I used above, starting sector is 64, and it only has one partition.

 

So you need to upgrade to v6.2 or try the rebuild option.

 

Note that with v6.2 you'll be able to expand the partition but there's a chance that resize_reiserfs won't work on a damaged filesystem, of course the rebuild may not work also because of the same issue, so it doesn't hurt to try.

 

If you decide to upgrade to v6.2 make a full backup of your flash drive in case you need to go back to v6.1

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.