naturalblaze Posted April 4, 2023 Share Posted April 4, 2023 I ran "CA Fix Common Problems" the other day. One of the identified issues was and old cache drive folder in /mnt I had setup but have since moved to a shared cache drive that was larger with redundancy. I opened the unRaid shell and ran the command "rm -fr /mnt/Transcode-cache". I was then going to run "ls -la /mnt" to make sure the directory was successfully removed before re-running CA Fix Common Problems again. Now what I ran goes down in history as a Homer "DOH" moment and I'm pretty sure any Linux cred I had is now gone. What I ran was "rm -fr /mnt". It only ran for about 20 seconds before I realized what I had done, my heart stopped, and I proceeded to ctrl+c the command while praying to the computer gods. I stopped the array and shutdown my unRaid system (just in case things haven't been too jacked up and/or replicated any deletes. From initial glances I know the /mnt/disks folder is gone but I don't think any of the other base /mnt folders were completely removed. I'm less worried about movies/tv shows that might have been lost as I can get those back again, but my photos and documents shares I would like to try and recover at all costs. My question now is what can I do to best protect/recover my data? Any suggestions on the proper way to manually backup anything and how to bring the system back up would be greatly appreciated!!! Is it safe bring the system backup and try and start the array? Should I try and pull the array drives and pull any data off those first? If so any recommended programs to do that? Are there any diagnostics to run? Do I need to run a parity check and will that missing /mnt folder cause issues with this? System Details: Array Devices: 2x 8TB hard drives for Parity 3x 6TB hard drives and 1x 8TB hard drive for array Pool Devices: App-cache: 1TB m2 SSD Disk-cache: 1TB 2.5 SSD Shares (appdata, domains, system) running purely off "App-cache" and doing backups of that weekly to my array. So I was able to pull that SSD and create a backup of those files. I did pick up a 12TB external drive just in case I can pull any data directly from the drives as a backup. Quote Link to comment
JonathanM Posted April 5, 2023 Share Posted April 5, 2023 I'm probably not going to be very helpful with details, but here is how I'd proceed. 1. Ensure the array doesn't auto start, if it was set that way edit the /config/disk.cfg file to set auto start off. 2. Boot up unraid, mount the data disks read only (maybe with Unassigned Devices?) and inspect what's there. Probably can't do that with the disks assigned as normal, so may need to blow away the disk assignments. Make good backups of the flash drive BEFORE making any changes so you can revert. Quote Link to comment
Solution naturalblaze Posted April 13, 2023 Author Solution Share Posted April 13, 2023 Thanks for the advise, I had forgotten that I could disable the array from auto-starting in the disk.cfg file. Here is what I did to backup and recover my system.oh Purchased: Western Digital 12TB External Hard Drive (I plan to start doing some backups of my critical files, photos, etc. to this weekly) ikuai SATA to USB 3.0 Dual Hard Drive Dock UGREEN M.2 NVMe SSD Enclosure Pulled my Pool/Cache drives and the Array disks from my unRaid server. I used the the HDD Dock and the SSD Enclosure to rsync the critical files I needed from each of the drives. I'm already running PopOS on my laptop so no special programs needed it was able to mount the xfs and btrfs file systems without any problem. Created a backup of my UnRaid USB Flash Drive. I edited /config/disk.cfg to startArray="no". Re-installed everything and tried to boot my system but it never came up so I had to hook a monitor and keyboard to my system (I normally run it headless). There was a "VFS: Cannot open root device" error message so I just recreated flash using the USB Creator and just copied over the config folder from my backup after rec-creating the flash drive. This time the system booted correctly, I was able to start the array, and everything looked good. As previously stated all system, Docker, and VM files are stored on my Cache so they were not affected. I did loose some data as my total array size did go down but was mainly just some missing seasons of Plex TV shows or old DVR recordings which I can get back if needed. I did a Parity check just to validate everything was good on the parity disks. My system is now back to full functionality! While this was a pretty unique situation where I was the point of failure an not anything on UnRaid side. I do plan to utilize the 12TB external to do some weekly backups of some of the critical docs, photos, etc. just in case. 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.