Files set to read only and I can't delete them


Recommended Posts

I recently upgraded from 4.5 to the latest version 6.  In doing so it seems many directories and files have been set to read only.  I'm in the process of moving lots of files from old drives onto new ones and would then like to delete the files off the original drive.  I first tried the mv command but that was failing.  I then used the "new permissions" tool and it also failed because these files are set as read only.  How do I remove this read only flag...?

Link to comment

If you were using mv command I assume you were working at the command line on your unRAID server. If so, you should be logged in as root so I don't think it's a permissions issue. Possibly the disk is read-only due to filesystem corruption.

 

Go to Tools - Diagnostics and post the complete zip.

Link to comment
3 minutes ago, rharvey said:

How do I remove this read only flag...?

Since you didn't post the diagnostics zip file that is requested I can only guess what the issue is.

Most likely candidate would be that a disk has some corruption that is causing it to be mounted as read only, which usually can be fixed by checking the filesystem in maintenance mode.

Link to comment

Oh boy I'm in trouble now.  I put the system in maintenance mode and ran the disk check from the GUI, it finished with a ton of errors all suggesting that I needed to do a -rebuilt-tree which I did.  It ran for several hours and ended before it completed with these errors.

 

0%....20%....40%..block 368996707: The number of items (4096) is incorrect, should be (1) - corrected

block 368996707: The free space (49152) is incorrect, should be (4048) - corrected

pass0: vpf-10110: block 368996707, item (0): Unknown item type found [514 570430216 0x6f1 ??? (15)] - deleted

Segmentation fault

 
If I run the check again it quickly comes back with
 

reiserfsck --check started at Thu Mar 30 15:49:46 2017

###########

Replaying journal: Done.

Reiserfs journal '/dev/md4' in blocks [18..8211]: 0 transactions replayed

Checking internal tree..  

 

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

 

I just attempted to start the array normally and it is seeing the drive needed to be formatted.  Of course I did not back it up, really hard to back up 3TB's of data.  Have I lost everything...?  I says parity is still good.

Link to comment

One more thing, the disk with filesystem issues has a very high number of UDMA CRC errors, especially for the number of power on hours, these are usually a sign of a bad SATA cable, consider replacing it or at least monitor the value, an increase of 2 or more for that attribute means there's still a problem:

 

Quote


Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   100   064   044    Pre-fail  Always       -       253495
  3 Spin_Up_Time            0x0003   089   089   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       20
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   074   060   045    Pre-fail  Always       -       22463665
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       268 (204 86 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       20
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   098   000    Old_age   Always       -       2
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   068   055   040    Old_age   Always       -       32 (Min/Max 28/36)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       783
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       14
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       486
194 Temperature_Celsius     0x0022   032   045   000    Old_age   Always       -       32 (0 18 0 0 0)
195 Hardware_ECC_Recovered  0x001a   100   001   000    Old_age   Always       -       253495
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       1068
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       97 (201 30 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       11417124904
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       27799433710

 

Link to comment

OK so saving the data has become priority number one, what's the best way to do that.  If I need to boot a lower version of UNRAID to successfully fix the corruption I would rater use a new USB drive and not mess with this one as it has a couple of VM's and Dockers too.

 

Link to comment

Upgraded to 6.3.3 last night and started the "rebuild-tree" proves before going to bed.  This morning it's done and things are looking good.  The report does suggest that a few files were placed in lost+found so I have some work to do but all is good again.  Is there a way to see (from the GUI) if any of the other drives are getting mounted in "read only"..?

Link to comment
It should...you can also start the array in maintenance mode and run a check on each disk from the WebGUI, any filesystem issues are usually reported.

If it gets mounted as read only then it will. If it mounts fine and then due to corruption gets remounted as read only then it will not but the write tests should catch it if the drive isn't spin down at time of the test

Sent from my LG-D852 using Tapatalk

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.