For When You Can't Have The Real Thing
[ start | index | login ]
start > HPUX > Mounting CDROMs

Mounting CDROMs

Created by dave. Last edited by dave, 19 years and 95 days ago. Viewed 5,848 times. #1
[edit] [rdf]
labels
attachments

Mounting CDROMs in HP/UX

1. Figure out what your cdrom drive's device is.  For your own peace
   of mind, don't use SAM, because SAM is broken in HP-11.00.

[root@dusty]ioscan -fnC disk

Class I H/W Path Driver S/W State H/W Type Description ======================================================================= disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE TEAC CD-532E-B /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 disk 1 10/0/15/1.6.0 sdisk CLAIMED DEVICE QUANTUM ATLAS10K-9LVD /dev/dsk/c3t6d0 /dev/rdsk/c3t6d0

2. Stick the CD in the drive, and then use fstyp (yes, without the e, this is not a typo) to figure out what file system is on your device.

[root@dusty]fstyp /dev/dsk/c0t0d0 hfs

3. If your file system is not cdfs, you can just do a straight mount but you must specify the file system type and the read-only option:

[root@dusty]mount -F hfs -o ro /dev/dsk/c0t0d0 /cdrom

At this point you can go to step 5.

If your file system is cdfs, you need to know if your disk is a Rock Ridge Extention disk. The best way to find out is to read the documentation for whatever is on the disk -- it will usually tell you this. If it doesn't mention Rock Ridge Extentions, you are good to go. Just mount the sucker.

[root@dusty]mount /dev/dsk/c0t0d0 /cdrom

Once it is mounted, check it out. If you see a whole bunch of nasty looking file names like

FILE;1

then you probably have a Rock Ridge Extentions disk. Unmount it and use the method below. If it mounted fine and the file names look OK, go on to step 5.

4. Right, you've determined that you have a Rock Ridge Extentions disk. Ask yourself if it is really necessary to mount this disk locally. If you have something sane like a sun, 90% of the time it isn't necessary to mount it locally, and you can mount it across the network. Consider this option seriously, you will avoid a _whole_ lot of trouble. I mean it. No one in their right mind uses pfs_mount unless forced to at gunpoint. If you are determined to go through with this, you need to update the /etc/pfs_fstab file with a line in this format:

[device_file] [mount_point] [filesystem_type] [translation method]

Example:

/dev/dsk/c0t0d0 /cdrom pfs-rrip xlat=unix 0

In the oracle documentation, it uses /SD_CDROM instead of /cdrom and I've noticed that HP11.0 creates /SD_CDROM for you.

So you'd better create your mount point if it doesn't already exist.

Ask yourself if you are _really_ sure you can't just stick the sucker in something sane like a sun and cross-mount over the network. Are you sure? This is your last chance.

OK then, fire up the pfs daemons:

* IMPORTANT * Wise sysadmins do _not_ do this on the console. Doing so increases (by an exponential factor) the probability of problems later. Do it in a CDE window. (Better yet… don't do it at all. Cross mount from a sun.)

* IMPORTANT * Wise sysadmins also check to make sure these troublemakers are not already running. If you fire these up when they are already running, you are capital E dead. You might as well save yourself some time and reboot your machine now.

[root@dusty]nohup /usr/sbin/pfs_mountd& [root@dusty]nohup /usr/sbin/pfsd&

Now that you are comitted, and if you still feel lucky, mount the cdrom with the pfs_mount command.

[root@dusty]pfs_mount /cdrom

Check to make sure that the disk mounted OK and the file names are readable.

Remember that at any point in these proceedings the pfs components may just hang your command session or system. The only way to recover from the system hang is a reboot. Our past history with these tools indicated that if one of the sessions hangs, you may be able to keep running your system, but you can forget about mounting your CD until after the next reboot.

It is also important to note that attempting to nfs share a pfs_mount-ed file system is mind-bogglingly dangerous, both to the local system _and_ to the remote system. You will probably have to reboot one or both of the systems to clear the inevitable problems.

5. Use and enjoy the content of your disk.

6. Once you are finished with the disk, you would probably like it back so you can put it away in the software cabinet (hint hint). If you _do not_ have a Rock Ridge Extentions disk, you can just use umount:

[root@dusty]umount /cdrom

If you _do_ have a Rock Ridge Extentions disk (which you remember from all that dangerous mucking about with pfs commands) you can try your luck with the pfs_umount command:

[root@dusty]pfs_umount /cdrom

Depending on the state of your pfs daemons (they periodically crash or hang for the usual "we're-running-on-an-HP" reason) you have about a 50-50 chance of being able to eject the disk. If you draw the short straw, the only way to get your disk back is to reboot your system.

If you got the disk out, congratulations. We don't know what to do about the pfs_mountd and pfsd processes you probably still have hanging around. Killing them has caused bad luck in the past, and they usually tend to die (or become useless) on their own anyways. It does appear safe to exit the window where you started them, as long as you used nohup to start them.

Odds are you will have to reboot the machine the next time their use is required.

Update, November 2002: While looking through some entirely unrelated information, I discovered that HP has released some patches which will let HPUX 11 and HPUX 11i read ISO-9660 Rock Ridge CDs without having to resort to the pfs tools. Look for PHCO_26449 and PHKL_26450 for 11.00, and PHKL_26269 and PHCO_25841 for 11i. 10.20 and previous users are stuck with the pfs tools.

I don't have any HP systems available at the moment, so I cannot vouch for the accuracy or usefulness of the information, but with all the hits on this page I figured there would be some people interested in it.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt