ZFS 'read-only' device / pool scan / import?

Willem Jan Withagen wjw at digiware.nl
Tue Oct 19 21:58:32 UTC 2010


On 2010-10-19 23:03, Freddie Cash wrote:

> While using labelled devices (be it glabel, gpt label, or whatever)
> certainly helps keep things ordered and working.
>
> However, ZFS also labels the devices in the pool.  A simple "zpool
> export poolname" followed by a "zpool import poolname" will scan the
> metadata on the drives, find all the devices in the pool, re-order
> things internally, and carry on.
>
> Back when I started with ZFS, I used unlabelled drives (also on 3Ware
> controllers) and made the mistake once of booting with a failed drive
> removed.  Pool came up faulted saying all the drives after the missing
> one were also faulted.  Thought I lost the whole pool.  However, some
> digging online showed the export/import info, and I was able to
> continue on without losing any data.

At the moment I have two 10Tb systems available so I'm experimenting  a 
lot to get a feeling on how easy recovering is.

So your comments are well appreciated.

And your suggestion is that although things looked really messed up, 
just export/import fixed the lot....

The GPT trick is sort of selfdocumenting, because it is otherwise real 
easy to get lost with 10 disks and 4 flash-devices. :(
And just because I yanked a single log disk (the wrong one) I ended up 
with a corrupt zraid.

So the least lesson for me here (again) has been that disk handling 
requires the utmost care. Trouble is just around the corner.

--WjW



More information about the freebsd-fs mailing list