| < AFS Reporting DB | Russ Allbery > Software | volnuke > |
volcreate is a wrapper around vos create that is intelligent about such things as finding a server for the volume with the most available space, replicating volumes at multiple physical locations, using some servers or partitions for only particular types of volumes, setting initial ACLs, and registering the mount point using loadmtpt. We use it at Stanford for all volume creation. It makes it much easier to manage a large cell with servers devoted to particular types of volumes and to balance usage out among the servers.
volcreate uses a configuration file that lists all the available AFS servers, specifying what types of volumes go on which servers and partitions, and optionally specifying the location of a server. Rather than specifying a server and partition to volcreate, one may specify the volume type and let volcreate find the most empty partitions for that volume type and put the volume on a randomly selected one of them. For replicated volumes, it tries to put one replica in each distinct physical location specified in the configuration file.
It also reads a second configuration file that specifies rules for initial ACLs for volumes and applies those rules to any volume it creates, allowing one to configure in a central location the initial ACLs for all volumes rather than having to update a variety of scripts each time something changes.
The original version of volcreate, written by Neil Crellin, was just a wrapper around vos create and the mount point utilities. I've added most of its features, including the code for finding a good server.
volcreate-logs is a utility that uses volcreate to create log volumes on a periodic basis. It also checks to see if an existing log volume is getting close to capacity and automatically increases its quota. We store most of our logs in AFS using newsyslog, and volcreate-logs creates new volumes automatically each month or year based on a configuration file, using volcreate to put the volumes in the best location and set the ACLs appropriately. It sets up the YYYY/MM directory structure that we use for log volumes.
volcreate and volcreate-logs are written in Perl and require Perl 5.005 or later. volcreate additionally requires the File::Temp module to create new volumes as clones of existing volumes. By default, volcreate calls loadmtpt to store the mount point of a newly created volume, so you'll want to either comment out that code or install the mount point tracking utilities.
volcreate and volcreate-logs are for AFS, so they obviously require the AFS fs and vos utilities be available. They search for them in a few locations, but you may want to change the search logic yourself.
volcreate-logs sends a report via e-mail and therefore requires a suitable sendmail program be available in /usr/sbin or /usr/lib.
You will need to customize the paths and e-mail addresses at the top of these scripts. See the Site configuration section, and please remember to change the e-mail address in volcreate-logs so that you don't send your mail to our mailing list.
The programs:
| volcreate 1.24 | 2005-04-01 | Download |
| volcreate-logs 1.15 | 2004-07-16 | Download |
Documentation:
Copyright 1998, 1999, 2000, 2002, 2004, 2005 Board of Trustees, Leland Stanford Jr. University.
These programs are free software; you may redistribute them and/or modify them under the same terms as Perl itself. This means that you may choose between the two licenses that Perl is released under: the GNU GPL and the Artistic License. Please see your Perl distribution for the details and copies of the licenses.
| < AFS Reporting DB | Russ Allbery > Software | volnuke > |