|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
| News | Recommended Links | Reference | Bootable CDs and CD burining on | Solaris Installation |
| Using vold | Direct mounting using mount command | Sharing CDROM | Unmounting the CD-ROM Drive | Etc |
Unix in general and Solaris in particular has the propensity to make simple tasks complex and mounting CDROM is one of such cases. There are two main ways of mount CDROM on Solaris
The simplest way to mount CDROM on Solaris is use vold daemon. The vold daemon in Solaris manages the CD-ROM device and automatically performs the mounting similar to how Windows manages CDROMs (but not as transparent or reliable). If CD is detected in drive its should be automatically mounted to the /cdrom/cdrom0 directory. If you are running File Manager, a separate File Manager window displays the contents of the CD-ROM.
If the /cdrom/cdrom0 directory is empty because the CD-ROM was not mounted, or if File Manager did not open a window displaying the contents of the CD-ROM the first step is to verify the vold daemon is running using the command:
# pgrep vold
If vold is running, the system displays the process identification number of vold. If the system does not display anything, restart the daemon by entering the following command:
# /usr/sbin/vold &
If the vold daemon is running but did not mount the CD-ROM, stop the vold daemon process and then restart the daemon. To stop the vold process, you must know the process identification number. you can get it by entering this command:
# pgrep vold
Restart the vold process by entering the following command:
# pkill vold && /usr/sbin/vold &
If approach based on vold does not work you do try to do it via direct mount command. The first step is to determine the device which corresponds to the CDROM drive on you server or workstation.
CDROM on Solaris is usually linked to device /dev/sr0. You can determine the name of the device by entering the following command:
ls -al /dev/sr* |awk '{print "/" $11}'
This command returns the name(s) of the CD-ROM devices on the server. For example, the command can return the string /dev/dsk/c0t6d0s2.
You can also get the device name in cxtydzsn format, associated
with the CD drive:
Here
% iostat -Enc1t0d0 Soft Errors: 149 Hard Errors: 0 Transport Errors: 0 Vendor: MATSHITA Product: CDRW/DVD UJDA740 Revision: 1.00 Serial No: Size: 0.56GB <555350016 bytes> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 Illegal Request: 149 Predictive Failure Analysis: 0
-E displays all device error statistics & -n shows
the names in descriptive format. We are interested in only the logical device
name though.After you determined the name of device for CDROM drive you can use mount command (if mounting directory for example /cdrom does not exit you need to create it mkdir /cdrom; chmod a+rwx /cdrom ):
mount -F hsfs -r /dev/sr0 /cdrom
or
mount -F hsfs -o ro /dev/dsk/c1t0d0s0 /cdrom
to mount it (I would like to stress it again that directory /cdrom should exist and have proper permissions for operation to succeed).
After then you can check the results using df command, for example
/ (/dev/dsk/c0d0s0 ):11467100 blocks 959851 files ... ... ... /cdrom (/dev/dsk/c1t0d0s0 ): 0 blocks
If you want to simplify the mount process, you can add an entry to the /etc/vfstab file. Edit the /etc/vfstab file and add the following entry:
/dev/dsk/cØt6dØs2 - /cdrom hsfs - no ro
/dev/dsk/cØt6dØs2 - /cdrom-hsfs hsfs - no ro
/dev/dsk/cØt6dØs2 - /cdrom-ufs ufs - no ro
Use a text editor to create an /etc/dfs/dfstab file, if one does not exist. Add the following line to the /etc/dfs/dfstab file:
share -F nfs -o ro /cdrom/cd1
Ensure your remote machine is enabled as an NFS server by entering the following command:
# ps -ef | grep nfs | grep -v grep
This indicates whether the following daemons are running: /usr/lib/nfs/nfsd and /usr/lib/nfs/mountd.
If these daemons are not running, you need to enable your machine as an NFS server by entering the following command:
# /etc/init.d/nfs.server start
If your machine is enabled as an NFS server, enter one of the following commands:
# share
or
# shareall
Log on as superuser on target machine. Then create a /cdrom directory, if one does not already exist, by entering the following command:
# mkdir -p /cdrom/cd1
Now you can mount the remote CD-ROM as NFS filesystem using command
# /usr/sbin/mount -r remote_machine_name:/cdrom/cd1 /cdrom/cd1
You need to move out of the CDROM directory to successfully unmount it:
# cd / && umount /cdrom/cdrom0
If CDROM is mounted via NFS from remote computer you need unmount it in two places.
fuser -c /cdrom
This command will list the process ids of processes with open files in the filesystem mounted under /mnt. The characters following the pid provide additional information about the file:
The fuser
utility lists processes using a file or
files in a filesystem. It's To determine
what processes may be preventing a
filesystem's umount, the
-c
switch must be used as running this command
as root:
This command will list the process ids of
processes with open files in the filesystem
mounted under /mnt. The characters following
the pid provide additional information about
the file:
If you feel comfortable killing the
processes reported by fuser, you can do it
in one quick blow with the
-k
option:
This sends the SIGKILL signal to each
process which is the same as running
kill
pid
to each process.
However, before you go to this extreme,
perhaps the most common reason a filesystem
won't unmount is because you (or a previous
shell you used) has its current working
directory in that filesystem.
|
|||||||
SUMMARY howto mount a cdrom in solaris
Brent Bailey mrb at bmyster.com
Wed May 19 17:36:33 EDT 2004
again.. i want to thank the following people Bhavesh Shah and Debbie for giving a clue to my question.. QUESTION: how do you mount a cdrom in solaris SUMMARY: Bhavesh Shah said: 1) just make sure automountd daemon is running - if not start it from /etc/init.d - /etc/init.d/autofs start then mount insert the cdrom and it will be automatically mounted. 2) mount -F hsfs /dev/dsk/cxtxdxs2 /mnt Debbie said: If you have vold running (via /etc/init.d/volmgt) it will mount automatically. To have it mount immediately, you can run "volcheck" (or "volcheck -v" for more information). Then to eject it, type "eject cdrom" at the prompt (the button on the device won't work). Also, if it's a CDW or CDRW, you need to turn off vold before trying to write (or even run "cdrecord --scanbus"). again ,,,thank you
IBM/Mounting the CD-ROM (Solaris Operating Environment)
Mounting Solaris CDROMs. If you do not have CDROM burner you can mount ISO images directly
Mounting and Unmounting the Essentials CD-ROM on Solaris
Mounting a CD Brief chet car for mounting CDROMs on different flavours of Unix.
docs.sun.com System Administration Guide Devices and File Systems
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: August 08, 2009