Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cache drive unmountable

Featured Replies

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!!

  • 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!

  • 2 months later...

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.

  • 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.

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.