From: Gregory Seidman <gsslist+linuxraid@anthropohedron.net>
To: linux-raid@vger.kernel.org
Subject: Re: hard drives with "variable" device names - mdadm raid assembly options setup
Date: Sat, 31 Dec 2005 08:09:45 -0500 [thread overview]
Message-ID: <20051231130945.GA10745@anthropohedron.net> (raw)
In-Reply-To: <87d5jep027.fsf@rimspace.net>
On Sat, Dec 31, 2005 at 11:44:32AM +1100, Daniel Pittman wrote:
} Mitchell Laks <mlaks@verizon.net> writes:
}
} G'day Mitchell.
}
} > I notice on my system that the hard drives "device names" can change.
} >
} > The hard drives are connected to the motherboard SATA connectors or to
} > PCI SATA cards. They get different "names" /dev/sda or /dev/sdc
} > depending how many of the cards are "active".
} >
} > For instance the hard drives on the motherboard itself are called
} > /dev/sde and /dev/sdf if there are hard drives on the 2 PCI cards and
} > are called /dev/sda and /dev/sdb if there are none.
}
} Well, one solution is udev, but since you prefer to avoid that...
[...]
I have an 8-tray SCSI hotswap rack, and I had a similar problem. I use
scsidev, from the scsitools package (under Debian, at least), to create
appropriately named block devices at boot before mdadm starts any md
devices. My /etc/scsi.alias:
id=0, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack0
id=1, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack1
id=2, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack2
id=3, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack3
id=8, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack4
id=9, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack5
id=10, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack6
id=11, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack7
Now, this is just matching by SCSI id (and SCSI host) since I don't want to
have to reconfigure on hotswap and the tray position controls the SCSI id,
but it can match by any combination of manufacturer, serial_number, model,
rev, wwid, lun, chan, hostname, hostid, and hostnum. Running scsidev -f
will create block devices in /dev/scsi; I have /dev/scsi/rack[0-7]. Then my
/etc/mdadm/mdadm.conf looks like this:
DEVICE /dev/scsi/rack[01234567]
ARRAY /dev/md0 devices=/dev/scsi/rack0,/dev/scsi/rack1,/dev/scsi/rack2,/dev/scsi/rack3,/dev/scsi/rack4,/dev/scsi/rack5,/dev/scsi/rack6,/dev/scsi/rack7
Very simple, very easy. The scsitools package includes scsiinfo, which
should work on SATA (or ieee1394, or USB) drives to retrieve serial
numbers.
} Regards,
} Daniel
--Greg
prev parent reply other threads:[~2005-12-31 13:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 14:08 hard drives with "variable" device names - mdadm raid assembly options setup Mitchell Laks
2005-12-31 0:44 ` Daniel Pittman
2005-12-31 4:40 ` Max Waterman
2006-01-01 11:12 ` Daniel Pittman
2006-01-27 11:39 ` Matthias Urlichs
2005-12-31 12:01 ` Luca Berra
2005-12-31 13:09 ` Gregory Seidman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051231130945.GA10745@anthropohedron.net \
--to=gsslist+linuxraid@anthropohedron.net \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).