import zpool with missing cache device

Status
Not open for further replies.

Neka

Cadet
Joined
Sep 29, 2014
Messages
5
Hello,

I'm having trouble importing a zpool with a missing cache device. I have the zpool.cache file and 'zpool import' shows the pool as degraded. (It is a raidz2 pool with one drive missing and the cache device missing).

When I run 'zpool import' I get an error that "one or more devices are missing." The -f, -F, and -FX options don't work either.

When I run 'zpool import -c zpool.cache' shows the cache device as unavailable. When I specify the pool name with the -c zpool.cache option, I get a different error: "no such pool or dataset"

How can I import my zpool after losing the cache device?

Thank you.
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Did you try:

zpool import -m <your_pool>
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Cache as in L2ARC or cache as in ZIL?

cache as in L2ARC shouldn't be affected at all. It should import, but will throw you an error since the l2arc is missing.

Cache as in ZIL is bad verbage because the L2ARC is a cache, so you'd be saying something like "gasoline engine as in diesel engine". See how the two can be confused.

Post the output of "zpool import" in pastebin or equivalent. The forums will trash the text format which is important.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Umm.. I don't see a link or anything. :(
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Yep I read your cache as slog. Cyber is pretty clever about getting clarification ;)

Hopefully he can give ya a hand. Was the l2ARC a physical device? Did it actually fail, and can it be replaced and mounted in /dev?

P.S No idea why that link is rendering so tiny. But tough to see.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So if you look at your "zpool import -c zpool.cache" you'll see two things.

1. You have a RAIDZ2 vdev.
2. You have a single disk vdev.

If you check out my noobie presentation, slide 21 (example 4) you will see what you did. Please read the presentation up to slide 21 so you can understand the theory.

It appears you have 2 bad disks, one in each of your vdevs. Unfortunately since your single-disk vdev has no redundancy, since its offline you have no access to the pool.

At this point, unless you can get that single disk vdev back online, you have lost all of the data on your pool with no chance of recovery. This mistake is fairly common for people that didn't take the time to get the basics down before playing with ZFS and FreeNAS. Your mistake is precisely why I put Example 4 in my noobie guide. I had hoped to prevent this problem, but it still happens.

Unfortunately you have very few options; kiss the pool goodbye and restore from backup or restore the single broken disk to working order.

Edit: You have no cache device. If you think you had one you improperly added it as a stripe to the pool. The reason why "your cache device is preventing the pool from mounting" is because you have no cache device. ;) You have a broken vdev, and without restoring the broken vdev your pool is down for the count.
 

Neka

Cadet
Joined
Sep 29, 2014
Messages
5
wow - you are right. That was a serious error on my part.

So even though this disk is tiny compared to the pool, the rest of the data is not recoverable? (it was a 128GB ssd for a 6TB zpool)

I accidentally wrote over the missing disk, so that disk is physically available but the data on the disk has been destroyed.

I think all the important stuff is backed up, so this is not a total disaster. But still... wow.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
wow - you are right. That was a serious error on my part.

So even though this disk is tiny compared to the pool, the rest of the data is not recoverable? (it was a 128GB ssd for a 6TB zpool)

Correct. The second you add a vdev the file system becomes an interwoven system between the vdevs. Lose one vdev and you lose a portion of your file system. Naturally the pool is unusable if part of your file system is missing.

I accidentally wrote over the missing disk, so that disk is physically available but the data on the disk has been destroyed.

Yep. No getting the data back for that mistake. :(
 
Status
Not open for further replies.
Top