Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ZFS vs. wedges



riz%NetBSD.org@localhost (Jeff Rizzo) writes:

>I have a couple disks on a new system, both labeled with GPT - and I'm 
>trying to use one for ZFS.  I created a fbsd-zfs partition on ld1, and 
>did 'zpool create tank /dev/dk4' - all was fine and dandy until I 
>rebooted.  On reboot, dk4 became dk0, and I wound up with a corrupt 
>zpool because the underlying device was wrong.

>So, I destroyed the pool, did a 'zpool import -f tank' and all was 
>well.

That is all what works today. The import command scans the disks
for ZFS data and creates a pool from it, but the resulting device
paths (e.g. /dev/dk4) are stored in /etc/zfs/zfs.cache and then
get reused.

The ZFS code either needs to learn to search for wedges by
other means (not that difficult to do, the functionality
already exists for selecting a root device). There might be
side effects in userland if something insists of paths starting
with a '/' or you might need a third syntax to use wedge names.

Or you could use devpubd to automatically create symlinks for wedges.
There is already a hook to do that. But people should then decide
to make devpubd a first class citizen and run it by default and
also earlier in the boot sequence.

The alternative is of course to not use GPT but only use
whole disks for ZFS. That's a bit more natural, but doesn't
cover all use cases.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index