Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!shinobu!odin!anchor!olson From: olson@anchor.esd.sgi.com (Dave Olson) Newsgroups: comp.sys.sgi Subject: Re: About the Volume Header Message-ID: <1991Feb20.064843.13185@odin.corp.sgi.com> Date: 20 Feb 91 06:48:43 GMT References: <9102192244.AA12336@koko.pdi.com> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Mountain View, CA Lines: 31 In <9102192244.AA12336@koko.pdi.com> shoshana@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.