I created a share on my linux computer for media files, well 2 shares. I then decided that because the media files were taking up too much space on my local disk, I removed them with sudo rm -R media files.
Now I see that my media files have been deleted from my Truenas server.
I never realised that deleting the shared files from my computer would also deleted them from the NAS server?? Oh well!
Well if you mounted the network share via cifs or from dolphin or whatever other way you only access the files from your linux box but they were actually stored on the nas…
But without knowing more on how the shares are mounted we can only guess…
Edit:
If you have snapshots you should be able to restore them
Thanks, and all I have is a backup of TrueNAS Scale 24.10.2.2 . The one which is created when an upgrade is installed, so I doubt the media files will be there.
I did mount the share via cifs, but I didn’t think that the files would actually take up over 150Gb of space, and thought it would be a link
If you don’t have any snapshot task set up i’d highly suggest you do that now, because snapshots can restore deleted files.
cifs mounts external storage to a local path, but the files are not stored local…
Edit:
For more information on snapshot tasks see the documentation
They actually didnt. You probably saw some sort of space allocation for the folder you mounted the share to. Like \mnt\media or whatever. The files always were only on your NAS.
If your media files are worth 400$, you could try to restore them with Klennet.
And even if you have lost your files, now is a good time to suggest you setup snapshots so that next time you can just rewind to before you deleted your media!
TrueNAS Scale: Setting up and using Tiered Snapshots // ZFS Data Recovery
You are attaching the VDEV to the Windows machine and using the Klennet software to see what it says it can recover. Search and go to the website for the software if you need more info. Actually recovering would require buying but you can at least see what it says is possible.
Elaborating on @SmallBarky, because I think their post although correct lacks a bit of clarity:
You boot your TrueNAS system with Windows, e.g. with Windows installed on some spare drive. And then run Klennet in Windows with your storage pool drives attached. This way the software can analyse the state of the pool and possibly recover data.
You need a monitor, keyboard and mouse attached, a spare drive, a Windows install medium … yes. Depending on the value of the lost data it might be worth the effort.
I was hoping you would read through the Klennet Recovery website and documents to see how it was used. It give you an idea of the procedure. We don’t know what hardware or spare drives you may have and are guessing a bit. @pmh any other advice?
I doubt your TrueNAS will boot Windows from a USB drive that was previously internal to a different PC. Windows is very particular about changing hardware.
Add another drive (SSD/HDD) to your TrueNAS. Boot a Windows install image from USB thumbdrive or USB CD/DVD-ROM. Install Windows on that drive only. Install Klennet. Try to recover your data.
I have used it myself to run Windows-only software[1] from a live Windows session, directly booting from a USB.[2] Like a live Linux ISO, nothing is saved. I’ve even used WinPE to flash the BIOS on laptops and desktops, when the only file provided is an .exe and the BIOS does not have a flash tool. (Thanks, HP. )
Not all software will work, since this is not a complete Windows installation. If it’s simple enough and doesn’t require many libraries or dependencies, it’s likely to run fine. ↩︎
You’ll need a separate USB to run software that is not included with the live ISO or to save any files. ↩︎
This will actually work in most cases since at least Windows 10. I know Windows <=7 was very particular about hw changes and I never really used 8 but at least since 10 Windows can handle those really well. It will notice them on boot and …adjust itself. No idea how exactly but it works
I also know that win7 was very particular about changing hardware, but win10 is not so, as I had a win10 ssd in an old laptop, then took a chance on putting it in a mini pc and it booted up ok.
Just one thing about the disk size for win10 and Klennet. What size does it have to be because my Raidz1 pool is 7,2Tb in size. I ask because ddrescue I used on my linux pc need the same amount of space as my 250Gb ssd, which I didn’t have
As should be clear from Klennet documentation, the same consideration apply: You need enough free space somewhere to copy everything you want to recover.
Note that scanning with Klennet is free but that actual recovery will cost you a licence. So, unless you want to do it for the sake of experimenting with the procedure, the first question is whether recovering your media files is worth the price of the Klennet license.