Help: XFS and 0 byte files


Recommended Posts

Hi Community,

 

Can you help me, been running UNRAID a few yrs now, upgraded drives etc... this time, I had one of my drives with two directories, one pooled,, one not. The pooled directory was ok, the other directory and its children are 0 bytes.

 

I pulled the drive and mounted it in arch (how I learned I could save part of the files, and I'm offloading them now.... the files I could save were correct size but needed sudo to both traverse the directory structure or launch the media. 

 

I'm asking, if I clear the drive or replace it entirely, when it rebuilds will I get my 0 byte files back to normal? I ask because after I pulled the drive, I started the array to see if emulated it would give access to files, still 0 byte... I'm guessing parity has been updated with the truncated files. Is this so? and if it can't rebuild it, what is the safe way to insert that drive back into the array blank, without rebuilding, I'd rather copy it's contents back on myself, and rebuild parity rather than relying on parity I'm unsure of to rebuild. How do I rebuild parity with an empty drive without affecting the other 10 drives? If I redo parity and insert a blank, will I lose all my share assignments, pooling etc? 

 

I have no idea how the files became truncated, I wish I could get them back, now I just want to move forward with a clean drive and valid NEW parity. The share is only accessed by one machine on my network via nfs to Emby to go out to other clients from the Emby server box.

 

Any help is appreciated, I've been pulling my hair out. I'm not a total linux noob, but only been using it  a cpl years. 

 

Thanks everyone.

 

Bonus : Has anyone ever used this script? if so does it save the file names? I ask because the media lost is media, without names, it's worthless to me to have 1000s of files with no season or episode... heres the script.... in php. https://github.com/odoucet/xfsrepair, I ran the actual xfs_repair, I was told bad superblock and magic number, it scanned for what seemed ages, found two more blocks, but couldn't use them. I don't know what caused this... the NAS is on a UPS,

 

Edited by estranged2000
tried to turn on notify me.
Link to comment
4 hours ago, estranged2000 said:

I'm asking, if I clear the drive or replace it entirely, when it rebuilds will I get my 0 byte files back to normal? I ask because after I pulled the drive, I started the array to see if emulated it would give access to files, still 0 byte... I'm guessing parity has been updated with the truncated files. Is this so?

Yes, as long as parity is valid it will rebuild the same as it was, corruption included.

 

4 hours ago, estranged2000 said:

and if it can't rebuild it, what is the safe way to insert that drive back into the array blank, without rebuilding, I'd rather copy it's contents back on myself, and rebuild parity rather than relying on parity I'm unsure of to rebuild. How do I rebuild parity with an empty drive without affecting the other 10 drives? If I redo parity and insert a blank, will I lose all my share assignments, pooling etc?

Just do a standard rebuild, then format the disk and restore the data.

 

 

Link to comment
Just do a standard rebuild, then format the disk and restore the data.
 
 
I can format the disk inside Unraid after the rebuild and re add the data myself? I didn't realize you could format the drive within Unraid. Thank you for helping me. Cheers.

Sent from my SM-G965W using Tapatalk

Link to comment
10 hours ago, estranged2000 said:

I can format the disk inside Unraid after the rebuild and re add the data myself?

Yes, with the array stopped click on that disk and change the filesystem to a different one, start the array, format the disk, then stop the array and change back to the original filesystem and repeat the process.

Link to comment

Hello

Thank you for your help, one more question if you are storing video files, which file system would you choose? Is xfs still the safest?

Yes, with the array stopped click on that disk and change the filesystem to a different one, start the array, format the disk, then stop the array and change back to the original filesystem and repeat the process.


Sent from my SM-G965W using Tapatalk

Link to comment

Is it possible you were trying to move our copy files from a disk share to a user share? Or vica versa? This is the behavior I'd expect if you were. There are numerous posts on the user share copy bug.

 

Whatever the emulated disk shows is what will be rebuilt. Doing an actual rebuild is not necessary.

 

If you are on RFS, there is a chance you might salvage some of your data, but I have not heard similar successes with xfs or btrfs. Note that all file systems are susceptible to the bug mentioned above.

 

IMO, xfs is the safest filesystem choice based on its large commercial base and active support resources. Btrfs is certainly coming along and has some nice features not available in xfs (read about the scrub command).

 

Hope I am wrong or you have backups to restore your files.

 

Best of luck.

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.