Re: Replacing a (or two?) failed drive(s) in RAID-1 btrfs filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brendan Hide <brendan@xxxxxxxxxxxxxxxxx> schrieb:

> I have the following two lines in
> /etc/udev/rules.d/61-persistent-storage.rules for two old 250GB
> spindles. It sets the timeout to 120 seconds because these two disks
> don't support SCT ERC. This may very well apply without modification to
> other distros - but this is only tested in Arch:
> ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
> ENV{ID_SERIAL}="ST3250410AS_6RYF5NP7" RUN+="/bin/sh -c 'echo 120 >
> /sys$devpath/device/timeout'"
> ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
> ENV{ID_SERIAL}="ST3250820AS_9QE2CQWC" RUN+="/bin/sh -c 'echo 120 >
> /sys$devpath/device/timeout'"

Wouldn't it be easier and more efficient to use this:

ACTION=="add|change", KERNEL=="sd[a-z]", ENV{ID_SERIAL}=="...", 
ATTR{device/timeout}="120"

Otherwise you always spawn a shell and additional file descriptors, and you 
could spare a variable interpolation. Tho it probably depends on your udev 
version...

I'm using this and it works setting the attributes (set deadline on SSD):

ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", 
ATTR{queue/scheduler}="deadline"

And, I think you missed the double-equal "==" behind ENV{}... Right? 
Otherwise you just assign a value. Tho, you could probably match on 
ATTR{devices/model} instead to be more generic (the serial is probably too 
specific). You can get those from the /sys/block/sd* subtree.

-- 
Replies to list only preferred.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux