Find the answer to your Linux question:
Results 1 to 5 of 5
Hi All, I am developing for a Linux based device for which the HOT PLUG option is deactivated. As part of optimizing the code, we also don't want to create ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2

    SCSI hard disk device node creation


    Hi All,

    I am developing for a Linux based device for which the HOT PLUG option is deactivated. As part of optimizing the code, we also don't want to create
    device files for unused devices. We understand that both USB attached and
    fixec SCSI hard disks would create device files like /dev/sda,/dev/sda1 /dev/sdb, /dev/sdb1 etc. Is this understanding correct?

    In the case of USB attached SCSI devices, would driver create this device file entry?
    How is it created? Can somebody please tell me how it is being created automatically. In case I attach a fixed SCSI hard disk before boot up(and create device file /dev/sda1), would USB SCSI device driver create device files starting from /dev/sdb, automatically

    Any clue would be highly helpful to me

    Thanks
    appucool

  2. #2
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    It's done by udev, working with HAL and Dbus. Do some googling, read the udev manpage, you'll find plenty of stuff on how it works, including hotplugging.

  3. #3
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    640
    Quote Originally Posted by appucool View Post
    Hi All,

    I am developing for a Linux based device for which the HOT PLUG option is deactivated. As part of optimizing the code, we also don't want to create
    device files for unused devices. We understand that both USB attached and
    fixec SCSI hard disks would create device files like /dev/sda,/dev/sda1 /dev/sdb, /dev/sdb1 etc. Is this understanding correct?

    In the case of USB attached SCSI devices, would driver create this device file entry?
    How is it created? Can somebody please tell me how it is being created automatically. In case I attach a fixed SCSI hard disk before boot up(and create device file /dev/sda1), would USB SCSI device driver create device files starting from /dev/sdb, automatically

    Any clue would be highly helpful to me

    Thanks
    appucool
    Also not the the /dev/sdX are also used for SATA (serial ATA) drives also. The actual command that creates the entry in the /dev/ directory is "mknod" which is what HAL/UDEV uses when needed.

  4. #4
    Linux Newbie unlimitedscolobb's Avatar
    Join Date
    Jan 2008
    Posts
    120
    Quote Originally Posted by appucool View Post
    We understand that both USB attached and
    fixec SCSI hard disks would create device files like /dev/sda,/dev/sda1 /dev/sdb, /dev/sdb1 etc. Is this understanding correct?
    Please note that only /dev/sda and /dev/sdb nodes are created for hard disk drives. The nodes with numbers at the end represent partitions, not devices. That is, if on /dev/sda you have 2 partitions, you will also see /dev/sda1 and /dev/sda2.

    (I suppose you realize that, just wanted to make sure you do )

  5. #5
    Just Joined!
    Join Date
    Mar 2010
    Posts
    2
    Quote Originally Posted by greyhairweenie View Post
    It's done by udev, working with HAL and Dbus. Do some googling, read the udev manpage, you'll find plenty of stuff on how it works, including hotplugging.
    Thanks a lot guys...I got some insight into this...still analyzing my issue with these clues...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •