Score:0

dead ssd drive on zfs points to initramfs

br flag

I have an ssd drive with failed controller and which was a part of a mirrored zfs vdev. Now it boots into initramfs and says that it can't import pool "rpool". when i issue

zpool import -f rpool 

it says that there's no such pool or dataset. However, in "zpool import" can see that rpool has status UNAVAIL because of insufficient replicas. i would like to replace the dead drive with a new one. I have tried:

1) zpool replace
2) zpool offline
3) zpool detach

and everytime i get that there's no such pool or dataset. The only way i got it working was by importing as read only by using:

echo "1" | sudo tee /sys/module/zfs/parameters/zfs_max_missing_tvds
zpool import -o readonly=on rpool

output of zpool import as a screenshot: https://prnt.sc/91X8xc3vG1SA I have it mounted as read-only and the zpool status output is: https://prnt.sc/vKzNL0nUFALc

Mounting as read-only boots into the OS. However since it's mounted as readonly i can't actually make any changes to the pool like replacing the damaged drive. Any suggestions?

Romeo Ninov avatar
in flag
Have you try to backup the information, destroy the pool and recreate it?
Meni avatar
br flag
@RomeoNinov Unfortunately i don't have backups of the pool :(
Romeo Ninov avatar
in flag
As I read you can import it as r/o which is enough to make backup
Meni avatar
br flag
@RomeoNinov i actually haven't thought about it until now. I guess you're right, i could restore from it. Isn't there a much easier option like just replacing the faulty drive? What is the meaning of having a mirrored pool if i can't just replace the drive? it should be an easy process, like using mdadm.
Romeo Ninov avatar
in flag
`mdadm` is not about ZFS. And this is root filesystem so it's not so sample (especially on PC hardware)
Meni avatar
br flag
Any other suggestions?
Romeo Ninov avatar
in flag
Try to use original Solaris (live CD) and not install but try to manage the pool.
drookie avatar
za flag
Where's the second device from a mirror ? Unless there's no second device (means you now have non-redundant pool) all you can do is to accept the loss of data.
Meni avatar
br flag
@drookie the pool consists of 2 mirrored devices. there shouldnt be any data loss.
drookie avatar
za flag
I don't see any `zpool status` output, only some vague stories. Doubt there's even a pool.
Meni avatar
br flag
@drookie i have added a screenshot in the original question.
Score:1
za flag

Your rpool is merely a span. I don't see a mirror configuration at all (by the way it should be marked as UNAVAIL, I don't understand why it's DEGRADED, but you are probably running some old zfs version). Accept the loss of data, apreciate the experience. Two other pools are unaffected.

Meni avatar
br flag
Thank you forinvesting your time in this, i really appreciate it. if i mount it as read-only it boots the OS and all files are intact. please checkout screenshot: https://prnt.sc/vKzNL0nUFALc
Meni avatar
br flag
I guess i didn't want to accept the inevitable. Thank you for clarifying. i appreciate it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.