This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

ZFS - Directory Contents vanished

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Tschuki
NewUser
NewUser
Posts: 2
Joined: 19 Jul 2013 13:10
Status: Offline

ZFS - Directory Contents vanished

Post by Tschuki »

Hey guys,

so I recently discovered that the contents of one of my ZFS RaidZ1 directory are empty now.
Since there were quite some important data in it, I was wondering how I can restore the contents?

Some Facts:
  1. RAIDZ1 ZFS array with 6x2TB SAMSUNG HD204UI

Code: Select all

 pool: RAIDZ1
 state: ONLINE
  scan: resilvered 300K in 0h0m with 0 errors on Fri Jul 19 13:04:06 2013
config:

	NAME        STATE     READ WRITE CKSUM
	RAIDZ1      ONLINE       0     0     0
	  raidz1-0  ONLINE       0     0     0
	    ada0    ONLINE       0     0     0
	    ada2    ONLINE       0     0     0
	    ada1    ONLINE       0     0     0
	    ada3    ONLINE       0     0     0
	    ada4    ONLINE       0     0     0
	    ada5    ONLINE       0     0     0

errors: No known data errors
Here is what I did:
  1. Since I use the SAMSUNG HD204UI 2TB disks - I did a firmware upgrade to enable a safe S.M.A.R.T. Monitoring
  2. I did

    Code: Select all

     smartctl -t short /dev/adaX 
    on all of them
  3. So my dev/ada1 got his

    Code: Select all

    197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       1
  4. I googled a bit and found out, I shoud run a LONG selftest, which will provide me the faulty sector, which I will rewrite and the problem should be fixed
  5. Here are the results of the tests:

    Code: Select all

    SMART Self-test log structure revision number 1
    Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
    # 1  Short offline       Completed without error       00%     15813         -
    # 2  Short offline       Completed without error       00%     15813         -
    # 3  Extended offline    Completed without error       00%     15807         -
    # 4  Short offline       Completed without error       00%     15790         -
  6. So the long selftest doesn't show anything abnormal, but the error is still there.
  7. As you can see, I tried to offline and online the disk but there is a small amount of resilvering done and everything is normal again

    I'd like to reformat the disk and integrate it back into the array. How can I do this?
    I get the feeling, that the contents are forever lost :( and the faulty sector is somehow responsible, since I can see the empty directory and my AFP has already made a new ".AppleDouble" directory in it.

    Do you have any ideas to help me? :(
Thanks in advance!
Yours Tschuki

Onichan
Advanced User
Advanced User
Posts: 238
Joined: 04 Jul 2012 21:41
Status: Offline

Re: ZFS - Directory Contents vanished

Post by Onichan »

No idea about this firmware issue, but if you are using RAIDZ1 then a single drive messing-up wouldn't cause data-loss. So I expect something else is the cause of your empty directory.

Tschuki
NewUser
NewUser
Posts: 2
Joined: 19 Jul 2013 13:10
Status: Offline

Re: ZFS - Directory Contents vanished

Post by Tschuki »

Hey Onichan,

thx for your reply!
Since my 1st post I found the reason....just a misclick, where a directory was moved into another. Fairly stupid :(

BUT can you explain to me, why my LONG SmartCTL Scan yields no results?
See my smartctl -a output here:

Code: Select all

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   051    Pre-fail  Always       -       202
  2 Throughput_Performance  0x0026   055   055   000    Old_age   Always       -       18451
  3 Spin_Up_Time            0x0023   069   068   025    Pre-fail  Always       -       9695
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2655
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       15895
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       7
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       95
181 Program_Fail_Cnt_Total  0x0022   252   100   000    Old_age   Always       -       0
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       181
192 Power-Off_Retract_Count 0x0022   252   252   000    Old_age   Always       -       0
194 Temperature_Celsius     0x0002   064   061   000    Old_age   Always       -       35 (Min/Max 19/45)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       1
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       20221
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       7
225 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       2671

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%     15848         -
# 2  Short offline       Completed without error       00%     15815         -
# 3  Short offline       Completed without error       00%     15815         -
# 4  Short offline       Completed without error       00%     15813         -
# 5  Short offline       Completed without error       00%     15813         -
# 6  Extended offline    Completed without error       00%     15807         -
# 7  Short offline       Completed without error       00%     15790         -

User avatar
b0ssman
Forum Moderator
Forum Moderator
Posts: 2438
Joined: 14 Feb 2013 08:34
Location: Munich, Germany
Status: Offline

Re: ZFS - Directory Contents vanished

Post by b0ssman »

because Reallocated_Sector_Ct is 0.

the Current_Pending_Sector 1 means one sector is having problems and is marked.

the next time this one gets read/written it es evaluated. if the operation succeeds it gets marks ok, if not it gets rellocated.

you could try reading the entire disk using dd.
Nas4Free 11.1.0.4.4517. Supermicro X10SLL-F, 16gb ECC, i3 4130, IBM M1015 with IT firmware. 4x 3tb WD Red, 4x 2TB Samsung F4, both GEOM AES 256 encrypted.

Post Reply

Return to “ZFS (only!)”