I made the mistake of creating a pool of disks using letter names
(e.g. /dev/sda, /dev/sdb...), and then I plugged in an external disk
before boot. Of course it conveniently occupied /dev/sda and shifted
all my zfs disks over, so alright, I did a zpool export and a zpool import
and everything was recovered. Great, except I wish I'd created the pool
using devices named in /dev/disk/by-uuid instead. So I tried
zpool export olympic
zpool import -d /dev/disk/by-uuid olympic
and... nothing. Also,
zpool import -d /dev/disk/by-uuid
still nothing. Is there any way to get this pool to use the UUID names,
or do I have to start over from scratch?
Thanks,
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
On Qui, 2008-09-25 at 14:32 -0400, David Abrahams wrote:
>
> Hi,
>
> I made the mistake of creating a pool of disks using letter names
> (e.g. /dev/sda, /dev/sdb...), and then I plugged in an external disk
> before boot. Of course it conveniently occupied /dev/sda and shifted
> all my zfs disks over, so alright, I did a zpool export and a zpool import
> and everything was recovered. Great, except I wish I'd created the pool
> using devices named in /dev/disk/by-uuid instead.
Why would you want to use /dev/disk/by-uuid as opposed
to /dev/disk/by-id?
> So I tried
>
> zpool export olympic
> zpool import -d /dev/disk/by-uuid olympic
>
> and... nothing. Also,
>
> zpool import -d /dev/disk/by-uuid
>
> still nothing. Is there any way to get this pool to use the UUID names,
> or do I have to start over from scratch?
Currently, there isn't, because ZFS devices are not put
into /dev/disk/by-uuid.
I think (but I'm not sure) that libvolume_id in udev is responsible for
extracting the UUIDs that go into /dev/disk/by-uuid, but obviously it
doesn't know about ZFS yet.
Perhaps using "zpool import -d /dev/disk/by-id" would do what you want?
Cheers,
Ricardo
That's because by default zfs-fuse only searches for disks in /dev (it
doesn't go into subdirectories).
The reason for this default is that /dev/disk/by-id is not available
everywhere, although I guess I could implement some kind of
autodetection.
If you want to get your alternate names back, you can use "zpool import
-d /dev/disk/by-id".
> I was trying to use /dev/disk/by-id
> instead of by-uuid, but I imagine you'll see the same thing.
>
> On the bright side, I haven't had any issues with device names
> shifting around. ZFS seems to always figure out which disks belong in
> which pool positions. I just have to do some extra dereferencing of
> 'sda' names when I'm debugging things.
Good to hear :)
Cheers,
Ricardo
That's odd, it certainly used to work as I used it to move data between
different ZFS pools on this machine..
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP