-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2015/02/09 10:30 PM, Kai Krakow wrote: > Brendan Hide <bren...@swiftspirit.co.za> schrieb: > >> I have the following two lines in >> /etc/udev/rules.d/61-persistent-storage.rules for two old 250GB [snip] > 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. >
It is certainly possible that it isn't 100% the right way - but it has been working. Your suggestions certainly sound more efficient/canonical. I was following what I found online until it "worked". :) I'll make the appropriate adjustments and test. Thanks! - -- __________ Brendan Hide http://swiftspirit.co.za/ http://www.webafrica.co.za/?AFF1E97 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQEcBAEBAgAGBQJU2YknAAoJEE+uni74c4qNopMH/34nj5wEi3m25jk/vEUud3hh bbK4/mh564VnMc1NnpYXe++gUUTf0+203JDERgCQ1k3XjFMUe3VDPQBSdCIxcuOV H7BtFWcuUYvaTd/3kHTcB2mp097RUQs25Jhcmf8y/+YZdnglnpSrRYtIIMM8osil Y70IzoSRLuVHYlZT5VPmH7r7P9CeW5VnEG0jb3DkDe+tLH2Ed1Wy/Ti5myX0BF2l 7vJ1gTnPMmIUu/MKmNka6/hSWKGV7G2MeFoOy9UB2HhWsdGCjpJ1z8ToRQLcZbWX yCpSjw2GDCtdG91iKiWK+kAJOreKqWGA3GSdgKqZhAQVg6LFeml1qLrBZ7H9H1o= =TtpU -----END PGP SIGNATURE----- -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html