/Dev/sr0 and/dev/CDROM

Source: Internet
Author: User

 

And/dev/CDROM

Luo Weifeng 2011-5-17

Reprinted Reserved: http://blog.csdn.net/luoweifeng1989/archive/2011/05/17/6426193.aspx

 

 

This problem seems to have plagued me for a short time, because I want to view the CD mount point. After using the mount command to view the mount point, the device/dev/sr0 is mounted to the disk I prepared, I tried umount to mount this device, and there was no difference after I mounted it with/dev/CDROM. Then I checked the device node and found the following:

It turns out that/dev/CDROM is just a symbolic link to sr0. So what exactly does Sr mean? Google found that there was a buddy in the mail list who was depressed. The excerpt is as follows:

> <Br/> on Wed, Nov 4, 2009 at pm, Derek Broughton <br/> <derek@pointerstop.ca> wrote: <br/> Verde denim wrote: <br/> on Tue, Nov 3, 2009 at AM, derek Broughton <br/> <derek@pointerstop.ca> wrote: <br/> translation-I don't know either... LOL <br/> actually, I 'd already said that-and suggested "Raw" as a <br/> wild guess. but <br/> I was intrigued that Detlef thought that knowing what it stood <br/> for wocould <br/> prevent errors, since I really can't imagine how most of us <br/> wocould need to <br/> know it. <br/> -- <br/> Derek <br/> and knowing the acronym definitions probably won't help the learning <br/> too much, either. <br/> but, according to the Linux SCSI sub-system documentation I have, it <br/> wocould have to stand for _ SCSI _ read _ since it is a CD drive that is <br/> designated read-only. for generic operations on the same device, it <br/> wocould map to sg0 (_ SCSI _ generic _) in order to gain the write perm. <br/> apparently all of the devices like/dev/sr0,/dev/st0,/dev/nst0x Map <br/> to an SG device for generic operations. <br/> although _ raw _ seems to be a good logical choice. <br/> Lo has C had it right. <br/> but you shoshould read the code from orbit. it's the only way to make sure. <br/> from a 2.4 kernel source <br/> Drivers/SCSI/SD. c <br/> static struct scsi_device_template sd_template ={< br/> name: "disk", <br/> tag: "SD", <br/> scsi_type: type_disk, <= "D" for disk <br/> Major: scsi_disk0_major, <br/>/* <br/> * Secondary range of majors that this driver handles. <br/> */<br/> min_major: scsi_disk1_major, <br/> max_major: scsi_disk7_major, <br/> BLK: 1, <br/> detect: sd_detect, <br/> init: sd_init, <br/> finish: sd_finish, <br/> attach: sd_attach, <br/> detach: sd_detach, <br/> init_command: sd_init_command, <br/>}; <br/> Drivers/SCSI/St. c <br/> static struct scsi_device_template st_template = <br/> {<br/> name: "tape", <br/> tag: "St ", <br/> scsi_type: type_tape, <= "T" for tape <br/> Major: scsi_tape_major, <br/> detect: st_detect, <br/> init: st_init, <br/> attach: st_attach, <br/> detach: st_detach <br/>}; <br/> Drivers/SCSI/SR. c <br/> static struct scsi_device_template sr_template = <br/> {<br/> name: "CDROM", <br/> tag: "Sr ", <br/> scsi_type: type_rom, <= "R" for Rom <br/> Major: scsi_cdrom_major, <br/> BLK: 1, <br/> detect: sr_detect, <br/> init: sr_init, <br/> finish: sr_finish, <br/> attach: sr_attach, <br/> detach: sr_detach, <br/> init_command: sr_init_command <br/>}; <br/> from a 2.6 kernel source <br/> Drivers/SCSI/SR. c <br/> module_description ("scsi cdrom (SR) driver"); <br/> module_license ("GPL"); <br/> module_alias_blockdev_major (scsi_cdrom_major ); <br/> module_alias_scsi_device (type_rom); <br/> module_alias_scsi_device (type_worm ); <br/> -- <br/> sktsee <br/> -- <br/> Ubuntu-Users Mailing List <br/> ubuntu-users@lists.ubuntu.com <br/> modify settings or unsubscribe: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users <br/> 

We can see that:

Sr stands for SCSI + Rom

SD represents SCSI + Disk

SG represents SCSI + generic

St represents SCSI + tape

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.