Project

General

Profile

Bug #4220

beadm mount of old BE with zones fails "Read only filesystem"

Added by Rich Lowe about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
lib - userland libraries
Start date:
2013-10-17
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

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).

History

#1

Updated by Alexander Eremin about 6 years ago

  • Assignee set to Alexander Eremin
  • % Done changed from 0 to 10
#2

Updated by Alexander Eremin about 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 10 to 100

Also available in: Atom PDF