On Tue 29 Apr 2008 at 07:39AM, Darren J Moffat wrote:
>
> Zones do not support lofi(7d). This case doesn't change that.
This statement is a bit vague; I think what it means to say is
that: "Processes executing inside of zones may not administratively
alter (i.e. create or destroy) lofi(7d) devices. This case doesn't change
that." And I agree on that front.
However: You can today mount something from a lofi device into a
nonglobal zone from the global zone during zone boot; and a lofi device
could also conceivably be imported into a zone using the 'add device'
subcommand. (For whatever reason, the zones admin guide even documents
exactly how to do that.)
The latter is unchanged by this case. The former would (today)
look as follows:
zonecfg:foo> add fs
zonecfg:foo:fs> set dir=/mnt
zonecfg:foo:fs> set special=/dev/lofi/1
zonecfg:foo:fs> set type=hsfs
zonecfg:foo:fs> add options ro
zonecfg:foo:fs> end
It would be nice if this proposal fit in with that scheme; that is, with your
proposed new capability, I'd also assume that I could now do the following?
zonecfg:foo> add fs
zonecfg:foo:fs> set dir=/mnt
zonecfg:foo:fs> set special=/export/my.iso
zonecfg:foo:fs> set type=hsfs
zonecfg:foo:fs> add options ro
zonecfg:foo:fs> end
If memory serves me correctly, we simply invoke mount(1m), but that would
be a nice thing for you to check in your testing. We'd probably also like
to add this to the zones documentation, so please do touch base with the
zones team so that we can drive documentation updates.
Two final questions: (1) is there any potential interaction with fsck(1m)
here? In other words, if the file we're looping back represents an FS
which requires an fsck stage, how will that work? (2) Will the lofi nodes
created in this manner be visible in the output of lofiadm(1m)?
Thanks,
-dp
--
Daniel Price - Solaris Kernel Engineering - dp at eng.sun.com - blogs.sun.com/dp