ashaneil Posted January 24, 2014 Share Posted January 24, 2014 Hi fellow unRIADers, When I started using unRAID, I only had 4 drives. I am now upto 16 drives and growing. The other day, a horrible thought occurred to me - If one of the drives were to fail, I om OK. BUT, if 2 or more drives failed, I would lose all the data stored on those drives. So my question is this: does anyone have a mechanism (an app, plugin, script, etc) that creates a catalog of what is stored on what disk on a scheduled basis? If not, I can always script it. I would prefer not having to reinvent the wheel. Thanks Quote Link to comment
hernandito Posted January 24, 2014 Share Posted January 24, 2014 I would love to have this script! Quote Link to comment
graywolf Posted January 24, 2014 Share Posted January 24, 2014 output the following to a file should do the trick ls -l /mnt/ | grep disk | ls -lR /mnt/`awk -F " " '{print $8}'` Quote Link to comment
ashaneil Posted January 24, 2014 Author Share Posted January 24, 2014 Wow. Thanks for the fast response and the great one-liner. I just play with the syntax to get the output in the format I want (i.e. suppress all those silly back slashes...) and then onto cron. Thanks again Quote Link to comment
graywolf Posted January 24, 2014 Share Posted January 24, 2014 output the following to a file should do the trick ls -l /mnt/ | grep disk | ls -lR /mnt/`awk -F " " '{print $8}'` actually I was getting too fancy there. mind was wrapped up in the middle of another script for work I was working on. simplier version. output to file following line: ls -lR /mnt/disk* d'oh Quote Link to comment
soana Posted January 25, 2014 Share Posted January 25, 2014 Thanks graywolf, your command line is now part of a script in my /etc/cron.monthly Quote Link to comment
bnevets27 Posted January 25, 2014 Share Posted January 25, 2014 There was work being done by one for the senior (not in an old sense ) guys on the forum with a little more elaborate solution. Not that it is really needed but it had some features. Currently I have a similar script running on a cron job also Sent from my SM-N900W8 using Tapatalk Quote Link to comment
BobPhoenix Posted January 27, 2014 Share Posted January 27, 2014 Could also use md5deep to also get a checksum of the files and that could be used periodically to check for bit rot. It produces one line for each file listing the checksum so you also get your file list. Quote Link to comment
jbartlett Posted January 27, 2014 Share Posted January 27, 2014 Here's a tool I wrote to do inventory + optional Hash checks. http://lime-technology.com/forum/index.php?topic=28354.0 Quote Link to comment
Recommended Posts
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.