Date: Fri, 08 Aug 1997 14:55:58 -0400 From: Peter S Galbraith <galbraith@mixing.qc.dfo.ca> To: aic7xxx@FreeBSD.ORG Cc: Peter S Galbraith <galbraith@mixing.qc.dfo.ca> Subject: Re: disk spin down <summary> Message-ID: <199708081855.OAA00261@mixing.qc.dfo.ca>
next in thread | raw e-mail | index | archive | help
[Bottom line: Can scsi-idle be used with swap?] I wrote: > I apologize if this isn't the proper forum. I don't know if this > is handled by the SCSI driver or not. I use Linux pre-patch-2.0.31-3. > > I have a spare disk I use exclusively for nightly backups, and > optionally seldom used swap. I'd like to spin down the disk when not > in use (and unmounted) because of it's whinning sound. Pierre Turlais told me about scsi-idle: Title: scsi-idle - Turn off SCSI disks when idle (Take 2) Description: A small kernel patch which spins down SCSI-disks after a period of inactivity. scsi-idle can probably be considered to be BETA software now, it works for me and half dozen other people, but YMMV. I patched the Linux kernel and tried the program when no partitions were mounted. It worked but I got the following messages: kernel: SCSI host 0 channel 0 reset (pid 4623) timed out - trying harder kernel: SCSI bus is being reset for host 0 channel 0. kernel: (scsi0:-1:0) Reset device, active_scb 1 kernel: scsi0: (targ -1/chan A) matching scb to (targ 1/chan A) last message repeated 2 times kernel: scsi0: Resetting current channel A kernel: scsi0: Channel reset, sequencer restarted kernel: (scsi0:1:0) Aborting scb 1 I assume all this is normal. Then I enabled a swap partition on the spun-down SCSI disk and it spun-up again to turn on swap. I told scsi-idle to spin down the disk after 5 minutes of inactivity. It spun down after 5 minute as I never swap much. And I got these messages: kernel: scsi : aborting command due to timeout : pid 5539, scsi0, channel 0, id 1, lun 0 Start/Stop Unit 00 00 00 00 00 kernel: general protection: 0000 kernel: CPU: 0 kernel: EIP: 0010:[<00000004>] kernel: EFLAGS: 00010202 kernel: eax: 00000000 ebx: 002fd018 ecx: 001d8090 edx: 03b40003 kernel: esi: 00000297 edi: 00000000 ebp: 002f0018 esp: 001d5efc kernel: ds: 0018 es: 0018 fs: 002b gs: 0000 ss: 0018 kernel: Process swapper (pid: 0, process nr: 0, stackpage=001d42e4) kernel: Stack: 0019757f 002fd018 002fd018 002f0018 00000206 001d5f50 001960d0 002fd018 kernel: 00000003 002fd018 00197a36 002fd018 00040000 001fecc0 00000001 00112048 kernel: 00000001 ffffffff 00000001 00000001 001d5f6c 001feb30 00117907 001d5f6c kernel: Call Trace: [scsi_abort+279/508] [scsi_times_out+72/304] [scsi_main_timeout+134/168] [timer_bh+248/820] [do_bottom_half+59/96] [handle_bottom_half+11/32] [schedule+436/648] kernel: [exit_notify+219/468] [do_exit+487/492] [die_if_kernel+695/704] kernel: Code: d0 9b 00 f0 c3 e2 00 f0 d0 9b 00 f0 d0 9b 00 f0 54 ff 00 f0 kernel: Aiee, killing interrupt handler kernel: SCSI host 0 abort (pid 5539) timed out - resetting kernel: SCSI bus is being reset for host 0 channel 0. kernel: (scsi0:1:0) Abort_reset, scb flags 0x1, while idle, LASTPHASE = 0x1, SCSISIGI 0x0, SEQADDR 0x5, SSTAT0 0x5, SSTAT1 0xa kernel: (scsi0:1:0) Queueing an Abort SCB. kernel: (scsi0:1:0): Abort message sent. kernel: SCSI host 0 channel 0 reset (pid 5539) timed out - trying harder kernel: SCSI bus is being reset for host 0 channel 0. kernel: (scsi0:-1:0) Reset device, active_scb 0 kernel: scsi0: (targ -1/chan A) matching scb to (targ 1/chan A) last message repeated 2 times kernel: scsi0: Resetting current channel A kernel: scsi0: Channel reset, sequencer restarted kernel: (scsi0:1:0) Aborting scb 0 Anything to worry about? Or should I never enable a swap partition on a scsi-idle'd disk? Thanks! -- Peter Galbraith, research scientist <galbraith@mixing.qc.dfo.ca> Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada 418-775-0852 - FAX 418-775-0546
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708081855.OAA00261>