On Sunday 22 January 2006 11:45, Grega Bremec wrote:
>A while ago I promised to post a lengthy description of a design I use
>in our z/VM environment, which is based on SLES9 and makes it possible
>to have z/VM users sharing complete root and /boot partitions and "own"
>as little as two MDISKs (or more, two is minimum), a 70-cylinder /srv
>containing /etc, and a 660 cylinder /var.
>...

Very nice!  I've been working on ways of automating this kind of work, and
have solved some of the problems you discribed in similar ways, and some a
bit differently.  The whole problem of splitting up the Linux directory tree
structure into shared filesystems so that you only require a small amount of
DASD for the writable filesystems for each new Linux guest is something that
I've worked on for a while.  I came up with a general solution that uses a
text file to describe the layout of all filesystems, which files or
directories are to go on which DASD, so that I can have different layouts for
different kinds of systems.  So I can put most of /etc on shared DASD and
just the stuff that has to change frequently on writable DASD.

One problem I ran into was that the root directory is usually on shared DASD,
because you want the kernel and boot files to be shared.  But I needed to be
able to create new directories in /, such as /db2data.  I could have just put
a bunch of extra mount-points onto the shared root filesystem, but I wouldn't
always know what they should be named because my users keep wanting to do new
and different things.  So I found a way to make / writable, using
pivot_root(8).  I put /boot, /bin, /sbin, /lib and other fixed system stuff
onto shared DASD, and have a small "root" DASD with empty directories of
those names and other stuff that should be writable (eg. parts of /etc).
During IPL, I have it run a shell script as the init program instead
of /sbin/init (by changing the /etc/zipl.conf on the shared DASD).  The
script mounts the "root" DASD to a pre-existing mount-point on the shared
DASD, then bind-mounts /boot, /bin, /sbin, /lib and so on from the shared
DASD onto the writable "root" DASD.  Then pivot_root switches the shared DASD
with the "root" DASD so that / is now my writable "root" DASD.  All the
system files are at the same paths before and after the pivot_root, so the
system can keep running properly.  I then exec the real /sbin/init and let
the system boot up normally.  I can then create mount-points for new
filesystems whenever I need to.

[BTW: The stuff that does that (and a lot more) is part of a product that lets
you specify how you want a Linux guest to be configured, and automates all of
the creation of a guest and DASD with your configuration applied to it.
Check out http://www.rocketsoftware.com/portfolio/ProvisioningExpert/ if you
want to learn more about that.]

I had to do a number of things differently than you did them, mostly because I
support 2.4 kernels and multiple distros.  But much of what you've described,
such as the changes to /etc/fstab and the /etc/sshd files, is the same stuff
I ran into.  Excellent document!
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to