About the Volume Header

Dave Olson olson at anchor.esd.sgi.com
Wed Feb 20 17:48:43 AEST 1991


In <9102192244.AA12336 at koko.pdi.com> shoshana at pdi.UUCP (Shoshana Abrass) writes:
|   I'm writing my own version of 'hinv'. Having the disk serial #'s appear 
|   in the listing would be VERY useful.

You can certainly do this, but if you call it hinv, you may break
SGI programs that use it and expect known output.  If you must
call it hinv, put it in /usr/local/bin, or something like that.

|   I've been thinking of adding a file to the volume directory in our
|   disk's volume headers. It would be a plain ascii file, containing the
|   serial number of the disk. I can add the file easily, using dvhtool.
| 
|   My questions are: Is it relatively straightforward to access/read the 
|   file via /dev/rdsk/dksxdxvh ? and is this something I should be doing? 
|   or is this yet another thing which will cause SGI to void my warranty ;).

The sgilabel file has the serial number in it for some disks, and
the input is pretty free form.  Adding your own file should be
safe, but the volhdr only has room for 16 files, so make sure you
don't put too many files there.  In particular, inst puts a temporary
file there during miniroot installs.

You could simply get the file out with 'dvhtool -v g vhfile file'
if you are doing a shell script.  Otherwise look at sys/dkio.h
and sys/dvh.h.  The format is quite unlikely to change, since
it is known to the CPU prom.
--

	Dave Olson

Life would be so much easier if we could just look at the source code.



More information about the Comp.sys.sgi mailing list