Operating System - HP-UX
1820702 Members
2591 Online
109627 Solutions
New Discussion юеВ

How do I find the /dev/dsk.... for my DVD-ROM drive?

 
John O'Neill_6
Regular Advisor

How do I find the /dev/dsk.... for my DVD-ROM drive?

Hi All,

I got a HP2p2470 with a Tape Array 5300 with a DVD-ROM and a tape drive in the array.

I'm trying to install an application and mount commands with /dev/dsk/c0t4d0 fail with 'no such file exists...'.

So, it seems that the device file name for the DVD-ROM drive is different to what the install manual stipulats, but how do I find it? I know that /dev files are used by the UNIX Kernal to interact with physical devices.

I've tried SAM, after thinking for a bit the DVD-ROM shows up along with the other disks, but its not being used, when I try to use 'Actions -> View more Information' it tells me that it can not tell me anything about 'unused' devices.

There's a host of things in the /dev/dsk directory and I'm terrified of running things as 'root' in case I destroy the system.

Is there a 'safe' way of finding out what /dev/dsk file my DVD-ROM is?

Any help appreciated.

PS, I'm from a mainly 'windows' environment so please excuse my dumbness with some things UNIX.
7 REPLIES 7
melvyn burnard
Honored Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

try using the command
ioscan -funCdisk and look for the line that has the DVD klisted, under it should be the device files.
e.g.:
ioscan -funCdisk

....
...

disk 19 6/0/11/0/0.1.0 sdisk CLAIMED DEVICE HP DVD-ROM 3005
/dev/dsk/c9t1d0 /dev/rdsk/c9t1d0

So the device file here is /dev/dsk/c9t10d0

HTH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Joseph Loo
Honored Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

hi,

try this:

# ioscan -fnC disk
look for DVD-ROM, and below that line, the device file should be stated.

u may like to check if the state of the DVD-ROM is claim as well from the ioscan command above.

regards.

what you do not see does not mean you should not believe
Florian Heigl (new acc)
Honored Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

Here's a small example:

Class I H/W Path Driver S/W State H/W Type Description
===========================================================================
disk 0 0/0/1/1.15.0 sdisk CLAIMED DEVICE SEAGATE STsomething
/dev/dsk/c1t15d0 /dev/rdsk/c1t15d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 304
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 2 0/0/2/1.15.0 sdisk CLAIMED DEVICE SEAGATE STsomething
/dev/dsk/c3t15d0 /dev/rdsk/c3t15d0


My (err... my customers *g*) DVD-ROM device file would be /dev/dsk/c2t2d0 in the above example.
yesterday I stood at the edge. Today I'm one step ahead.
Gavin Clarke
Trusted Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

Just a little extra hint.

SAM gives you the hardware path in disks and filesystems.

Using that hardware path you can do an
ioscan -H hardwarepath (eg. 0/3/0/0.0.0.0)
which will tell you exactly what to look for when you do ioscan -funC disk as the others have suggested.

I only mention this really because our DVD shows up as:
0/0/3/0.0.0.0 disk TEAC DV-28E-C

Which is fairly obvious but does not quite contain the letters DVD.

Fabio Ettore
Honored Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

Hi Jonn,

ioscan -fnCdisk

or

ioscan -funCdisk

work for what you are searching for.

DVD-ROM and CD-ROM are belong to the class DISK in HP-UX, so you will see them by -Cdisk option.
If you need to find tape on your HP-UX system then you should launch

ioscan -fnCtape

and so on...

All classes expected on ioscan with -C option are in the last column of the

lsdev

command.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
baiju_3
Esteemed Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

Hi

1)ioscan -fnC >/tmp/ioscan.out
search for DVD in /tmp/ioscan.out .

2)or ioscan -fnH h/w path
eg ioscan -fnH 0/0/0/2/1.2.0
If you know the H/W path , some servers will have the path to the device written on the cabinet.



Thanks,
BL.
Good things Just Got better (Plz,not stolen from advertisement -:) )
Alan Meyer_4
Respected Contributor

Re: How do I find the /dev/dsk.... for my DVD-ROM drive?

Because the cd/dvd drive is frequently on different devices across most systems, I've written this process into a shell script called mntcd.

# Loop through the ioscan report
ioscan -funC disk |while read LINE ;do

# Find the CD/DVD ROM line and read the very next one for the device
if [ "`echo $LINE |grep -Ei 'CD-ROM|DVD'`" ] ;then

# Read the CD-ROM device and exit the report
read DEVICE REST
break
fi
done

# Mount the device
/usr/sbin/mount -r $DEVICE /cdrom

# Print listing of mount points
/bin/bdf /cdrom
" I may not be certified, but I am certifiable... "