Patrick31698
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Hallo,
ich kämpfe damit, eine udev Regel anzulegen, mit der ich eine USB Festplatte schlafen legen kann. Ich weiß nicht wo es hakt. Möglicherweise irgendwo bei den ATTRS Parametern, denn ich steige leider nicht so wirklich durch den Wiki Eintrag durch. 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 | patrick@patrick:~$ udevadm info --query=all --attribute-walk --name=/dev/sdb
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0/host11/target11:0:0/11:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{ro}=="0"
ATTR{size}=="312581808"
ATTR{stat}==" 261 248 2080 2124 0 0 0 0 0 2100 2124"
ATTR{range}=="16"
ATTR{discard_alignment}=="0"
ATTR{events}==""
ATTR{ext_range}=="256"
ATTR{events_poll_msecs}=="-1"
ATTR{alignment_offset}=="0"
ATTR{inflight}==" 0 0"
ATTR{removable}=="0"
ATTR{capability}=="50"
ATTR{events_async}==""
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0/host11/target11:0:0/11:0:0:0':
KERNELS=="11:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{rev}==" "
ATTRS{type}=="0"
ATTRS{scsi_level}=="3"
ATTRS{model}=="HM160HI "
ATTRS{state}=="running"
ATTRS{queue_type}=="none"
ATTRS{iodone_cnt}=="0x12e"
ATTRS{iorequest_cnt}=="0x12e"
ATTRS{device_busy}=="0"
ATTRS{evt_capacity_change_reported}=="0"
ATTRS{timeout}=="30"
ATTRS{evt_media_change}=="0"
ATTRS{max_sectors}=="240"
ATTRS{ioerr_cnt}=="0x7"
ATTRS{queue_depth}=="1"
ATTRS{vendor}=="SAMSUNG "
ATTRS{evt_soft_threshold_reached}=="0"
ATTRS{device_blocked}=="0"
ATTRS{evt_mode_parameter_change_reported}=="0"
ATTRS{evt_lun_change_reported}=="0"
ATTRS{evt_inquiry_change_reported}=="0"
ATTRS{iocounterbits}=="32"
ATTRS{eh_timeout}=="10"
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0/host11/target11:0:0':
KERNELS=="target11:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0/host11':
KERNELS=="host11"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0':
KERNELS=="2-5:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{bNumEndpoints}=="02"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
ATTRS{interface}=="MSC Bulk-Only Transfer"
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-5':
KERNELS=="2-5"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="5"
ATTRS{idVendor}=="152d"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="2"
ATTRS{devnum}=="10"
ATTRS{configuration}=="USB Mass Storage"
ATTRS{bMaxPower}=="2mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0100"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="1090706412FF"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="942"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="JMicron"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="2329"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="USB to ATA/ATAPI bridge"
looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="2"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="6"
ATTRS{bcdDevice}=="0313"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:13.2"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="181"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.13.0-46-generic ehci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0002"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="EHCI Host Controller"
looking at parent device '/devices/pci0000:00/0000:00:13.2':
KERNELS=="0000:00:13.2"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{irq}=="11"
ATTRS{subsystem_vendor}=="0x1462"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0320"
ATTRS{companion}==""
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001"
ATTRS{device}=="0x4396"
ATTRS{uframe_periodic_max}=="100"
ATTRS{enable}=="1"
ATTRS{msi_bus}==""
ATTRS{local_cpulist}=="0"
ATTRS{vendor}=="0x1002"
ATTRS{subsystem_device}=="0x7552"
ATTRS{numa_node}=="0"
ATTRS{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
|
| /dev/sda1: UUID="a6c2c2ec-315c-46b1-8e44-c491a4a9a1c0" TYPE="ext3"
/dev/sda2: UUID="05a22134-1fcd-4ae6-b230-fd3e7a342ab6" TYPE="swap"
/dev/sda3: UUID="b073123f-538d-4385-9b7f-5c603a1dccc2" TYPE="ext3"
/dev/sdb1: LABEL="150GB USB" UUID="15aa7d1c-6b98-4f39-b778-8d8d2c9dc820" TYPE="ext4"
/dev/sdb5: UUID="eda6c3ad-87e8-4617-8642-e38490d68c26" TYPE="swap"
|
| cat /etc/udev/rules.d/hddsleep.rules
SUBSYSTEMS=="scsi", KERNEL=="sd?", ATTRS{vendor}=="SAMSUNG ", RUN+="/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820"
|
Einzeln funktioniert der hdparm Befehl....
sudo /sbin/hdparm -C /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820
/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820:
drive state is: active/idle
patrick@patrick:~$ sudo /sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820
/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820:
setting standby to 60 (5 minutes)
patrick@patrick:~$ sudo hdparm -C /dev/sdb
/dev/sdb:
drive state is: standby
Vielen Dank schon mal (?)
Gruß
Patrick hat sich erledigt, geht doch...................
|
Taomon
Supporter
Anmeldungsdatum: 30. Januar 2011
Beiträge: 8430
Wohnort: Digiworld
|
Nicht sicher bin
SUBSYSTEM=="block", KERNEL=="sd[a-z]*", ATTRS{vendor}=="SAMSUNG ", RUN+="/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820"
Gib im Terminal sudo udevd --debug ein und laß den Prozeß laufen. Danach die Platte einstecken. So sehen wir gleich wo es klemmt. Gruß Taomon
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
AAAAH jetzt geht es doch nicht! Also udevd --debug aufgerufen und Platte angestöpselt und dann gemountet (über den Aufruf der Platte mit Dolphin) unter /media 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582 | patrick@patrick:~$ sudo udevd --debug
[sudo] password for patrick:
mknod '/dev/cuse' c10:203
mknod '/dev/autofs' c10:235
mknod '/dev/btrfs-control' c10:234
mknod '/dev/vhci' c10:137
mknod '/dev/uhid' c10:239
mknod '/dev/vhost-net' c10:238
mknod '/dev/snd/timer' c116:33
mknod '/dev/snd/seq' c116:1
device 0x1540870 has devpath '/devices/virtual/block/loop4'
restoring old watch on '/dev/loop4'
adding watch on '/dev/loop4'
device 0x1540870 has devpath '/devices/virtual/block/ram12'
restoring old watch on '/dev/ram12'
adding watch on '/dev/ram12'
device 0x1540870 has devpath '/devices/virtual/block/ram15'
restoring old watch on '/dev/ram15'
adding watch on '/dev/ram15'
device 0x1540870 has devpath '/devices/virtual/block/ram2'
restoring old watch on '/dev/ram2'
adding watch on '/dev/ram2'
device 0x1540870 has devpath '/devices/virtual/block/ram3'
restoring old watch on '/dev/ram3'
adding watch on '/dev/ram3'
device 0x1540870 has devpath '/devices/virtual/block/ram4'
restoring old watch on '/dev/ram4'
adding watch on '/dev/ram4'
device 0x1540870 has devpath '/devices/virtual/block/ram5'
restoring old watch on '/dev/ram5'
adding watch on '/dev/ram5'
device 0x1540870 has devpath '/devices/virtual/block/ram6'
restoring old watch on '/dev/ram6'
adding watch on '/dev/ram6'
device 0x1540870 has devpath '/devices/virtual/block/ram7'
restoring old watch on '/dev/ram7'
adding watch on '/dev/ram7'
device 0x1540870 has devpath '/devices/virtual/block/ram8'
restoring old watch on '/dev/ram8'
adding watch on '/dev/ram8'
device 0x1540870 has devpath '/devices/virtual/block/ram9'
restoring old watch on '/dev/ram9'
adding watch on '/dev/ram9'
device 0x1540870 has devpath '/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sda'
restoring old watch on '/dev/sda'
adding watch on '/dev/sda'
device 0x1540870 has devpath '/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sda/sda1'
restoring old watch on '/dev/sda1'
adding watch on '/dev/sda1'
device 0x1540870 has devpath '/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sda/sda2'
restoring old watch on '/dev/sda2'
adding watch on '/dev/sda2'
device 0x1540870 has devpath '/devices/pci0000:00/0000:00:11.0/ata4/host3/target3:0:0/3:0:0:0/block/sda/sda3'
restoring old watch on '/dev/sda3'
adding watch on '/dev/sda3'
=== trie on-disk ===
tool version: 204
file size: 5773073 bytes
header size 80 bytes
strings 1271633 bytes
nodes 4501360 bytes
load module index
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-gnupg2.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/40-inputattach.rules
read rules file: /lib/udev/rules.d/40-iscan.rules
read rules file: /lib/udev/rules.d/40-libgphoto2-6.rules
GOTO 'libgphoto2_usb_end' has no matching label in: '/lib/udev/rules.d/40-libgphoto2-6.rules'
read rules file: /lib/udev/rules.d/40-libsane.rules
read rules file: /lib/udev/rules.d/40-usb-media-players.rules
read rules file: /lib/udev/rules.d/40-usb_modeswitch.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-hpmud.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-pcmcia.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /etc/udev/rules.d/60-ssd-scheduler.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/64-xorg-xkb.rules
read rules file: /lib/udev/rules.d/66-xorg-synaptics-quirks.rules
read rules file: /lib/udev/rules.d/69-cd-sensors.rules
IMPORT found builtin 'usb_id --export %p', replacing /lib/udev/rules.d/69-cd-sensors.rules:89
read rules file: /lib/udev/rules.d/69-libmtp.rules
read rules file: /lib/udev/rules.d/69-xorg-vmmouse.rules
read rules file: /lib/udev/rules.d/69-xserver-xorg-input-wacom.rules
read rules file: /etc/udev/rules.d/70-persistent-net.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /lib/udev/rules.d/70-printers.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/77-mm-ericsson-mbm.rules
read rules file: /lib/udev/rules.d/77-mm-huawei-net-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-longcheer-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-nokia-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-platform-serial-whitelist.rules
read rules file: /lib/udev/rules.d/77-mm-qdl-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-simtech-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-usb-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-usb-serial-adapters-greylist.rules
read rules file: /lib/udev/rules.d/77-mm-x22x-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-zte-port-types.rules
read rules file: /lib/udev/rules.d/77-nm-olpc-mesh.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/80-mm-candidate.rules
read rules file: /lib/udev/rules.d/80-udisks2.rules
read rules file: /lib/udev/rules.d/85-brltty.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-hplj10xx.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-lirc.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/85-usbmuxd.rules
read rules file: /lib/udev/rules.d/90-alsa-restore.rules
read rules file: /lib/udev/rules.d/90-alsa-ucm.rules
read rules file: /lib/udev/rules.d/90-libgpod.rules
read rules file: /lib/udev/rules.d/90-pulseaudio.rules
read rules file: /lib/udev/rules.d/95-cd-devices.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-dell.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-gateway.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-ibm.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
read rules file: /lib/udev/rules.d/95-upower-csr.rules
read rules file: /lib/udev/rules.d/95-upower-hid.rules
read rules file: /lib/udev/rules.d/95-upower-wup.rules
read rules file: /lib/udev/rules.d/97-bluetooth-hid2hci.rules
read rules file: /etc/udev/rules.d/hddsleep.rules
rules contain 196608 bytes tokens (16384 * 12 bytes), 34870 bytes strings
20123 strings (175061 bytes), 16913 de-duplicated (143402 bytes), 3211 trie nodes used
set children_max to 10
validate module index
seq 2218 queued, 'add' 'usb'
seq 2218 forked new worker [22815]
seq 2218 running
no db file to read /run/udev/data/c189:138: No such file or directory
device 0x1548460 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x1548460 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x1548630 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x1582e00 has devpath '/devices/pci0000:00'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
seq 2219 queued, 'add' 'usb'
seq 2220 queued, 'add' 'scsi'
seq 2221 queued, 'add' 'scsi_host'
IMPORT builtin skip 'usb_id' /lib/udev/rules.d/50-udev-default.rules:9
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:9
MODE 0664 /lib/udev/rules.d/50-udev-default.rules:36
PROGRAM 'mtp-probe /sys/devices/pci0000:00/0000:00:13.2/usb2/2-3 2 11' /lib/udev/rules.d/69-libmtp.rules:1261
starting 'mtp-probe /sys/devices/pci0000:00/0000:00:13.2/usb2/2-3 2 11'
'mtp-probe /sys/devices/pci0000:00/0000:00:13.2/usb2/2-3 2 11'(out) '0'
'mtp-probe /sys/devices/pci0000:00/0000:00:13.2/usb2/2-3 2 11' [22826] exit with return code 0
device 0x1548460 filled with db file data
handling device node '/dev/bus/usb/002/011', devnum=c189:138, mode=0664, uid=0, gid=0
preserve permissions /dev/bus/usb/002/011, 020664, uid=0, gid=0
preserve already existing symlink '/dev/char/189:138' to '../bus/usb/002/011'
created db file '/run/udev/data/c189:138' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2218 processed with 0seq 2218 done with 0
passed 305 bytes to netlink monitor 0x15383a0
seq 2219 running
device 0x157e0b0 filled with db file data
device 0x15385f0 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x15385f0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x154b690 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x1545d20 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x156b880 has devpath '/devices/pci0000:00'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
unable to access usb_interface device of '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
IMPORT builtin 'usb_id' returned non-zero
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:11
device 0x15385f0 filled with db file data
RUN 'kmod load $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:5
created db file '/run/udev/data/+usb:2-3:1.0' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
execute 'load' 'usb:v152Dp2329d0100dc00dsc00dp00ic08isc06ip50in00'
inserted 'usb_storage'
inserted 'usb_storage'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2219 done with 0
passed 200 bytes to netlink monitor 0x15383a0
seq 2219 processed with 0
seq 2220 running
device 0x154c0a0 filled with db file data
device 0x15817e0 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x156b880 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x15817e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x1573700 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x1547770 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x1538ef0 has devpath '/devices/pci0000:00'
unable to find parent 'scsi' device of '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x156b880 filled with db file data
created db file '/run/udev/data/+scsi:host10' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2220 done with 0
passed 204 bytes to netlink monitor 0x15383a0
seq 2220 processed with 0
seq 2221 running
device 0x1538ef0 filled with db file data
device 0x156b880 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x156b880 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x157e0b0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x157e680 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x155b870 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x157e390 has devpath '/devices/pci0000:00'
unable to find parent 'scsi' device of '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/scsi_host/host10'
device 0x156b880 filled with db file data
created db file '/run/udev/data/+scsi_host:host10' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/scsi_host/host10'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2221 done with 0
seq 2221 processed with 0
seq 2222 queued, 'add' 'scsi'
passed 215 bytes to netlink monitor 0x15383a0
seq 2223 queued, 'add' 'scsi'
seq 2224 queued, 'add' 'scsi_disk'
seq 2225 queued, 'add' 'scsi_device'
seq 2222 running
no db file to read /run/udev/data/+scsi:target10:0:0: No such file or directory
device 0x155b870 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x157e680 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x157e0b0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x155b870 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x15385f0 has devpath '/devices/pci0000:00'
unable to find parent 'scsi' device of '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
device 0x157e680 filled with db file data
created db file '/run/udev/data/+scsi:target10:0:0' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
seq 2226 queued, 'add' 'scsi_generic'
seq 2227 queued, 'add' 'bsg'
seq 2228 queued, 'add' 'bdi'
passed -1 bytes to netlink monitor 0x1548eb0seq 2228 forked new worker [22838]
seq 2222 done with 0
passed 245 bytes to netlink monitor 0x15383a0
seq 2222 processed with 0
seq 2223 running
device 0x155b870 filled with db file dataseq 2228 running
device 0x154c0a0 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x157e0b0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
no db file to read /run/udev/data/+bdi:8:16: No such file or directory
device 0x157e680 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x1574730 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x156e460 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
unable to access usb_interface device of '/sys/devices/virtual/bdi/8:16'
IMPORT builtin 'usb_id' returned non-zero
device 0x156e690 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x15385f0 has devpath '/devices/pci0000:00'
unable to find parent 'scsi' device of '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:11passed -1 bytes to netlink monitor 0x154d1d0
seq 2228 done with 0
seq 2228 processed with 0
device 0x157e0b0 filled with db file data
device 0x1540890 filled with db file data
IMPORT builtin 'hwdb' returned non-zero
RUN 'kmod load $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:5
created db file '/run/udev/data/+scsi:10:0:0:0' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
execute 'load' 'scsi:t-0x00'
seq 2229 queued, 'add' 'block'
seq 2230 queued, 'add' 'block'
seq 2231 queued, 'add' 'block'
seq 2232 queued, 'add' 'block'
no module matches 'scsi:t-0x00'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2223 done with 0
passed 228 bytes to netlink monitor 0x15383a0
passed 232 bytes to netlink monitor 0x15383a0
seq 2226 forked new worker [22853]
seq 2227 forked new worker [22856]
seq 2229 forked new worker [22857]
seq 2225 running
device 0x1538ef0 filled with db file data
device 0x1561110 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x1561110 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x154d7d0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
seq 2223 processed with 0
seq 2224 running
seq 2229 runningdevice 0x154e040 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x154a720 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x154cd90 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x154b810 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'device 0x156e460 filled with db file dataseq 2227 running
device 0x154f6a0 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x154c0a0 has devpath '/devices/virtual/dmi/id'seq 2226 running
device 0x154fc20 has devpath '/devices/pci0000:00'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x1561110 filled with db file data
device 0x157e680 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
created db file '/run/udev/data/+scsi_device:10:0:0:0' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/scsi_device/10:0:0:0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
no db file to read /run/udev/data/b8:16: No such file or directory
device 0x1547aa0 filled with db file data
device 0x157e0b0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x1547aa0 filled with db file data
device 0x157e390 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x154c0a0 has devpath '/devices/virtual/dmi/id'
device 0x154a7e0 has devpath '/devices/virtual/dmi/id'
device 0x154a7e0 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
passed -1 bytes to netlink monitor 0x154d1d0value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
seq 2225 done with 0
seq 2225 processed with 0
device 0x15613e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x156b4f0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'device 0x15613e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'device 0x154ca50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x154ca50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
device 0x15582d0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x154a7e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3device 0x15582d0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6device 0x15613e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
device 0x154d3e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x154ada0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x154b390 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x154b980 has devpath '/devices/pci0000:00'
device 0x157d490 has devpath '/devices/pci0000:00/0000:00:13.2'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x156b880 has devpath '/devices/pci0000:00'/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x157e680 filled with db file data
device 0x154b070 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x154ca50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
created db file '/run/udev/data/+scsi_disk:10:0:0:0' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/scsi_disk/10:0:0:0'device 0x15582d0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:59
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x154b800 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x154a7e0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x1562290 has devpath '/devices/pci0000:00'
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
device 0x15613e0 filled with db file datapassed -1 bytes to netlink monitor 0x1548eb0device 0x154afd0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
seq 2224 done with 0
seq 2224 processed with 0
handling device node '/dev/sg2', devnum=c21:2, mode=0660, uid=0, gid=6
LINK 'disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0' /lib/udev/rules.d/60-persistent-storage.rules:43
IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:57
LINK 'disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0' /lib/udev/rules.d/60-persistent-storage.rules:58
device 0x154b590 has devpath '/devices/pci0000:00/0000:00:13.2'
preserve permissions /dev/sg2, 020660, uid=0, gid=6
device 0x154bb10 has devpath '/devices/pci0000:00'
preserve already existing symlink '/dev/char/21:2' to '../sg2'
device 0x154c0a0 filled with db file data
created db file '/run/udev/data/c21:2' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/scsi_generic/sg2'
handling device node '/dev/bsg/10:0:0:0', devnum=c252:2, mode=0600, uid=0, gid=0
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72passed -1 bytes to netlink monitor 0x1540890
seq 2226 done with 0
probe /dev/sdb raid offset=0seq 2226 processed with 0
preserve permissions /dev/bsg/10:0:0:0, 020600, uid=0, gid=0
preserve already existing symlink '/dev/char/252:2' to '../bsg/10:0:0:0'
created db file '/run/udev/data/c252:2' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/bsg/10:0:0:0'
passed -1 bytes to netlink monitor 0x1561ca0
seq 2227 done with 0
seq 2227 processed with 0
ATTR '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/queue/scheduler' writing 'cfq' /etc/udev/rules.d/60-ssd-scheduler.rules:1
device 0x15613e0 filled with db file data
RUN '/lib/udev/hdparm' /lib/udev/rules.d/85-hdparm.rules:2
RUN '/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820' /etc/udev/rules.d/hddsleep.rules:1
handling device node '/dev/sdb', devnum=b8:16, mode=0660, uid=0, gid=6
preserve permissions /dev/sdb, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:16' to '../sdb'
found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-SAMSUNG_HM160HI_1090706412FF-0:0'
creating link '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0' to '/dev/sdb'
preserve already existing symlink '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0' to '../../sdb'
found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0'
creating link '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0' to '/dev/sdb'
preserve already existing symlink '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0' to '../../sdb'
created db file '/run/udev/data/b8:16' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb'
starting '/lib/udev/hdparm'
'/lib/udev/hdparm' [22863] exit with return code 0
starting '/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820'
'/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820'(err) '/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820: No such file or directory'
'/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820' [22892] exit with return code 2
adding watch on '/dev/sdb'
created db file '/run/udev/data/b8:16' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb'
passed -1 bytes to netlink monitor 0x154a0d0
seq 2229 processed with 0seq 2229 done with 0
passed 273 bytes to netlink monitor 0x15383a0seq 2230 running
no db file to read /run/udev/data/b8:17: No such file or directory
passed 273 bytes to netlink monitor 0x15383a0seq 2231 running
no db file to read /run/udev/data/b8:18: No such file or directory
device 0x154cd90 has devpath '/devices/virtual/dmi/id'
device 0x156b4f0 has devpath '/devices/virtual/dmi/id'
passed 273 bytes to netlink monitor 0x15383a0seq 2232 running
no db file to read /run/udev/data/b8:21: No such file or directory
device 0x15613e0 has devpath '/devices/virtual/dmi/id'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x154dc60 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb'value '[dmi/id]sys_vendor' is 'MICRO-STAR INTERNATIONAL CO.,LTD'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb'
device 0x154a720 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb'
device 0x1547cf0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
device 0x154e040 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'device 0x157e390 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3device 0x154a770 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
device 0x1540890 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'device 0x1561960 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x154d7d0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0'
device 0x157e680 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x1561110 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10'
device 0x156e690 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
device 0x154c0a0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x1562080 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0'
/sys/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0: if_class 8 protocol 6
device 0x154cd90 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x156b4f0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'device 0x1558a50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-3'
device 0x157bad0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x1557f00 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'device 0x1538ef0 has devpath '/devices/pci0000:00/0000:00:13.2/usb2'
device 0x15501d0 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x15584f0 has devpath '/devices/pci0000:00/0000:00:13.2'
device 0x1550740 has devpath '/devices/pci0000:00'device 0x154b810 has devpath '/devices/pci0000:00'
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
device 0x154deb0 has devpath '/devices/pci0000:00/0000:00:13.2'GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
device 0x154dc60 filled with db file datadevice 0x157dca0 has devpath '/devices/pci0000:00'
device 0x154a720 filled with db file data
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
LINK 'disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part5' /lib/udev/rules.d/60-persistent-storage.rules:44
device 0x154c0a0 filled with db file data
LINK 'disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part2' /lib/udev/rules.d/60-persistent-storage.rules:44
LINK 'disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part2' /lib/udev/rules.d/60-persistent-storage.rules:59LINK 'disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part5' /lib/udev/rules.d/60-persistent-storage.rules:59
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72
probe /dev/sdb5 raid offset=0
probe /dev/sdb2 raid offset=0
LINK 'disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part1' /lib/udev/rules.d/60-persistent-storage.rules:44
LINK 'disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part1' /lib/udev/rules.d/60-persistent-storage.rules:59
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72
probe /dev/sdb1 raid offset=0
handling device node '/dev/sdb2', devnum=b8:18, mode=0660, uid=0, gid=6
preserve permissions /dev/sdb2, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:18' to '../sdb2'
found 'b8:18' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-SAMSUNG_HM160HI_1090706412FF-0:0-part2'
creating link '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part2' to '/dev/sdb2'
preserve already existing symlink '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part2' to '../../sdb2'
found 'b8:18' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part2'
creating link '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part2' to '/dev/sdb2'
preserve already existing symlink '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part2' to '../../sdb2'
created db file '/run/udev/data/b8:18' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb2'
adding watch on '/dev/sdb2'
created db file '/run/udev/data/b8:18' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb2'
passed -1 bytes to netlink monitor 0x154d1d0
seq 2231 done with 0
seq 2231 processed with 0
LINK 'disk/by-uuid/eda6c3ad-87e8-4617-8642-e38490d68c26' /lib/udev/rules.d/60-persistent-storage.rules:78
handling device node '/dev/sdb5', devnum=b8:21, mode=0660, uid=0, gid=6
preserve permissions /dev/sdb5, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:21' to '../sdb5'
found 'b8:21' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-SAMSUNG_HM160HI_1090706412FF-0:0-part5'
creating link '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part5' to '/dev/sdb5'
preserve already existing symlink '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part5' to '../../sdb5'
found 'b8:21' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part5'
creating link '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part5' to '/dev/sdb5'
preserve already existing symlink '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part5' to '../../sdb5'
found 'b8:21' claiming '/run/udev/links/\x2fdisk\x2fby-uuid\x2feda6c3ad-87e8-4617-8642-e38490d68c26'
creating link '/dev/disk/by-uuid/eda6c3ad-87e8-4617-8642-e38490d68c26' to '/dev/sdb5'
preserve already existing symlink '/dev/disk/by-uuid/eda6c3ad-87e8-4617-8642-e38490d68c26' to '../../sdb5'
created db file '/run/udev/data/b8:21' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb5'
adding watch on '/dev/sdb5'
created db file '/run/udev/data/b8:21' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb5'
passed -1 bytes to netlink monitor 0x1540890
seq 2232 done with 0
seq 2232 processed with 0
LINK 'disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820' /lib/udev/rules.d/60-persistent-storage.rules:78
LINK 'disk/by-label/150GB\x20USB' /lib/udev/rules.d/60-persistent-storage.rules:79
handling device node '/dev/sdb1', devnum=b8:17, mode=0660, uid=0, gid=6
preserve permissions /dev/sdb1, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:17' to '../sdb1'
found 'b8:17' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-SAMSUNG_HM160HI_1090706412FF-0:0-part1'
creating link '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part1' to '/dev/sdb1'
preserve already existing symlink '/dev/disk/by-id/usb-SAMSUNG_HM160HI_1090706412FF-0:0-part1' to '../../sdb1'
found 'b8:17' claiming '/run/udev/links/\x2fdisk\x2fby-label\x2f150GB\x5cx20USB'
creating link '/dev/disk/by-label/150GB\x20USB' to '/dev/sdb1'
preserve already existing symlink '/dev/disk/by-label/150GB\x20USB' to '../../sdb1'
found 'b8:17' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part1'
creating link '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part1' to '/dev/sdb1'
preserve already existing symlink '/dev/disk/by-path/pci-0000:00:13.2-usb-0:3:1.0-scsi-0:0:0:0-part1' to '../../sdb1'
found 'b8:17' claiming '/run/udev/links/\x2fdisk\x2fby-uuid\x2f15aa7d1c-6b98-4f39-b778-8d8d2c9dc820'
creating link '/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820' to '/dev/sdb1'
preserve already existing symlink '/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820' to '../../sdb1'
created db file '/run/udev/data/b8:17' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb1'
adding watch on '/dev/sdb1'
created db file '/run/udev/data/b8:17' for '/devices/pci0000:00/0000:00:13.2/usb2/2-3/2-3:1.0/host10/target10:0:0/10:0:0:0/block/sdb/sdb1'
passed -1 bytes to netlink monitor 0x1548eb0
seq 2230 done with 0
seq 2230 processed with 0
cleanup idle workers
validate module index
unload module index
unload module index
worker [22856] exit
worker [22856] cleaned up
worker [22857] exit
worker [22857] cleaned up
unload module index
worker [22838] exit
worker [22838] cleaned up
unload module index
unload module index
worker [22853] exit
worker [22853] cleaned up
worker [22815] exit
worker [22815] cleaned up
|
|
Taomon
Supporter
Anmeldungsdatum: 30. Januar 2011
Beiträge: 8430
Wohnort: Digiworld
|
Hi, benenne die Udev-Regel nach /etc/udev/rules.d/99-hddsleep.rules um.
Patrick31698
'/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820'(err) '/dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820: No such file or directory'
Probiere mal dies.
SUBSYSTEM=="block", KERNEL=="sd[a-z]", ATTRS{vendor}=="SAMSUNG ", RUN+="/sbin/hdparm -S 60 /dev/disk/by-uuid/15aa7d1c-6b98-4f39-b778-8d8d2c9dc820" .
Danach sudo udevadm control --reload-rules um Udev die neue Regel bekannt zumachen. Nur für alle Fälle; die Regel greift nur einmal, nämlich beim Einstöpseln der Platte. Gruß Taomon
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Ich möchte erreichen, daß die Platte immer wieder bei Nichtgebrauch abgeschaltet wird.
Dann vielleicht lieber ein Skript in Kombination mit einem cronjob?
|
Taomon
Supporter
Anmeldungsdatum: 30. Januar 2011
Beiträge: 8430
Wohnort: Digiworld
|
Folgendes funktioniert bei mir. Benenne Deine Udev-Regel um so das sie nicht mehr die Endung *.rules hat.
Patrick31698
RUN '/lib/udev/hdparm' /lib/udev/rules.d/85-hdparm.rules:2
Das habe ich vorher überlesen. Schließe die USB-Platte an und schau als was sie erkannt wird.(sd?). Danach ls -l /dev/disk/by-id/ Bei mir ergibt das ls -l /dev/disk/by-id/ | grep sdc
lrwxrwxrwx 1 root root 9 Mai 8 11:03 ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U5492 -> ../../sdc
lrwxrwxrwx 1 root root 10 Mai 8 11:03 ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U5492-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Mai 8 11:03 ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U5492-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Mai 8 11:03 ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U5492-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 10 Mai 8 11:03 ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U5492-part6 -> ../../sdc6
lrwxrwxrwx 1 root root 9 Mai 8 11:03 scsi-SICY_BOX_IB-272StU-OT -> ../../sdc
lrwxrwxrwx 1 root root 10 Mai 8 11:03 scsi-SICY_BOX_IB-272StU-OT-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Mai 8 11:03 scsi-SICY_BOX_IB-272StU-OT-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Mai 8 11:03 scsi-SICY_BOX_IB-272StU-OT-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 10 Mai 8 11:03 scsi-SICY_BOX_IB-272StU-OT-part6 -> ../../sdc6
lrwxrwxrwx 1 root root 9 Mai 8 11:03 wwn-0x50014ee056f3122a -> ../../sdc
lrwxrwxrwx 1 root root 10 Mai 8 11:03 wwn-0x50014ee056f3122a-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Mai 8 11:03 wwn-0x50014ee056f3122a-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Mai 8 11:03 wwn-0x50014ee056f3122a-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 10 Mai 8 11:03 wwn-0x50014ee056f3122a-part6 -> ../../sdc6 Das gelbmarkierte habe ich in die /etc/hdparm eingetragen.
# eigene Regel für bestimmte USB-Platte
/dev/disk/by-id/ata-WDC_WD3200BEVT-22ZCT0_WD-WXD0A89U549 {
spindown_time = 240
} Getestet unter Debian Wheezy. Sollte das nicht funktionieren bitte ls -l /dev/disk/by-id/ Gruß Taomon
|
droidenschlumpf
Anmeldungsdatum: 10. Mai 2015
Beiträge: 5
|
Patrick (und andere mit Standby resistenten HDs) ich habe diverse Festplatten intern/extern in den letzten Jahren versucht in den Standby zu schicken. Soweit ich mich an einige Samsung Festplatten erinnern kann, war hier bei manchen das Problem, daß die per hdparm eingestellte Standby Zeit nur einmal funktionierte. Nach dem Aufwecken der Festplatte musste man hdparm erneut aufrufen, was wohl nicht mit einer einfachen udev Regel zu lösen ist. Auch meine WD Red Festplatten ohne APM lassen sich nicht einfach per hdparm -S oder -B schlafenlegen (vielleicht geht es ja mit der neueren Nasware Version?). Hinzu kommen hier diverse externe Festplattengehäuse, die auch nicht mit hdparm -S oder -B funktionieren. Die Lösung fand ich in einem Script von Alexander Koch auf github https://github.com/lynix/scripts das wirklich bislang mit allen meinen Problemfestplatten geholfen hat. Das Problem an dem Originalscript ist, daß es keine per udev erzeugte Links mit den Festplattennamen erlaubt. Auch muss das Laufwerk zum Zeitpunkt des Scriptaufrufes angeschlossen sein. Ich habe das mal eben geändert und kurz angetestet. Speicher das Script z.B. als hdd-spindown.sh ab, ändere die Liste Deiner Festplatten bei DEVICES= und starte es z.B. per init.d Script mit root Rechten. Beenden kannst Du das ganze per killall hdd-spindown.sh 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 | #!/bin/bash
#
# Automatic disk standby using kernel diskstats and hdparm https://github.com/lynix/scripts
#
# Version 1.1, 2011 by Alexander Koch <lynix47@gmail.com>
# Version 1.2 2015 Allow device links instead of sda/sdb... and retry non-existing devices every 600 seconds
#
# DEVICES syntax: DEVICE:TIMEOUT_SEC
DEVICES=( "sda:120" "sdb:120" "bigwd8:120" "bigwd9:120" "bigwd6:120" )
function device_worker() {
logger -t hdd-spindown.sh "spawned monitor thread for $1"
COUNT_R=0
COUNT_W=0
while true; do
while ! test -e "/dev/$1"; do
sleep 600
COUNT_R=0
COUNT_W=0
done
devname=$(readlink "/dev/$1")
NEW_R=$(awk '{print $1}' /sys/block/$devname/stat)
NEW_W=$(awk '{print $5}' /sys/block/$devname/stat)
if [ $COUNT_R -eq $NEW_R ] && [ $COUNT_W -eq $NEW_W ]; then
if hdparm -C /dev/$1 | grep active &>/dev/null; then
logger -t hdd-spindown.sh "suspending $1"
hdparm -qy /dev/$1
if [ $? -gt 0 ]; then
logger "failed to suspend $1"
return 1
fi
fi
else
COUNT_R=$NEW_R
COUNT_W=$NEW_W
fi
sleep $2
done
}
for D in ${DEVICES[@]}; do
device_worker $(echo "$D" | cut -d ':' -f 1) $(echo "$D" | cut -d ':' -f 2) &
done
exit 0
|
Nachbearbeitet am 13.5.: In Zeile 25 war ein Fehler von mir bei Tests eingefügt worden... wieder ursprünglicher korrekter Code hergestellt. Noch etwas für einen eben aufgetauchten Problemfall: Das obige Script verlangt im wesentlichen zwei Dinge von der Festplatte. Einerseits muss z.B. hdparm -y /dev/sdb die Festplatte in Standby schicken. Andererseits muss hdparm -C /dev/sdb korrekt den Zustand der Festplatte mit active oder standby anzeigen. Letzteres ist z.B. bei einigen Gehäusen mit für hdparm unbekannten USB->SATA Adaptern problematisch. So meldet z.B. das jmicron basierte Fantec qb-35us3-6g Gehäuse unter Ubuntu 14.04 immer, daß die Festplatten in Standby sind.
In diesem Fall muss sich das Script also selbst merken, ob die Festplatte in den Standby geschickt wurde. Dazu habe ich Zeile 26 abgeändet in: | if [ $INSTDBY -eq 0 ] || [[ $(hdparm -C /dev/$1 | grep active) > 0 ]]; then
INSTDBY=1
|
und alle Zeilen die mit COUNT_W= beginnen wurden um eine Zeile mit INSTDBY=0 erweitert.
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Hallo, Entschuldigung, daß ich mich erst jetzt wieder melde.
War im Urlaub.... droidenschlumpf schrieb: ändere die Liste Deiner Festplatten bei DEVICES= und starte es z.B. per init.d Script mit root Rechten. Beenden kannst Du das ganze per killall hdd-spindown.sh
Für die Devices in die Klammer dann "sdb:120" eintragen? Dann müsstest Du mir auch noch erklären, wie ich das skript per init.d Script mit root Rechten starte. Gruß
Patrick
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Hab mal mein Glück probiert.... | sudo chmod +x hdd-spindown.sh
odroid@odroid:~$ ./hdd-spindown.sh
odroid@odroid:~$ awk: Fatal: Die Datei »/sys/block//stat« kann nicht zum Lesen geöffnet werden (Datei oder Verzeichnis nicht gefunden)
awk: Fatal: Die Datei »/sys/block//stat« kann nicht zum Lesen geöffnet werden (Datei oder Verzeichnis nicht gefunden)
./hdd-spindown.sh: Zeile 25: [: 0: Einstelliger (unärer) Operator erwartet.
|
Klappt natürlich nicht ☹
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Taomon schrieb: Folgendes funktioniert bei mir. Benenne Deine Udev-Regel um so das sie nicht mehr die Endung *.rules hat.
Patrick31698
Gruß Taomon
Komme mit Deiner Anleitung leider gar nicht klar. wieso soll ich die die Regel so umbennen, dass sie nich nicht mehr rules heisst? was bedeutet dann der Abschnitt mir run.... ?
|
Taomon
Supporter
Anmeldungsdatum: 30. Januar 2011
Beiträge: 8430
Wohnort: Digiworld
|
Patrick31698 wieso soll ich die die Regel so umbennen, dass sie nich nicht mehr rules heisst?
Damit sie nicht ausgeführt wird. was bedeutet dann der Abschnitt mir run.... ?
Damit wird während eine Udev-Regel greift ein Programm oder Skript ausgeführt.
alex@Gilmon:~$ cat /lib/udev/rules.d/85-hdparm.rules
ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/lib/udev/hdparm" Das ist die Udev-Regel die schon da ist. Gruß Taomon
|
droidenschlumpf
Anmeldungsdatum: 10. Mai 2015
Beiträge: 5
|
Sorry Patrick31698, es ist mein Fehler im Script, daß für die awk Fehlermeldung sorgt, weil readlink in Zeile 22 nicht den Devicenamen liefert, wenn man das Device angibt. Funktioniert komischerweise mit Links. Die Lösung ist einfach. Ändere Zeile 22 mit dem readlink Befehl in: | devname=$(basename $(readlink -f "/dev/$1") )
|
Ansonsten scheinst Du ja fast alles richtig gemacht zu haben, was das Erstellen und Starten der Datei angeht. Das Script sollte wie gesagt als root user laufen und daher musst Du auch hdd-spindown.sh mit sudo starten bzw. vorher root user werden mit sudo su. Ja, für /dev/sdb mußt Du "sdb:120" angeben (siehe Script unten). Desweiteren sollte beim Testen des Scripts auch klar sein, daß die Sekundangabe den Zeitintervall definiert in dem auf Aktivität geprüft wird. Wenn also mit sdb:120 alle 120 Sekunden geprüft werden soll, kann es im ungünstigsten Fall 2*120-1 Sekunden dauern, bis die Festplatte tatsächlich schlafen gelegt wird. Wenn bei Tests also die Festplatte nicht nach 120 Sekunden schlafen geht, etwas mehr warten.... Hier noch einmal das korregierte Script für sdb inkl. der erwähnten Änderungen für das jmicron basierte Fantec Gehäuse, daß nicht korrekt auf hdparm -C antwortet 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 | #!/bin/bash
#
# Automatic disk standby using kernel diskstats and hdparm https://github.com/lynix/scripts
#
# Version 1.1, 2011 by Alexander Koch <lynix47@gmail.com>
# Version 1.2 2015 Allow device links instead of sda/sdb... and retry non-existing devices every 600 seconds
#
# DEVICES syntax: DEVICE:TIMEOUT_SEC
DEVICES=( "sdb:120" )
function device_worker() {
logger -t hdd-spindown.sh "spawned monitor thread for $1"
COUNT_R=0
COUNT_W=0
INSTDBY=0
while true; do
while ! test -e "/dev/$1"; do
sleep 600
COUNT_R=0
COUNT_W=0
INSTDBY=0
done
devname=$(basename $(readlink -f "/dev/$1") )
NEW_R=$(awk '{print $1}' /sys/block/$devname/stat)
NEW_W=$(awk '{print $5}' /sys/block/$devname/stat)
if [ $COUNT_R -eq $NEW_R ] && [ $COUNT_W -eq $NEW_W ]; then
if [ $INSTDBY -eq 0 ] || [[ $(hdparm -C /dev/$1 | grep active) > 0 ]]; then
INSTDBY=1
logger -t hdd-spindown.sh "suspending $1"
hdparm -qy /dev/$1
if [ $? -gt 0 ]; then
logger "failed to suspend $1"
return 1
fi
fi
else
COUNT_R=$NEW_R
COUNT_W=$NEW_W
INSTDBY=0
fi
sleep $2
done
}
for D in ${DEVICES[@]}; do
device_worker $(echo "$D" | cut -d ':' -f 1) $(echo "$D" | cut -d ':' -f 2) &
done
exit 0
|
Sobald ich Zeit habe, liefere ich ein init.d Script in den nächsten Tagen nach. Bis dahin kannst Du das Script so starten, wie Du es schon gemacht hast. Es kann jedoch nötig sein, daß Du das Script mit nohup (aus dem coreutils Paket) oder screen starten mußt, damit es nach dem Beenden des Terminals im Hintergrund weiterläuft und nicht mit dem Terminal beendet wird: Zum Schluss vielleicht noch etwas aus jahrelanger Erfahrung mit vielen externen Platten im Standby. Vielleicht sind die Probleme mit dem aktuellen Kernel behoben. Ich befürchte aber, dass es durchaus noch auf den einen oder anderen Fall zutrifft. Der Linux Kernel hat manchmal Probleme mit Festplatten im Standby, wenn das Aufwecken zu lange dauert. Dann kann es zu Fehlermeldungen im syslog kommen oder die Platte wird read-only remounted. In einigen Fällen reicht es evtl. unter /sys allow_restart per udev auf 1 zu setzen. Aber ich habe es nie geschafft, mehrere per USB angeschlossene Festplatten zuverlässig gleichzeitig(!) aufzuwecken. Es funktioniert oft, aber halt nicht immer und dann verschwindet eine Festplatte aus dem System. Es gibt keine Probleme, wenn die USB Festplatten nacheinander aufgeweckt werden. Mit per SATA angeschlossenen internen Platten hatte zumindestens ich bislang keine Kernel Probleme.
|
droidenschlumpf
Anmeldungsdatum: 10. Mai 2015
Beiträge: 5
|
Sodele... hier ein init.d Script zum automatischen Starten von hdd-spindown.sh beim Booten: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138 | #!/bin/sh
### BEGIN INIT INFO
# Provides: hdd-spindown.sh
# Required-Start: $remote_fs $syslog $local_fs
# Required-Stop: $remote_fs $syslog $local_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the hdd-spindown daemon
# Description: This starts/stops the hdd-spindown.sh script
### END INIT INFO
# Author: Foo Bar <foobar@baz.org>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# ADJUST THIS TO YOUR SETUP
NAME=hdd-spindown.sh
DAEMON=/usr/local/bin/$NAME
DESC="This runs the $NAME daemon"
PIDFILE=/var/run/$NAME.pid
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
# pidfile, daemon already running
[ -f "$PIDFILE" ] && return 1
# Create a pidfile even if the started script only exists for a second... we only use the pidfile as flag to void running the script twice
start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
killall $NAME > /dev/null 2>&1
sleep 2
killall -9 $NAME > /dev/null 2>&1
rm -f $PIDFILE
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
if [ "`ps axf | grep $NAME | grep -v grep`" ]; then
echo "Running"
exit 0
else
echo "Not Running"
exit 3
fi
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:
|
Speichere das obige Script als /etc/init.d/hdd-spindown ab. Das init.d Script erwartet das hdd-spindown.sh Script im Verzeichnis /usr/local/bin . Falls dies nicht zutrifft, musst Du im Script die Zeile mit NAME und DAEMON entsprechend ändern. Mache das init.d Script mit chmod +x /etc/init.d/hdd-spindown ausführbar. Damit das init.d Script beim Booten automatisch ausgeführt wird, mußt Du noch
sudo update-rc.d hdd-spindown defaults aufrufen. Soll das Script beim Booten nicht mehr ausgeführt werden: sudo update-rc.d -f hdd-spindown remove Das Script ist nicht besonders schön, tut aber wohl seinen Job. Getestet mit Ubuntu 14.04... sollte aber auch mit neueren Versionen gehen....
|
Patrick31698
(Themenstarter)
Anmeldungsdatum: 6. Februar 2008
Beiträge: 676
|
Hallo,
zuerst muß ich mich entschuldigen, daß ich bis jetzt nicht geantwortet habe.
Ich habe keine Nachricht vom System über eine Antwort in dem Thread bekommen. Was soll ich sagen. Es funktioniert!! Allerdings wurde meine Festplatte dieses Mal als sda eingebunden. | odroid@odroid:~$ sudo blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="BOOT" UUID="6E35-5356" TYPE="vfat"
/dev/mmcblk0p2: LABEL="trusty" UUID="e139ce78-9841-40fe-8823-96a304a09859" TYPE="ext4"
/dev/sda1: LABEL="150GB USB" UUID="15aa7d1c-6b98-4f39-b778-8d8d2c9dc820" TYPE="ext4"
/dev/sda5: UUID="eda6c3ad-87e8-4617-8642-e38490d68c26" TYPE="swap"
|
Ich weiß jetzt nicht, ob mir das an diesem Rechner (ein Odroid U3 mit eMMC als System"Platte") Probleme machen könnte einfach sdba und sdbb in das Skript einzutragen.
Vielleicht setzte ich in das Ding noch eine SD Karte für home ein...
mit UUIDs kann das Skript nicht umgehen? Ich frage mich auch, was die swap Partition auf der USB Platte soll. Auf jeden Fall erst einmal VIELEN DANK
|
droidenschlumpf
Anmeldungsdatum: 10. Mai 2015
Beiträge: 5
|
Patrick31698: Gute Nachrichten: Eine der Änderungen von mir an dem Script war, daß Du eben jetzt auch Links angeben kannst. Die UUID Links zeigen auf Partitionen und nicht Disks und sind daher eher ungeeignet. Kommt hinzu, daß Du bei Änderungen der UUID auch das Script ändern musst. Es bietet sich hier vielmehr einer der Links unter /dev/disks/by-id an, die sich aus dem Namen/Seriennummer der Disk herleiten. Schau einfach mal mit ls -l /dev/disks/by-id nach, wie der Link heißt, der auf sda bei Dir verweist und verwende dann diesen. Vorsicht: Du musst jetzt den Namen der Disk mit disks/by-id/ davor im Script angeben. Also "disks/by-id/NameDerDisk:120" anstatt "sda:120" angeben. Ich habe ehrlich gesagt nicht ausprobiert, was passiert, wenn Du einen Link in einem Unterverzeichnis angibts passiert. Aber soweit ich das mit einem schnellen Blick auf das Script sehe, sollte es gehen. Wenn nicht, melden. Meineserachtens noch besser ist es, wenn Du mittels udev eine Regel erstellst, die Deiner Disk einen Link/Namen direkt unter /dev gibt und diesen Link gibst Du dann im Script an (so mache ich das hier). Ein eindeutiger Name/Link direkt in /dev hilft ja doch auch bei anderen Angelegenheiten. Falls Du das noch nicht gemacht hast (nur mal grob wie es geht... mehr Details hier im Forum/Internet): 1. Schau mit udevadm info -a --name /dev/sda oder udevadm test /sys/class/block/sda als root user (oder verwende sudo vor den Befehlen hier) nach Identifizierungsmerkmalen Deiner sda Disk. Hier bietet sich meistens die mit dem zweiten Befehl ausgegebene Zeile mit ID_SERIAL an. 2. Erstelle eine Regel für udev, die einen Link mit dem Namen der Disk in /dev erstellt. Erstelle dazu z.B. eine Datei /etc/udev/rules.d/91-myusbdisk.rules und der Inhalt sollte z.B. folgendermassen aussehen:
| SUBSYSTEM=="block", ENV{ID_SERIAL}=="S27KJ1LZ400622", SYMLINK+="bigsam%n"
|
Du solltest die Angaben bei ID_SERIAL und SYMLINK entsprechend Deiner Disk und dem gewünschten Namen (bei mir "bigsam") anpassen. 3. Lade die Regelen neu in udev mit udevadm control --reload-rules 4. Jetzt stecke Deine USB Disk an das System und nach wenigen Sekunden sollte unter /dev die Links zu Deiner Disk erscheinen.
|