On Wednesday 12 December 2007, Les Mikesell wrote: > I'm starting to build a box that will have an assortment of scsi and > sata disks, most, but not all paired in md raid1 devices and expect to > have a few hotplug sata and external USB and firewire drives that will > be connected periodically. Do you have any hints on how to write a > script that will copy things to the recently-mounted drive(s) and how to > avoid boot problems if any of them happen to be connected during a > reboot? Will the md devices always find/pair themselves regardless of > the underlying partition device names? MD devices will find their mates by UUID. Drive order matters not to MD. Let me show you an example from a large Linux machine I have here: [root@spacely ~]# cat /proc/mdstat Personalities : [raid1] [raid5] md1 : active raid5 sdq1[3] sdh1[4] sdg1[2] sdc1[1] sdb1[0] 71765760 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU] md2 : active raid5 sdu1[5](S) sds1[6](S) sdp1[7](S) sdo1[4] sdk1[3] sdi1[2] sdf1[1] sde1[0] 142249728 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU] md0 : active raid1 sdn1[2](S) sdm1[1] sdl1[0] 8843200 blocks [2/2] [UU] unused devices: <none> [root@spacely ~]# The only place where drive order matters is where /boot lives, and that's set, for PC hardware, in the GRUB configuration. Oh, in case your wondering what sort of hardware this is, here's the contents of /proc/scsi/scsi: the clues you need to find out what kind of system this is are in there. :-) [root@spacely ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 01 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 02 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 03 Lun: 00 Vendor: SEAGATE Model: ST39103LCSUN9.0G Rev: 034A Type: Direct-Access ANSI SCSI revision: 02 Host: scsi0 Channel: 00 Id: 04 Lun: 00 Vendor: SEAGATE Model: ST336607LC Rev: DS09 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 05 Lun: 00 Vendor: SEAGATE Model: ST336607LC Rev: DS09 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 14 Lun: 00 Vendor: SYMBIOS Model: D1000 Rev: 2 Type: Processor ANSI SCSI revision: 02 Host: scsi1 Channel: 00 Id: 08 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi1 Channel: 00 Id: 09 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi1 Channel: 00 Id: 10 Lun: 00 Vendor: SEAGATE Model: ST336607LC Rev: 0007 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi1 Channel: 00 Id: 12 Lun: 00 Vendor: SEAGATE Model: ST39103LCSUN9.0G Rev: 034A Type: Direct-Access ANSI SCSI revision: 02 Host: scsi1 Channel: 00 Id: 13 Lun: 00 Vendor: SEAGATE Model: ST336607LC Rev: DS09 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi1 Channel: 00 Id: 15 Lun: 00 Vendor: SYMBIOS Model: D1000 Rev: 2 Type: Processor ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 01 Lun: 00 Vendor: SEAGATE Model: ST39103LCSUN9.0G Rev: 034A Type: Direct-Access ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 02 Lun: 00 Vendor: SEAGATE Model: ST39103LCSUN9.0G Rev: 034A Type: Direct-Access ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 03 Lun: 00 Vendor: SEAGATE Model: ST39103LCSUN9.0G Rev: 034A Type: Direct-Access ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 04 Lun: 00 Vendor: COMPAQ Model: BD036659CC Rev: 3B00 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 05 Lun: 00 Vendor: SEAGATE Model: ST336605LSUN36G Rev: 0238 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 08 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 09 Lun: 00 Vendor: FUJITSU Model: MAJ3182M SUN18G Rev: 0804 Type: Direct-Access ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 10 Lun: 00 Vendor: SEAGATE Model: ST336605LSUN36G Rev: 0238 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 11 Lun: 00 Vendor: SEAGATE Model: ST318436LC Rev: 0004 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 13 Lun: 00 Vendor: SEAGATE Model: ST336607LC Rev: DS09 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi2 Channel: 00 Id: 14 Lun: 00 Vendor: SYMBIOS Model: D1000 Rev: 2 Type: Processor ANSI SCSI revision: 02 Host: scsi2 Channel: 00 Id: 15 Lun: 00 Vendor: SYMBIOS Model: D1000 Rev: 2 Type: Processor ANSI SCSI revision: 02 Host: scsi3 Channel: 00 Id: 05 Lun: 00 Vendor: HP Model: C1537A Rev: L706 Type: Sequential-Access ANSI SCSI revision: 02 Host: scsi3 Channel: 00 Id: 06 Lun: 00 Vendor: TOSHIBA Model: XM6201TASUN32XCD Rev: 1103 Type: CD-ROM ANSI SCSI revision: 02 [root@spacely ~]# I have had more problems with drive order on PC hardware than I have had on spacely. -- Lamar Owen Chief Information Officer Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 (828)862-5554 www.pari.edu