Anton B. Rang schrieb:
The hostid solution that VxVM uses would catch this second problem,
> because when A came up after its reboot, it would find that -- even
> though it had created the pool -- it was not the last machine to access
> it, and could refuse to automatically mount it. If the administrator
> really wanted it mounted, they could force the issue. Relying on the
> administrator to know that they have to remove a file (the
> 'zpool cache') before they let the machine come up out of single-user
> mode seems the wrong approach to me. ("By default, we'll shoot you in
> the foot, but we'll give you a way to unload the gun if you're fast
> enough and if you remember.")

I haven't tried: Does ZFS try to -f (force) import of zpools in /etc/zfs/zpool.cache or does it just do a normal import and fails if the disks seem to be in use elsewhere, e.g. after a reboot of a proably failed and later
repaired machine?


Just to clear some things up. The OP who started the whole discussion would have had the same problems with VxVM as he has now with ZFS. If you force an import of a disk group on one host while it is still active on another host won't make the DG magically disappear on the other one.

The corresponding flag to "zpool import -f" is "vxdg import -C". If you issue this command you could also end up with the same DG imported on more than one host. Because on VxVM there is usually another level of indirection (volumes ontop of the DG which may contain filesystems and also have to manually mount) just importing a DG is normally harmless.

So also with VxVM you can shoot yourself in the foot.

On host B
        B# vxdg -C import DG
        B# vxvol -g DG startall
        B# mount /dev/vx/dsk/DG/filesys /some/where
        B# do_someting on /some/where

while still on host A
        A# do_something on /some/where

Instead of a zpool.cache file VxVM uses the hostid (not to be confused with the host-id, normally just the ordinary hostname `uname -n` of the machine) to know which DGs it should mount automatically. Additionally each DG (or more precisely: each disk) has an autoimport flag which also has to be turned on to make the DG autoimported during bootup.

So to mimic VxVM in ZFS the solution would simply be: add an autoimport flag to the zpool.




Daniel
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to