NFS server on Legacy Container?

Hi All,

I have a problem as follows.

Historically, there was an Ultra10 workstation running Solaris 8 using automount to access NFS volumes on a Solaris 8 server.

The Ultra 10 was retired and the Solaris 8 server has been migrated to a Legacy Container (Solaris 8 Branded, whole root, excl IP) running under a Solaris 10 Global Zone. The Legacy Container has been running successfully for months.

Now we need to bring the Ultra10 workstation out of retirement and allow it to use its automount to get at volumes (/home and others) on the Legacy Container. Anyone in this community done this? I understand that a local zone cannot be a NFS server according to Oracle.

All filesystems in use everywhere are UFS.

I tried sharing the required local zone mount points from the global zone but this seems to give very odd results. (Makes some files available/visible but not others.)

Using Google I came across a package called SUNWzone-share-nfs but cannot find or download this from anywhere. Anybody used this? I don't know whether it is/was official Oracle/Sun or third-party.

Any advice welcomed.

Thx in adv,
Hicksd8

This is obviously a more difficult question than I thought. No replies!!!

So you migrate a server into a local zone and then remember you need to make some files in that local zone available via nfs. How do you do that??? (Forget the fact that I have a Legacy Container, what if it was all Solaris 10??)
Work-arounds welcome.

Can you elaborate about "I tried sharing the required local zone mount points from the global zone but this seems to give very odd results. (Makes some files available/visible but not others.)"

This should just work.

Thank you Jlliagre,

I'll try it again now you've said that. It seemed that the "share" showed some files to the client but not all. However, it might have confused me at the time. I'll try it again.

However, I've read several places that if you share files in a local zone from the global zone that it could affect the local zone booting (getting stuck) and shutting down (getting stuck). Have you actually done this?

I also wondered about physically moving the files to be shared up to the global and creating a symbolic link back to the local zone so that local zone users could see them too. Comments on that one?

Or vice versa, leave the files to be shared in the local, create a link at the global zone and share that.

As I said previously, I'm looking for someone who's done it already. Can you help me.

That would be a bug, unless perhaps with removed files that a process has still open. Make sure you are up to date with patches.

I'm not sure to understand your setup.

  • Sharing a non global zone file system is unsupported.
  • "Remotely" mounting a global zone NFS file system on a non global zone is unsupported.
  • Using lofs to have global zone directories visible in a non global zone is, as far as I know, supported without restrictions. Having these directories shared by the global zone with NFS shouldn't affect the non global zone. However, when you shutdown a zone, its file systems are unmounted and perhaps can there be file busy situations here.

Symbolic links do not cross filesystem name space. I'm not sure to get "moving the files up to the global", they are already in the global zone (too), aren't they ?

Symbolic would be resolved by the NFS client so won't see the non global zone files.

1 Like

Thank you Jlliagre,

This is immensely useful stuff. I really value your knowledge on this.

I want to "share" files below the "zonepath" point, ie, residing in the local zone. (This is a full root zone if that's significant.)

I was considering moving the files to above the zonepath and then sharing them from there but then local zone users need to see them too. Hence a symbolic link (or a hard link since the local zone is not on its own fs) to get local zone users not to see the files missing.

This is a production box so I can't just reboot zones when i like just to test this.

As I said, I've seen in a number of places that sharing files below a zonepath can screw up the zone boot process but it doesn't say how.
I haven't comprehensively tested sharing such from the global zone and then trying to shutdown and reboot the local zone in case it does screw up. Hence the question to find out what the rest of the planet knows about this.

Instead of a doomed symbolic or hard link, what you might do is manually lofs mount your global zone directory to some directory under the zonepath.
something like:

 mount -F lofs /global/share /zones/myzone/root/share
1 Like

Thank you Jlliagre,

That's a really good suggestion. Since you used the words "doomed link" I will forget that whole idea.

You say:

What do you mean by "manually mount"? Do you think that I can put this into the global vfstab to automate it? Do you think that this won't interfere with local zone booting/shutdown?

I realise that I need to test this but any information from someone who has more experience than me on this is extremely welcome. Although I've done loads of work on Solaris for years I have never had to tackle this particular issue.

Again, thank you immensely for your help on this.

Running the mount command I posted.

Probably not.

The idea is to mount the directory after the zone is booted and to unmount it before it is shutdown/rebooted in order to avoid any interference with the non global zone start and stop processes.

Yes, right!!! That's what you mean by manually.

I'll try that. Thanks.

I'll update (in a while when I get back on site in a few days).