General discussion

Locked

HPUX 11 cdrom mount

By RedHook ·
To get a mounted cdrom to work in HPUX11 is a pain (compared to Solaris). You have to start pfs_mountd and pfsd. Documentation suggests starting these automaticlly with an /sbin/rc.config.d script, but there is no suggestion as to what run level orwhether the script should also have a "stop" clause to cleanly shutdown. I would appreciate your input, (especially a suggested script!)

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

HPUX 11 cdrom mount

by ghislain.levesque In reply to HPUX 11 cdrom mount

modify the file /etc/pfs_fstab and add an entry like this: (replace the /dev/... by your actual path to the cd )

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

save the file

run as root :

nohup /usr/sbin/pfs_mountd &
nohup /usr/sbin/pfsd &
/usr/sbin/pfs_mount /cdrom

to UMOUNT the cdrom type :

/usr/sbin/pfs_umount /cdrom

Hope this help...

Collapse -

HPUX 11 cdrom mount

by RedHook In reply to HPUX 11 cdrom mount

Thanks, but I'm looking for a way to start (and cleanly stop) the pfs_mountd and pfsd daemons at boot time.

Collapse -

HPUX 11 cdrom mount

by marv732 In reply to HPUX 11 cdrom mount

In case you're still interested you might like to try
1 Call this pfs_srv and install in /etc/rc.config.d
#!/sbin/sh
# pfs daemon configuration
#
# PFSTART: Set to 1 to start pfs software
# Set to 0 NOT to start pfs software
#
PFSTART=1export PFSTART

2. Call this pfs_srv and install in /sbin/init.d
#! /sbin/sh
#
# Startup/shutdown script for pfs software.
#

PATH=/sbin:/usr/bin:/usr/bin:/bin; export PATH

rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1
fi
}

mode=$1

case "$mode" in
'start_msg')
echo "Start pfs Server"
;;

'stop_msg')
echo "Stop pfs Server"
;;

'start')
if [ -f /etc/rc.config.d/pfs_srv ] ; then
. /etc/rc.config.d/pfs_srv
else
echo "ERROR: /etc/rc.config.d/pfs_srv file MISSING"
fi
if [ $PFSTART -eq 1 ] ; then
echo "starting pfs Server\c"
nohup /usr/sbin/pfs_mountd & > /dev/null
nohup /usr/sbin/pfsd & > /dev/null
set_return
else
rval=2
fi
;;

'stop')
if [ -f /etc/rc.config.d/pfs_srv ] ; then
. /etc/rc.config.d/pfs_srv
else
echo "ERROR: /etc/rc.config.d/pfs_srv file MISSING"
fi

if [ $PFSTART -eq 1 ] ; then
echo "stopping pfs Server\c"
kill -9 `ps -ef|grep pfsd|awk '{print $2}'` > /dev/null
kill -9 `ps -ef|grep pfs_mountd|awk '{print $2}'` > /dev/null
set_return
else
rval=2
fi
;;

*)
echo "Usage: $0 {start|stop}"
;;

esac

exit $rval

3 Create a link
ln -s /sbin/init.d/pfs_srv /sbin/rc3.d/S999pfs_srv
ln -s /sbin/init.d.pfs_srv /sbin/rc2.d/K999pfs_srv

4 This will start the pfs servers at runlevel 3 and kill them off at runlevel 2 when you do a shutdown. Any other time you can start them with
/sbin/init.d/pfs_srv start
and stop with
/sbin/init.d/pfs_srv stop
5 This process is the same for anything to be started at boot for HP-UX 10 and 11.

HTH

Back to Linux Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums