Re: zfsboot patch for /usr
No need to ignore the output of zfs list, here is an explanation of zfs list's output, this is in the zfs man page. I think you're confusing used with refer. used The amount of space consumed by this dataset and all its descendents. This is the value that is checked against this dataset's quota and reservation. The space used does not include this dataset's reserva‐ tion, but does take into account the reservations of any descendent datasets. The amount of space that a dataset consumes from its par‐ ent, as well as the amount of space that are freed if this dataset is recursively destroyed, is the greater of its space used and its reservation. When snapshots (see the "Snapshots" section) are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in the snapshot's space used. Additionally, deleting snap‐ shots can increase the amount of space unique to (and used by) other snapshots. The amount of space used, available, or referenced does not take into account pending changes. Pending changes are generally accounted for within a few seconds. Committing a change to a disk using fsync(2) or O_SYNC does not necessarily guarantee that the space usage informa‐ tion is updated immediately. available The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets within the pool. This property can also be referred to by its shortened column name, avail. referenced The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical. This property can also be referred to by its shortened column name, refer. On Thu, Mar 10, 2016 at 7:06 PM, Roger Marquis wrote: > > You don't mkdir it, you create it as a ZFS dataset, and mark it with the > > 'canmount=no' property, so it only exists to be a parent, not as an > > actual dataset. This is the default in zfboot currently. > > Thanks to everyone for pointing this out. I'll forget about mkdir then, > ignore the output of 'zfs list' and get comfortable doing things the zfs > way. > > Still have to tweak scripts/zfsboot to create a /var/spool subvol, a /home > subvol in place of /usr/home and specify atime=none in the default dataset. > At least the latter works as expected. > > Roger > > > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
> You don't mkdir it, you create it as a ZFS dataset, and mark it with the > 'canmount=no' property, so it only exists to be a parent, not as an > actual dataset. This is the default in zfboot currently. Thanks to everyone for pointing this out. I'll forget about mkdir then, ignore the output of 'zfs list' and get comfortable doing things the zfs way. Still have to tweak scripts/zfsboot to create a /var/spool subvol, a /home subvol in place of /usr/home and specify atime=none in the default dataset. At least the latter works as expected. Roger ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
On 10/03/2016 01:02, Freddie Cash wrote: > Set mountpoint=none if you just want to create the parent dataset without > actually using it for storage. Then you can set properties on it, and child > datasets will inherit then. Like pool/usr/local Usually, you want the mountpoint to be one of the inherited properties -- so set canmount=off instead. This pattern is used by default already in the installer. The root filesystem is created as a BE under zroot/ROOT/default/ but there is also a zroot/var which has canmount=off to act as a parent to zroot/var/logs, zroot/var/mail etc. which are not part of the boot environment but are mounted in the expected locations under /var Cheers, Matthew signature.asc Description: OpenPGP digital signature
Re: zfsboot patch for /usr
On 03/09/2016 18:36, Roger Marquis wrote: > Wondering if anyone has example patches for zfsboot (from > usr.sbin/bsdinstall/scripts)? > > We're looking to change some of the default zfs subvolumes, removing /usr in > favor of /usr/local in particular, and have run into a "parent does not exist" > issue. It's not clear where in the script the /usr parent dir should be > mkdir'd. > > Roger > > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > You don't mkdir it, you create it as a ZFS dataset, and mark it with the 'canmount=no' property, so it only exists to be a parent, not as an actual dataset. This is the default in zfboot currently. -- Allan Jude ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
Zfs automatically creates directories needed to be mounted, it would be a wasted effort making directories for zfs. I don't really understand your issue with an unused /usr dataset, but you can just modify the ZFSBOOT_DATASETS area of the script to get accomplish what you're trying to do. On Wed, Mar 9, 2016 at 8:02 PM, Freddie Cash wrote: > On Mar 9, 2016 4:04 PM, "Miroslav Lachman" <000.f...@quip.cz> wrote: > > > > Roger Marquis wrote on 03/10/2016 00:36: > >> > >> Wondering if anyone has example patches for zfsboot (from > >> usr.sbin/bsdinstall/scripts)? > >> > >> We're looking to change some of the default zfs subvolumes, removing > /usr in > >> favor of /usr/local in particular, and have run into a "parent does not > exist" > >> issue. It's not clear where in the script the /usr parent dir should be > >> mkdir'd. > > > > > > I no nothing about this script but if you want /usr/local as ZFS > filesystem, then you need to create parent (/usr in this case) and you can > use property canmount=off plus different 'mountpoint' (for example > /mnt/usr) to not mount /usr over existing directory on root filesystem. > > Set mountpoint=none if you just want to create the parent dataset without > actually using it for storage. Then you can set properties on it, and child > datasets will inherit then. Like pool/usr/local > > You'd still need to "mkdir /usr" in the script, but that's separate. > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
On Mar 9, 2016 4:04 PM, "Miroslav Lachman" <000.f...@quip.cz> wrote: > > Roger Marquis wrote on 03/10/2016 00:36: >> >> Wondering if anyone has example patches for zfsboot (from >> usr.sbin/bsdinstall/scripts)? >> >> We're looking to change some of the default zfs subvolumes, removing /usr in >> favor of /usr/local in particular, and have run into a "parent does not exist" >> issue. It's not clear where in the script the /usr parent dir should be >> mkdir'd. > > > I no nothing about this script but if you want /usr/local as ZFS filesystem, then you need to create parent (/usr in this case) and you can use property canmount=off plus different 'mountpoint' (for example /mnt/usr) to not mount /usr over existing directory on root filesystem. Set mountpoint=none if you just want to create the parent dataset without actually using it for storage. Then you can set properties on it, and child datasets will inherit then. Like pool/usr/local You'd still need to "mkdir /usr" in the script, but that's separate. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
> I no nothing about this script but if you want /usr/local as ZFS > filesystem, then you need to create parent (/usr in this case) and you > can use property canmount=off plus different 'mountpoint' (for example > /mnt/usr) to not mount /usr over existing directory on root filesystem. Exactly, but in our case we don't want a separate partition for /usr (never understood why anyone would since 1GB drives became affordable). As a beadm user I'm also assuming a rollback-able boot image would need to include /usr in the root filesystem. To do this in bsdinstall/scripts/zfsboot requires a 'mkdir' instead of 'zfs create'. Looks like it might be a matter of copying the $MKDIR_P around line 1125 but am testing that now. Roger ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: zfsboot patch for /usr
Roger Marquis wrote on 03/10/2016 00:36: Wondering if anyone has example patches for zfsboot (from usr.sbin/bsdinstall/scripts)? We're looking to change some of the default zfs subvolumes, removing /usr in favor of /usr/local in particular, and have run into a "parent does not exist" issue. It's not clear where in the script the /usr parent dir should be mkdir'd. I no nothing about this script but if you want /usr/local as ZFS filesystem, then you need to create parent (/usr in this case) and you can use property canmount=off plus different 'mountpoint' (for example /mnt/usr) to not mount /usr over existing directory on root filesystem. Miroslav Lachman ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"