I think i discovered a bug with lucreate on Solaris 10. Not sure Can anyone verify, and should I log it as a bug with Oracle?
I have a host with zfs root pool configured as such:
rpool/ROOT/s10u11pJUL2015 mounted as /
rpool/ROOT/s10u11pJUL2015/var mounted as /var
rpool/ROOT/s10u11pJUL2015/var/mail mounted as /var/mail
If I lucreate a new BE (see blow), the cloning of the /var/mail dataset fails to complete cleanly.
I think it was set up this way to ensure mail could not fill the disk space of /var. In retrospect, that's not such a good idea since the /var/mail clone will become out-of-date when activated unless synced.
To resolve the problem, rpool/ROOT/s10u11pJUL2015/var/mail dataset is moved to another non-ROOT dataset (eg rpool/mail mounted as /var/mail) and the BE is created cleanly as expected.
I only raise the issue because lucreate isn't very clear on why it fails in this configuration and maybe it should, as I expect the problem would affect any type of child dataset of /var.
Failing BE:
# lucreate -n s10u11pAPR2016
Analyzing system configuration.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment <s10u11pAPR2016>.
Source boot environment is <s10u11pJUL2015>.
Creating file systems on boot environment <s10u11pAPR2016>.
Populating file systems on boot environment <s10u11pAPR2016>.
Analyzing Primary boot environment.
Processing alternate boot environment.
ZFS Datasets for which snapshot and clone will be created for BE <s10u11pAPR2016> are:
rpool/ROOT/s10u11pJUL2015
rpool/ROOT/s10u11pJUL2015/var
rpool/ROOT/s10u11pJUL2015/var/mail
Duplicating ZFS datasets from PBE to ABE.
Creating snapshot for <rpool/ROOT/s10u11pJUL2015> on <rpool/ROOT/s10u11pJUL2015@s10u11pAPR2016>.
Creating clone for <rpool/ROOT/s10u11pJUL2015@s10u11pAPR2016> on <rpool/ROOT/s10u11pAPR2016>.
Creating snapshot for <rpool/ROOT/s10u11pJUL2015/var> on <rpool/ROOT/s10u11pJUL2015/var@s10u11pAPR2016>.
Creating clone for <rpool/ROOT/s10u11pJUL2015/var@s10u11pAPR2016> on <rpool/ROOT/s10u11pAPR2016/var>.
Creating snapshot for <rpool/ROOT/s10u11pJUL2015/var/mail> on <rpool/ROOT/s10u11pJUL2015/var/mail@s10u11pAPR2016>.
Creating clone for <rpool/ROOT/s10u11pJUL2015/var/mail@s10u11pAPR2016> on <rpool/ROOT/s10u11pAPR2016/var/mail>.
cannot mount '/': directory is not empty
cannot mount 'rpool/ROOT/s10u11pAPR2016/var': failure mounting parent dataset
cannot mount 'rpool/ROOT/s10u11pAPR2016/var/mail': failure mounting parent dataset
property may be set but unable to remount filesystem
cannot mount '/': directory is not empty
cannot mount 'rpool/ROOT/s10u11pAPR2016/var': failure mounting parent dataset
cannot mount 'rpool/ROOT/s10u11pAPR2016/var/mail': failure mounting parent dataset
property may be set but unable to remount filesystem
Mounting ABE <s10u11pAPR2016>.
Generating list of files to be copied to ABE.
Finalizing ABE.
Unmounting ABE <s10u11pAPR2016>.
Fixing properties of ZFS datasets in ABE.
Reverting state of zones in PBE <s10u11pJUL2015>.
Making boot environment <s10u11pAPR2016> bootable.
Creation of boot environment <s10u11pAPR2016> successful.