Jump to content

Need advice: --rebuild-tree


bill_in_socal

Recommended Posts

I have a share that spans disks 1 through 5 on my unRAID 4.42 server.  The parity is OK, but there are some folders I cannot delete or copy which report "Directory Invalid".

 

So, I ran a filesystem check through unMenu.  Disk2 (sdj) reports corruption and says it can only be fixed using --rebuild-tree

 

Can someone please give me the full syntax of the command I use to do this?  I assume I do it through a telnet session.

 

Any cautions or advice before I proceed?

 

Many thanks,

Bill

Link to comment

I have a share that spans disks 1 through 5 on my unRAID 4.42 server.  The parity is OK, but there are some folders I cannot delete or copy which report "Directory Invalid".

 

So, I ran a filesystem check through unMenu.  Disk2 (sdj) reports corruption and says it can only be fixed using --rebuild-tree

 

Can someone please give me the full syntax of the command I use to do this?  I assume I do it through a telnet session.

 

Any cautions or advice before I proceed?

 

Many thanks,

Bill

Since you already have unMENU, you can most easily do this by installing an updated unMENU plug-in that has the ability to perform the rebuild-tree by simply pressing a button.  You can find it here: http://lime-technology.com/forum/index.php?topic=2595.msg30513#msg30513

After you download and install the new unMENU plug-in, you will need to stop and re-start unmenu for it to recognize it has been added.

 

As far as the series of commands needed to rebuild the file-system tree, you can find them in the wiki.  If you do not use the unMENU plug-in I pointed you to, you will have to do it all on the command line.  It is described here: http://lime-technology.com/wiki/index.php/Check_Disk_Filesystems

 

Note that only one of the commands listed in the wiki actually rebuild the file system, but you must first stop SAMBA, and then un-mount the file-system before rebuilding the tree, and then re-mount it, and restart SAMBA afterwards.  The new improved plugin for unMENU performs those steps for you, so it is easier.

 

The button to rebuild the tree on the new "Disk-Management" page will only appear if the immediately prior check done through unmenu contained directions in its output to use rebuild-tree. So, first use the unMENU button to do a reiser file-system check, and then the "Rebuild-Tree" button should appear. (do both with the new plug-in installed.)

 

Joe L.

Link to comment

Thanks Joe - the new data management plugin is great news!

 

I installed it, rebooted and ran the system filecheck again on the trouble disk.  Indeed, the --rebuild-tree button showed up.  After pressing the --rebuild-tree button, it disappears immediately from the web interface. 

 

Is this fix instant, or does it give any indication of running?

 

I ask because I see no particular disk activity on the server itself and have no indication that the "fix" was successful.  I guess I could run the filecheck again to see if the --rebuild-tree button shows up again.

 

Huge thanks for the new plugin.  You're always a step ahead.

 

Bill

Link to comment

Thanks Joe - the new data management plugin is great news!

 

I installed it, rebooted and ran the system filecheck again on the trouble disk.  Indeed, the --rebuild-tree button showed up.  After pressing the --rebuild-tree button, it disappears immediately from the web interface. 

 

Is this fix instant, or does it give any indication of running?

 

I ask because I see no particular disk activity on the server itself and have no indication that the "fix" was successful.  I guess I could run the filecheck again to see if the --rebuild-tree button shows up again.

 

Huge thanks for the new plugin.  You're always a step ahead.

 

Bill

Well... you are the first to use it for real...

 

I don't know how long the rebuild-tree will take. But the web-page will not return until it is done.  Depending on what was on the disk, it might be quick.

 

yes, I'd say ito use the "system info" page and then look at a process list. (or type

ps -ef | grep reiserfsck

and see if you can see the process still running.  If not, and if the disk activity seems to have stopped, I'd say to try the normal reiserfsck test button.

 

Worst case, use the steps in the wiki...  Best case, it worked as planned.

 

Joe L.

Link to comment

Rebuild tree can take a long time to run.  I therefore prefer running it from a command line, so I can see the status messages displayed that let me know its working.  With the Web GUI you get the messages all at the end.

 

Joe L., for other processes that run pretty quick your plugin is awesome, but for the really long running ones you might consider making it an asynchronous process, and have the Web GUI serve up the "piped" output file rather than blocking.

Link to comment

Thanks Joe.  I'm thinking that the new --rebuild-tree button may not work.  I re-ran the fscheck from unMenu and the same tree error showed - therefore the "button" did not fix it the first time.

 

Tried the button the second time and it disappears immediately.  And no file check process listed in my telnet TOP session.

 

I'll try it the manual way now.

 

Edit: Started it manually and on my system it's going to be about a 6-hour process (1TB drive) according to the status screen.

 

 

 

 

Link to comment

Thanks Joe.  I'm thinking that the new --rebuild-tree button may not work.  I re-ran the fscheck from unMenu and the same tree error showed - therefore the "button" did not fix it the first time.

 

Tried the button the second time and it disappears immediately.  And no file check process listed in my telnet TOP session.

 

I'll try it the manual way now.

 

Edit: Started it manually and on my system it's going to be about a 6-hour process (1TB drive) according to the status screen.

Thanks for helping by trying the new feature.... I'll investigate. 

 

Can you take a look in your syslog to see if the attempt at the reiserfsck --rebuild-tree from the unmenu button was logged?  Perhaps it output some message that might give me a clue what happened.

 

Joe L.

Link to comment

As it turns out, the "-y" option to reiserfsck is not available in combination with the --rebuild-tree option.  Therefore, all I can do is to print the series of commands needed to un-mount, check, and re-mount the disk, but I don't think I'll be able to run it from the web with the rebuild-tree option.

 

I had not noticed this in the manual page fo reiserfsck previously.

 

--yes, -y

    This option inhibits reiserfsck from asking you for confirmation after telling you what it is going to do. It will assume you confirm. For safety, it does not work with the --rebuild-tree option.

 

I'll post a updated version of that plug-in shortly...

Link to comment

 

Thanks for helping by trying the new feature.... I'll investigate. 

 

Can you take a look in your syslog to see if the attempt at the reiserfsck --rebuild-tree from the unmenu button was logged?   Perhaps it output some message that might give me a clue what happened.

 

Joe L.

 

Unfortunately, my syslog only shows today (5/4) so I don't think it will be of much help since the problem was yesterday.  I went ahead and manually ran the reiserfsck on each disk in my problem share and corrected the disk with the tree problem. 

 

However, I still have files on the share which will not delete throwing "the directory is invalid" as the cause. Should I run a parity check after running reiserfsck --rebuild-tree?

Link to comment

 

Thanks for helping by trying the new feature.... I'll investigate. 

 

Can you take a look in your syslog to see if the attempt at the reiserfsck --rebuild-tree from the unmenu button was logged?   Perhaps it output some message that might give me a clue what happened.

 

Joe L.

 

Unfortunately, my syslog only shows today (5/4) so I don't think it will be of much help since the problem was yesterday.  I went ahead and manually ran the reiserfsck on each disk in my problem share and corrected the disk with the tree problem. 

 

However, I still have files on the share which will not delete throwing "the directory is invalid" as the cause. Should I run a parity check after running reiserfsck --rebuild-tree?

If you did the rebuild-tree on the /dev/md? devices, then parity should already be taken care of.  Besides, it would not cause the error you are seeing.

 

Joe L.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...