Re: Fixed (hardisk) device names?
Craig Sanders wrote:
On Wed, Mar 31, 2004 at 07:54:19AM +0200, Arnd Vehling wrote:
does anyone know how to fix the device name on a debian linux
system? For example. If i have two IDE hardisks, the devices will
be named like this.
If i now must remove the first harddisk (/dev/hda) the second (/dev/hdb)
will be renamed to (/dev/hda) after the reboot. As i want /dev/hdb to be
a mirror of /dev/hda and used as failover disk _without_ opening the
case and tampering with the IDE bus setup, i want linux to keep the name
/dev/hdb for the drive no matter what happens.
that's EXACTLY what linux does for IDE drives. the slave drive on the primary
IDE controller will *always* be /dev/hdb, regardless of whether there is a
master drive or not.
/dev/hda - master drive on primary IDE controller
/dev/hdb - slave drive on primary IDE controller
/dev/hdc - master drive on secondary IDE controller
/dev/hdd - slave drive on secondary IDE controller
Is this possible?
Another question. How can i copy two identical discs _including_ the boot
block? "dd if=/dev/hda of=/dev/hdb" doesnt do it
don't use dd for that. set up a raid-1 mirror instead. it's easy to do, only
about 5 minutes work.
also, for performance and safety, put your second drive on a separate IDE
controller. that way it will still work even if one IDE controller fails.
e.g. have /dev/hda (primary IDE master) and /dev/hdc (secondary IDE master)
rather than /dev/hda & /dev/hdb.
and there are no raw devices on linux AFAIK.
/dev/hd? ARE the raw devices.
In the bsdish slang, raw devices are character devices, so /dev/hd?
are not exactly raw devices, but block devices.
There's support for accessing harddisks as character devices, see: