beadm mount of old BE with zones fails "Read only filesystem"
I have an old BE, it has associated zones which I have since deleted.
If I try to mount it:
> % sudo beadm mount gcc4_156 /mnt Unable to mount gcc4_156. Read only file system.
If I dissassociate the zone from this BE (by changing the parentbe value, temporarily) this zone mounts.
When I do this, I can see that the path to the zone root includes read-only mounts.
I think this implicates the use of loopback_mount_zonepath being used to mount the ancestors of the zonepath read-only, even though we may have to create directories in them (when, as now, we need a 'root' on which to mount a zone BE for a zone we've since removed).
I suspect you can reproduce this by creating a BE, creating a zone in that BE. Creating a new BE, deleting the zone (completely) with zoneadm/zonecfg in this new BE, and then trying to mount the old BE.
Certainly the comments in the code which suggest that paths which exist in an old BE must also exist in the new BE are wrong, that's not at all safe to assume (see the comments preceding loopback_mount_zonepath).