You've tripped over a variant of: 6335095 Double-slash on /. pool mount points
- Eric On Mon, Jun 25, 2007 at 02:11:33AM -0400, Dennis Clarke wrote: > > Not sure if this has been reported or not. > > This is fairly minor but slightly annoying. > > After fresh install of snv_64a I run zpool import to find this : > > # zpool import > pool: zfs0 > id: 13628474126490956011 > state: ONLINE > status: The pool is formatted using an older on-disk version. > action: The pool can be imported using its name or numeric identifier, though > some features will not be available without an explicit 'zpool > upgrade'. > config: > > zfs0 ONLINE > mirror ONLINE > c1t9d0 ONLINE > c0t9d0 ONLINE > mirror ONLINE > c1t10d0 ONLINE > c0t10d0 ONLINE > mirror ONLINE > c1t11d0 ONLINE > c0t11d0 ONLINE > mirror ONLINE > c1t12d0 ONLINE > c0t12d0 ONLINE > mirror ONLINE > c1t13d0 ONLINE > c0t13d0 ONLINE > mirror ONLINE > c1t14d0 ONLINE > c0t14d0 ONLINE > > So I then run a zpool import but I add in the -R option and specify root thus > : > > # zpool import -f -R / 13628474126490956011 > > One would think that the "-R /" would not result in any damage but this si > the result : > > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > zfs0 191G 8.23G 24.5K legacy > zfs0/SUNWspro 567M 201M 567M //opt/SUNWspro > zfs0/backup 190G 8.23G 189G //export/zfs/backup > zfs0/backup/qemu 1.09G 934M 1.09G //export/zfs/qemu > zfs0/csw 124M 3.88G 124M //opt/csw > zfs0/home 239M 7.77G 239M //export/home > zfs0/titan 24.5K 8.23G 24.5K //export/zfs/titan > > Note the extra / there that should not be there. > > Not a simple thing to fix either : > > # zfs set mountpoint=/opt/SUNWspro zfs0/SUNWspro > # zfs list > NAME USED AVAIL REFER MOUNTPOINT > zfs0 191G 8.23G 24.5K legacy > zfs0/SUNWspro 567M 201M 567M //opt/SUNWspro > zfs0/backup 190G 8.23G 189G //export/zfs/backup > zfs0/backup/qemu 1.09G 934M 1.09G //export/zfs/qemu > zfs0/csw 124M 3.88G 124M //opt/csw > zfs0/home 239M 7.77G 239M //export/home > zfs0/titan 24.5K 8.23G 24.5K //export/zfs/titan > > relatively harmless. > > Looks like altroot should be assumed to be / unless otherwise specified and > if it is specified to be / then the altroot can be ignored. I don't know if > that is clear but I think you know what I mean : > > in /usr/src/cmd/zpool/zpool_main.c : > > static int do_import(nvlist_t *config, const char *newname, const char > *mntopts, const char *altroot, int force, int argc, char **argv) > > > if that const char *altroot happens to be nothing more than a forward slash > char ( nul terminated ) then I think it should be ignored. > > What say you ? > > Dennis > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss