Operating System - HP-UX
1752718 Members
5798 Online
108789 Solutions
New Discussion юеВ

Re: how to distinguish dvd rom or hard disk

 
alert0919
Advisor

how to distinguish dvd rom or hard disk

how could I determine which is disk or dvd-rom
because i use command
ioscan -fnC disk
I found dvd rom and hard disk ,I only would like to show hard disk only,how to do it
how to distinguish them

I need to use program to distinguish them
my attached file which shows my machine result

thanks
15 REPLIES 15
Michal Kapalka (mikap)
Honored Contributor

Re: how to distinguish dvd rom or hard disk

hi,

the first, there is a comment DVD-ROM

device file : /dev/dsk/c0t0d0

HW path : 0/0/2/0.0.0.0

mikap
Steven E. Protter
Exalted Contributor

Re: how to distinguish dvd rom or hard disk

Shalom,

Right hand column.

Where it says: DVD-ROM

ioscan -fnC disk | grep -v -i dvd-rom

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Torsten.
Acclaimed Contributor

Re: how to distinguish dvd rom or hard disk

it's very obvious what the DVD is, but because it is a disk too, all 3 are listed in your ioscan.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bill Hassell
Honored Contributor

Re: how to distinguish dvd rom or hard disk

ioscan cannot distiguish between different types of disks (ie, CD, DVD, arrays, solid-state, optical RW, etc). At the end of the line, it reports what a SCSI ID request returns from the device. Thus, there is no guarantee what the result will be. Some disks report their product number (ie, Seagate), others report the manufacturer (TEAC, HP, EMC, etc). So there is no generalized way to identify the different types of disks.


Bill Hassell, sysadmin
Vishu
Trusted Contributor

Re: how to distinguish dvd rom or hard disk

Hi,

I agree with Bill that ioscan does not diffentiate between different types of disks. so, in your case, the only way to get only Hard disk is to use the grep.

# ioscan -fnC disk | grep -v -i dvd-rom

This will give you what you required.
alert0919
Advisor

Re: how to distinguish dvd rom or hard disk

I try this command ioscan -fnC disk | grep -v -i dvd-rom
it cannot solve my problem

the dvd rom still exist
in my attached file,it shows this situation

R.K. #
Honored Contributor

Re: how to distinguish dvd rom or hard disk

Hi,

You are getting this o/p as option "-v" is "All lines but those matching are printed"....so the line containing "DVD" is removed but the entry for DVD contains two lines and only One line containing DVD is removed and what you are seeing is the other line.

Regds,
R.K.
Don't fix what ain't broke
Sivakumar MJ._1
Respected Contributor

Re: how to distinguish dvd rom or hard disk

Hi Alert0919,

Go thru this book page number from 135 - 140.. you will get a clear picture..
Sivakumar MJ._1
Respected Contributor

Re: how to distinguish dvd rom or hard disk