If you look at callers of remove_mountpoint() in libzfs, you'll see that it does remove the mountpoint, but only for inherited or default directories. We have no way to know for sure whether the mountpoint was originally created by ZFS or not, so we can only guess based on the current mountpoint. For inherited mountpoints, it's reasonably safe to assume that ZFS created in the first place. For explicit mountpoints, we cannot be sure that the administrator wanted the directory automatically managed or not.
- Eric On Thu, Jul 26, 2007 at 08:23:20AM +0200, Michael Schuster wrote: > Eric Schrock wrote: > > Yes, you can rename mountpoints, and always have been able to. It just > > didn't happen much before the arrival of ZFS. When you reboot the > > machine, it would have tried to mount the filesystem in the original > > location. Under ZFS, this would have created a new mountpoint for you. > > this reminded me of something I've been wanting to ask for some time ... > sorry for highjacking a thread ;-). > > in the past, I've sometimes done things like: > - have some stuff in /path/to/storage (ufs) > - decided that that stuff might just as well live on/in zfs > - "zfs creat"ed /path/to/storage.copy (with implicit creation of the > mountpoint), copied data from storage to storage.copy > - mv /path/to/storage to /path/to/storage.old > - zfs set mountpoint=/path/to/storage <volname> > > when this whole dance is done, I'm left with an empty directory > /path/to/storage.copy; since zfs created this directory in the first place, > is it an unreasonable expectation that zfs remove it as well? > > Michael > -- > Michael Schuster Sun Microsystems, Inc. > Recursion, n.: see 'Recursion' > _______________________________________________ > 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