October 18, 201510 yr Hi Guys, Ive recently added a new SSD into my build and it accidentally got added as an additional cache drive. I quickly realised this and stopped the array, removed the new disk from the cache pool and cleared it. Since then, my original cache disk is showing as unmountable and the GUI is requesting to format it when I start the array. a few snippits from my logs: Oct 18 16:58:50 unRAID emhttp: import 20 cache device: no device Oct 18 16:58:50 unRAID emhttp: import 21 cache device: no device Oct 18 16:58:50 unRAID emhttp: check_pool: /sbin/btrfs filesystem show 1acaafbd-4f94-432f-94e3-c33609a9a27d 2>&1 Oct 18 16:58:50 unRAID emhttp: cacheUUID: 1acaafbd-4f94-432f-94e3-c33609a9a27d Oct 18 16:58:50 unRAID emhttp: cacheNumDevices: 0 Oct 18 16:58:50 unRAID emhttp: cacheTotDevices: 2 Oct 18 16:58:50 unRAID emhttp: cacheNumMissing: 1 Oct 18 16:58:50 unRAID emhttp: cacheNumMisplaced: 1 Oct 18 16:58:50 unRAID emhttp: cacheNumExtra: 0 Oct 18 16:58:50 unRAID emhttp: import flash device: sda Oct 18 16:58:56 unRAID kernel: BTRFS info (device sdi1): disk space caching is enabled Oct 18 16:58:56 unRAID kernel: BTRFS: failed to read chunk tree on sdi1 Oct 18 16:58:56 unRAID kernel: BTRFS: open_ctree failed Is there a way to recover the data on this drive as it houses my docker images and my VM HDDs... A little diconcerting if this is expected behaviour as there arent any warnings when taking drives out of the cache pool to warn about data loss!!
October 19, 201510 yr Author So after running every btrfs repair command under the sun to no avail, I eventually recovered the majority of data off the drive by running the following command: btrfs restore -v -i /dev/sdi /mnt/user/Software/cacherestore "/dev/sdi" Is the cache drive that's misbehaving "-v" adds verbose output to show what files its recovering "-i" ignores errors which would usually close the command "/mnt/user/Software/cacherestore" is the location i was dumping files from the drive. Id say about 90% of files recovered fine, so all my DockerAppData folder (phew!). My OpenELEC VM also came back fine, but my Windows VM hard disk img seems to be corrupt. Luckily I have a recent backup of the windows machine so that's not too much effort to restore. Not to point any fingers, but it looks like some partition changes are made when disks are added to a cache pool to all disks involved, but they aren't undone when a disk is removed, which got me into this mess in the first place! Moral of the story.... If you have space, back up your DockerAppData and Vms!
December 21, 201510 yr A little diconcerting if this is expected behaviour as there arent any warnings when taking drives out of the cache pool to warn about data loss!! Agreed.
December 21, 201510 yr Community Expert That is not normal behaviour, I ran various tests on a cache pool and added and removed disks a dozen times an that never happened. What does happen and should be better documented is that starting the array with a unassigned previously used cache disk will cause cache to appear unmoutable, disk has to be cleared or physically disconnected, since you mentioned it was cleared it shouldn't have happened.
December 21, 201510 yr What happened in my case is that I wanted to mount a disk to make it visible to the system and put it as second cache drive. I didn't read any wiki before doing this test and so I noticed that the cache pool concept was applied. I stopped the array, unassigned the second cache disk and started it again. Everything seemed fine at first. Then I decided to mount that drive that I wanted to make visible manually. I formatted it to btrfs. After the format the cache folder disappeared and the disk showed up as unmountable and couldn't retrieve any data with any btrfs restore command. I think the 2 disks were still connected somehow. That was my bad but and I think nobody would do what I did. Nevertheless if there's a way to correctly handle a cache disk removal it should be stated more clearly.
Archived
This topic is now archived and is closed to further replies.