Hi Scott, Scott Ragen wrote: > Hi Guys, > I recently upgraded our server to Sid & the latest .deb kernel, and I have > a problem that I'm not sure of the best way to tackle. > We have 3 scsi disks in a software raid, and an external usb drive. Since > the upgrade of the kernel, the USB drive has become sda, with the scsi > drives being sdb,c and d.
What was the old device name of the USB drive? (I'll assume /dev/sdd) Do you have only the one md device? (I'll assume /dev/md0) What level of raid do you have? (I'll assume raid 5 seeing you have so many devices) > Its less then ideal to use sda as a usb drive for obvious reasons, and I > am wondering what is the best way to fix this? > You'll need to remove the usbdisk from the array and re-add it as another device. You can assign the device name through the use of udev rules. For an Ubuntu/Debian scenario regarding udev and usb drives see http://www.debian-administration.org/articles/126 udevinfo -a -p /sys/block/sdb/sdd Will list the attributes for the drive here's my usbdisk udev rules /etc/udev/rules.d/95-usbdisk.rules ATTR{size}=="586072368", ATTRS{model}=="00JB-00KFA0 ", ATTRS{vendor}=="WDC WD30", NAME{all_partitions}="usbdisk" This isn't a very unique set of attributes, if you can find a serial number that would be better. Fail the usbdisk and remove it from the array. This is a bit tricky as from my experience mdadm will still require the failed device to exist in /dev/ for it to be removed and you will still want /dev/sda to exist as one of the SCSI drives in the array. Try shutting down the machine, remove the usb drive, power up the machine, reattach the usb drive and it should come up as /dev/sdd (if not, set it to appear with udev rules), will probably start resync-ing into the array. (off top of head, be sure to double check) mdadm --manage /dev/md0 --fail /dev/sdd mdadm --manage /dev/md0 --remove /dev/sdd set up the udev rules for the usb drive and then add the /dev/usbdisk partition into the array mdadm --manage /dev/md0 --add /dev/usbdisk it should then start doing it's resync watch it resync watch -n1 cat /proc/mdstat Reboot and test and test and test and TEST! and then reboot again to make sure it comes up okay :) I'm still a newbie with linux software raid so I may have missed some points, may need to set the superblock to 0 on the usbdisk before adding it back into the array. > Thanks, > > Scott > No worries, -- Steve ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
