- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: order of externad hard drive devices
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 01:28 PM
08-02-2006 01:28 PM
order of externad hard drive devices
I have two external disks connected to my system. One firewire and one USB. Both of them are recognized as /dev/sdx. The system always recognize the USB as /deb/sda and the firewire as /dev/sdb.
But I want that always the firewire external disk be recognized as /dev/sda and the USB always be recognized as /dev/sdb.
How can I do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 06:48 PM
08-02-2006 06:48 PM
Re: order of externad hard drive devices
You may not be able to do this.
Disconnect both devices.
rmsf all the device drivers for the devices in /dev
connect the one you wish to be a and boot the system.
Then connect the one you want to be b and boot.
Still though, I can think of better ways to allocate my time than this. Do you really need to do this?
Have fun.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 08:57 PM
08-02-2006 08:57 PM
Re: order of externad hard drive devices
To change the device names from the default ones, you must write custom "udev rules" for your device. The rules will go to /etc/udev/rules.d.
You can use the "udevinfo" tool to find what information is available for the udev system:
first run e.g. "udevinfo -q path -n /dev/sda" to get the sysfs path to your device, then run "udevinfo -a -p
Looks like udev is a standard part of a RedHat ES/AS 4 installation, so you don't need to install anything.
"man udev" and the files in /usr/share/doc/udev* directory on your system will tell you more, although it looks like /usr/share/doc/udev* is not very well organized: it is a collection of installation documents from udev source packages, some other non-RedHat-specific documentation and some files apparently written by RedHat people.
http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
should be a good introduction to udev.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 01:37 AM
08-03-2006 01:37 AM
Re: order of externad hard drive devices
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 02:29 AM
08-03-2006 02:29 AM
Re: order of externad hard drive devices
This is a very important issue for me. This server is in a site which is phisically several blocks away from my office. This is a test environment system and I reboot it several times a day, so that to walk several blocks to get the site and disconnect and connect the devices is an important problem. I have been done it in this way but is a very big problem about time lost.
By the way, there is nobody permanently there to do it for me. Each one who has any server in that site, take care of his servers by himeself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 03:13 AM
08-03-2006 03:13 AM
Re: order of externad hard drive devices
Have fun,
UVR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 05:30 AM
08-03-2006 05:30 AM
Re: order of externad hard drive devices
Is it necessary to install some RPM? do you have mor info about that command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 05:53 AM
08-03-2006 05:53 AM
Re: order of externad hard drive devices
If I may refer to the tape drive example, on each machine I've got a links called "LIBAD1" "LIBAD2" "LIBAD3", etc. This would stand for " tape library a, drive 1", "tape library a, drive 2"," tape library a, drive 3" etc. On each of the machines these symbolic links are linked to the real device names "/dev/rmt/xxxxxx" for the tape drives - which are NOT consistent from machine to machine. However, the symbolic links, when I can use them clear the whole mess up so that each machine may refer to the tape drives by name as it needs to. This works pretty well in most any Unix (above example is HPUX), and I'd recommend giving it a try.
If you don't like using symbolic links, you can make the same special device file with the "mknod" command in the /dev/ direcoty and name the new special device file to your more realistic name, and as long as it has the same major,minor number as the real one, it does the same exact job. Then feed your configuration files for your software services the new names that you came up with, and don't use the system supplied ones.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 06:49 AM
08-03-2006 06:49 AM
Re: order of externad hard drive devices
If I underestood well, nothing of your ideas satisfy my need.
A link points to a specific device (/dev/sda) form example, but if the device which takes the name (/dev/sda) change, the link points to a different device and it does not found what it is looking for.
I created a device with the same characteristics (with special name) that the device I want to reach (mknod /dev/my_device b 8 1), but if the device takes a diferent name, it is the same result that with the link, it points to a device that is not the device I want to reach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 06:55 AM
08-03-2006 06:55 AM
Re: order of externad hard drive devices
This is the line I have inserted into '/etc/udev/rules.d/50-udev.rules'
BUS=="usb", ID=="usb1", SYSFS{product}=="EHCI Host Controller", NAME='usb_uvr'
It supouses that I should see a device with my name '/dev/usb_uvr' but not.
=============0
This is de udev info o the device I am testing with:
[root@monitor ~]# udevinfo -a -p $(udevinfo -q path -n /dev/sdb)
udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.
looking at class device '/sys/block/sdb':
SYSFS{dev}="8:16"
SYSFS{range}="16"
SYSFS{removable}="1"
SYSFS{size}="1024000"
SYSFS{stat}=" 8 26 272 21 0 0 0 0 0 21 21"
follow the class device's "device"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-2/1-2:1.0/host1/target1:0:0/1:0:0:0':
BUS="scsi"
ID="1:0:0:0"
SYSFS{detach_state}="0"
SYSFS{device_blocked}="0"
SYSFS{max_sectors}="256"
SYSFS{model}="TS512MJF2B "
SYSFS{queue_depth}="1"
SYSFS{rev}="2.00"
SYSFS{scsi_level}="3"
SYSFS{state}="running"
SYSFS{timeout}="30"
SYSFS{type}="0"
SYSFS{vendor}="JetFlash"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-2/1-2:1.0/host1/target1:0:0':
BUS=""
ID="target1:0:0"
SYSFS{detach_state}="0"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-2/1-2:1.0/host1':
BUS=""
ID="host1"
SYSFS{detach_state}="0"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-2/1-2:1.0':
BUS="usb"
ID="1-2:1.0"
SYSFS{bAlternateSetting}=" 0"
SYSFS{bInterfaceClass}="08"
SYSFS{bInterfaceNumber}="00"
SYSFS{bInterfaceProtocol}="50"
SYSFS{bInterfaceSubClass}="06"
SYSFS{bNumEndpoints}="03"
SYSFS{detach_state}="0"
SYSFS{iInterface}="00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-2':
BUS="usb"
ID="1-2"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="200mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0200"
SYSFS{bmAttributes}="80"
SYSFS{detach_state}="0"
SYSFS{devnum}="3"
SYSFS{idProduct}="2168"
SYSFS{idVendor}="0ea0"
SYSFS{manufacturer}="USB "
SYSFS{maxchild}="0"
SYSFS{product}="Flash Disk "
SYSFS{serial}="61100741775E874B"
SYSFS{speed}="480"
SYSFS{version}=" 2.00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1':
BUS="usb"
ID="usb1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="01"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}=" 0mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0206"
SYSFS{bmAttributes}="e0"
SYSFS{detach_state}="0"
SYSFS{devnum}="1"
SYSFS{idProduct}="0000"
SYSFS{idVendor}="0000"
SYSFS{manufacturer}="Linux 2.6.9-22.EL ehci_hcd"
SYSFS{maxchild}="6"
SYSFS{product}="EHCI Host Controller"
SYSFS{serial}="0000:00:10.3"
SYSFS{speed}="480"
SYSFS{version}=" 2.00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3':
BUS="pci"
ID="0000:00:10.3"
SYSFS{class}="0x0c0320"
SYSFS{detach_state}="0"
SYSFS{device}="0x3104"
SYSFS{irq}="10"
SYSFS{subsystem_device}="0x3104"
SYSFS{subsystem_vendor}="0x1106"
SYSFS{vendor}="0x1106"
looking at the device chain at '/sys/devices/pci0000:00':
BUS=""
ID="pci0000:00"
SYSFS{detach_state}="0"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 06:57 AM
08-03-2006 06:57 AM
Re: order of externad hard drive devices
[root@monitor ~]# udevinfo -a -p $(udevinfo -q path -n /dev/sda)
udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.
looking at class device '/sys/block/sda':
SYSFS{dev}="8:0"
SYSFS{range}="16"
SYSFS{removable}="1"
SYSFS{size}="1001472"
SYSFS{stat}=" 20 583 960 74 0 0 0 0 0 74 74"
follow the class device's "device"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-1/1-1:1.0/host0/target0:0:0/0:0:0:0':
BUS="scsi"
ID="0:0:0:0"
SYSFS{detach_state}="0"
SYSFS{device_blocked}="0"
SYSFS{max_sectors}="256"
SYSFS{model}="DataTraveler 2.0"
SYSFS{queue_depth}="1"
SYSFS{rev}="1.00"
SYSFS{scsi_level}="3"
SYSFS{state}="running"
SYSFS{timeout}="30"
SYSFS{type}="0"
SYSFS{vendor}="Kingston"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-1/1-1:1.0/host0/target0:0:0':
BUS=""
ID="target0:0:0"
SYSFS{detach_state}="0"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-1/1-1:1.0/host0':
BUS=""
ID="host0"
SYSFS{detach_state}="0"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-1/1-1:1.0':
BUS="usb"
ID="1-1:1.0"
SYSFS{bAlternateSetting}=" 0"
SYSFS{bInterfaceClass}="08"
SYSFS{bInterfaceNumber}="00"
SYSFS{bInterfaceProtocol}="50"
SYSFS{bInterfaceSubClass}="06"
SYSFS{bNumEndpoints}="03"
SYSFS{detach_state}="0"
SYSFS{iInterface}="00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1/1-1':
BUS="usb"
ID="1-1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0100"
SYSFS{bmAttributes}="80"
SYSFS{detach_state}="0"
SYSFS{devnum}="2"
SYSFS{idProduct}="6533"
SYSFS{idVendor}="0930"
SYSFS{manufacturer}="Kingston"
SYSFS{maxchild}="0"
SYSFS{product}="DataTraveler 2.0"
SYSFS{speed}="480"
SYSFS{version}=" 2.00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3/usb1':
BUS="usb"
ID="usb1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="01"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}=" 0mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0206"
SYSFS{bmAttributes}="e0"
SYSFS{detach_state}="0"
SYSFS{devnum}="1"
SYSFS{idProduct}="0000"
SYSFS{idVendor}="0000"
SYSFS{manufacturer}="Linux 2.6.9-22.EL ehci_hcd"
SYSFS{maxchild}="6"
SYSFS{product}="EHCI Host Controller"
SYSFS{serial}="0000:00:10.3"
SYSFS{speed}="480"
SYSFS{version}=" 2.00"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:10.3':
BUS="pci"
ID="0000:00:10.3"
SYSFS{class}="0x0c0320"
SYSFS{detach_state}="0"
SYSFS{device}="0x3104"
SYSFS{irq}="10"
SYSFS{subsystem_device}="0x3104"
SYSFS{subsystem_vendor}="0x1106"
SYSFS{vendor}="0x1106"
looking at the device chain at '/sys/devices/pci0000:00':
BUS=""
ID="pci0000:00"
SYSFS{detach_state}="0"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 07:34 AM
08-03-2006 07:34 AM
Re: order of externad hard drive devices
KERNEL=="sda", NAME="usb_uvr"
It is a very simple rule tha should not fail, but it fails.
Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2006 06:27 PM
08-03-2006 06:27 PM
Re: order of externad hard drive devices
# Buffalo Clipdrive
BUS="scsi", KERNEL="sd*", SYSFS{vendor}="BUFFALO ", SYSFS{model}="ClipDrive ", NAME="stick%n", MODE="0640", GROUP="hal", SYMLINK="%k"
This causes the actual device name be /dev/stick, with partitions as /dev/stick1 and onwards if necessary.
Note that the vendor and the model strings may have spaces (or other whitespace-like characters) at the end. I copy-pasted the quoted strings directly from udevinfo output to be sure.
The SYMLINK is there to create symbolic links using the "default" device names. I used that while testing my rules. A simple "ls -l /dev/sda*" allows you to see whether your rule was correct or not.