Feature request: Inventory report of disks files

soulfire03

Cadet
Joined
Dec 12, 2020
Messages
3
Hello,
I use TrueNas Core for Plex media server and since the data are not so critical, I can give less importance to data mirroring. However, if a drive crash, I would like to be able to know what were on this particular drive to refill it.
I think a report executed by scheduled task could be added that would list files for every drives (grouped by drive's serial number).
A bonus if this report could upload by itself to a cloud service like google drive.

Thanks!
 

Alfons

Cadet
Joined
Mar 29, 2020
Messages
6
You could simply write a cronjob to do that:

cronjob_logger.PNG


The command you wanna use is:

Code:
ls -alR /mnt/Datapool/DatasetWithMyData > /mnt/Datapool/DatasetForMyLogs/mydatalog.log &


"Datapool" is the name of the Datapool in which you data is stored.
"DatasetWithMyData " is the name of the Dataset whose content you wanna list.
"DatasetForMyLogs" is the name of the Dataset where you wanna store your log.

If you wanna list all your data, you can also list your entire Datapool:

Code:
ls -alR /mnt/Datapool > /mnt/Datapool/DatasetForMyLogs/mydatalog.log &


If you wanna upload the logged list to your cloud, set up a Cloud Sync Task via GUI.
 

soulfire03

Cadet
Joined
Dec 12, 2020
Messages
3
Thank you for your reply

This command works for listing files, but it doesn't tell which file is on which physical disk.
That's the most important thing in the request
 

soulfire03

Cadet
Joined
Dec 12, 2020
Messages
3
Nevermind, I decided to switch to a Raid-Z1 configuration
 
Top