This is more of a sysadmin question than a networking question. It
is probably more on topic in comp.unix.admin. Follow-ups set.
On Tue, 19 Jun 2007 09:21:22 -0000, gga <(E-Mail Removed)> wrote:
> Currently, I have autofs+nis working for my basic needs. This creates
> a virtual filesystem hierarchical structure under a single root, say /
> nfs, from multiple servers.
I wouldn't do that. Users need to know what to access, not where it
comes from. Name the drives based on how they're going to be used,
regardless of whether they are local or remote. Above all else, don't
name them based on the hostname of the server from which it is served.
Madness lies in that direction. Lets say you have server "foo"
serving a disk called "/disks/foo". When "foo" dies and you move the
disk to server "bar", then you have to change the name of the disk
(updating all references to "/disks/foo", which is difficult), leave a
symlink from /disks/bar to /disks/foo on all of the clients (which is
ugly), or have /disks/foo live on server bar (which breaks you
original scheme and confuses people).
> However, I also need a way of managing disk space allocations within
> this file system. Basically, I would like a special mkdir command
> that:
There are a ton of problems with this approach. Some of them are
addressed below.
> - Has knowledge of all the servers and the potential devices
> attached to them.
> - Already knows (thru a database that I'd manage, say, with a
> weekly cron job) or can quickly check the total disk space
> on each device.
How is that knowledge going to get into the tool? Keeping that up to
date is probably more work than you think. If it's only updated
weekly, on average it is more than 3 days out of date. What happens
when you don't have the space the tool thinks you do?
> - Based on the disk space used on each volume, it picks to
> create the new directory in the one with the most available
> space.
Bad idea. Let's say you have two devices, one with 20 GB free space and
the other with 50 GB. Your tool adds two 9 GB chunks to the 50,
leaving 32 GB on one and 20 GB on the other. Later you need to add a
35 GB chunk, but there's no place big enough to hold it. If the two
9's had originally gone onto the 20, you would have room for the 35.
> - Adds a proper nis autofs mount point for this new directory.
> - Pushes the nis autofs changes to each client.
I'm saying cfengine here, but there are other tools available to
automate system configuration. Use cfengine or one of the "run this
command on many hosts" tools to make the mount point. Use nis or ldap
to deliver the maps, or cfengine to copy the map files to the clients.
Mike
--
Michael Zawrotny
Institute of Molecular Biophysics
Florida State University | email:
(E-Mail Removed)
Tallahassee, FL 32306-4380 | phone: (850) 644-0069