From: Michel L. <wa...@zo...> - 2007-06-03 00:41:49
|
Hi, I'm running smartmontools on a small homebuilt NAS server with several SATA hot-swap bays. The server is running debian etch, which includes smartmontools version 5.36. Does anyone know of a convenient way to support hot-swap configurations ? Here is what I tried so far: * Using DEVICESCAN kinda works, if I add "-d ata". However in this configuration, smartd will not start if I add any USB-key drives, which are recognised as scsi under linux but do not have smart support. * I can list my drives in smartd.conf, but then the issue is to keep this file up to date. If I forget to add new drives they won't be monitored, and smartd will not start if the config file includes drives that are not present in the server. I think it would be ideal if drives could be listed by regexp in smartd.conf, such as /dev/disk/by-path/pci-0000:00:1f.2-scsi-[0-9:]* for example, followed by whatever parameters one wants to assign to these drives. Even better would be if the resolution of that regexp into actual drive names was done at regular intervals in smartd (whenever it wants to look at drive attributes), rather than just once at smartd init time. Or is there a better way to support hotswap configurations ??? Thanks for any advice, -- Michel "Walken" Lespinasse "Bill Gates is a monocle and a Persian cat away from being the villain in a James Bond movie." -- Dennis Miller |
From: Jim P. <ji...@jt...> - 2007-06-03 01:30:37
|
> I'm running smartmontools on a small homebuilt NAS server with > several SATA hot-swap bays. The server is running debian etch, > which includes smartmontools version 5.36. > > Does anyone know of a convenient way to support hot-swap configurations ? > Here is what I tried so far: .. > * I can list my drives in smartd.conf, but then the issue is to keep this > file up to date. If I forget to add new drives they won't be monitored, > and smartd will not start if the config file includes drives that are > not present in the server. That's what I do, but there's nothing to update. List each possible disk in smartd.conf. For example, from my system: /dev/sata/e1b1 -d ata -d removable -a -o on -S on -s (S/../.././00|L/../../1/01) /dev/sata/e1b2 -d ata -d removable -a -o on -S on -s (S/../.././04|L/../../2/05) /dev/sata/e1b3 -d ata -d removable -a -o on -S on -s (S/../.././08|L/../../3/09) /dev/sata/e1b4 -d ata -d removable -a -o on -S on -s (S/../.././12|L/../../4/13) /dev/sata/e1b5 -d ata -d removable -a -o on -S on -s (S/../.././16|L/../../5/17) /dev/sata/e1b6 -d ata -d removable -a -o on -S on -s (S/../.././20|L/../../6/21) Those paths might be something like /dev/disk/by-path for you. Disks that are not present are ignored. I also have a udev rule that reloads the configuration any time a new disk is added: ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd*[!0-9]", RUN+="/etc/init.d/smartmontools reload" -jim |
From: Michel L. <wa...@zo...> - 2007-06-04 01:39:50
|
On Sat, Jun 02, 2007 at 09:30:29PM -0400, Jim Paris wrote: > That's what I do, but there's nothing to update. List each possible > disk in smartd.conf. For example, from my system: > > /dev/sata/e1b1 -d ata -d removable -a -o on -S on -s (S/../.././00|L/../../1/01) Nice, this does solve my problem. Thanks for the tip ! It had not occured to me that one might use more than one -d option like this :) -- Michel "Walken" Lespinasse "Bill Gates is a monocle and a Persian cat away from being the villain in a James Bond movie." -- Dennis Miller |