DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th August 2013
Sabbel Sabbel is offline
Port Guard
 
Join Date: Sep 2008
Posts: 11
Default Hard disk standby / spin down

Hi.

I am looking for a working solution for the hard disk standby / spin down problem: if I set the standby timer with "atactl sd0 setstandby 120", then the disk goes to standby. But after an access, the standby timer does not work.

Is there no way to "turn off" the disks after a period of inactivity?

Best regards
Sabbel
Reply With Quote
  #2   (View Single Post)  
Old 8th August 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Sabbel View Post
I am looking for a working solution for the hard disk standby / spin down problem
Please provide the entire output of dmesg(8).

Describing the behavior you are experiencing as the "hard drive standby/spin down problem" is vague at best. The output of dmesg(8) will give readers information as to platform, OS version, & the kernel's interpretation of the system's hardware. This is useful information to those who may be able to provide assistance.
Reply With Quote
  #3   (View Single Post)  
Old 9th August 2013
Sabbel Sabbel is offline
Port Guard
 
Join Date: Sep 2008
Posts: 11
Default

Hi.

The mainboard is a MSI C847MS-E33 with Celeron 847 and 2x 1100 MHz. The OS is installed on the Verbatim STORE N GO USB stick, data resists on the Samsung HD.

Code:
OpenBSD 5.3 (GENERIC) #53: Tue Mar 12 18:15:44 MDT 2013
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 4168200192 (3975MB)
avail mem = 4034785280 (3847MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb4f0 (75 entries)
bios0: vendor American Megatrends Inc. version "V1.1" date 03/07/2013
bios0: MSI MS-7835
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SSDT SSDT
acpi0: wakeup devices PS2K(S3) PS2M(S3) P0P1(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) USB6(S3) USB7(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) RP06(S4) PXSX(S4) RP07(S4) PXSX(S4) RP08(S4) PEGP(S4) PEG0(S4) PEG1(S4) PEG2(S4) PEG3(S4) GLAN(S4) EHC1(S4) EHC2(S4) XHC_(S4) HDEF(S4) PWRB(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) CPU 847 @ 1.10GHz, 1097.67 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,XSAVE,NXE,LONG,LAHF,PERF,ITSC
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: apic clock running at 99MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P1)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus -1 (RP02)
acpiprt4 at acpi0: bus 2 (RP03)
acpiprt5 at acpi0: bus 3 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus -1 (RP07)
acpiprt9 at acpi0: bus -1 (RP08)
acpiprt10 at acpi0: bus -1 (PEG0)
acpiprt11 at acpi0: bus -1 (PEG1)
acpiprt12 at acpi0: bus -1 (PEG2)
acpiprt13 at acpi0: bus -1 (PEG3)
acpiec0 at acpi0: Failed to read resource settings
acpicpu0 at acpi0: C1, PSS
acpipwrres0 at acpi0: FN00
acpipwrres1 at acpi0: FN01
acpipwrres2 at acpi0: FN02
acpipwrres3 at acpi0: FN03
acpipwrres4 at acpi0: FN04
acpitz0 at acpi0: critical temperature is 101 degC
acpitz1 at acpi0: critical temperature is 101 degC
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD02
cpu0: Enhanced SpeedStep 1097 MHz: speeds: 1100, 1000, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 2G Host" rev 0x09
vga1 at pci0 dev 2 function 0 "Intel HD Graphics 2000" rev 0x09
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe0000000, size 0x10000000
inteldrm0 at vga1: apic 2 int 16
drm0 at inteldrm0
"Intel 7 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
ehci0 at pci0 dev 26 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 16
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 7 Series HD Audio" rev 0x04: msi
azalia0: codecs: Realtek/0x0887, Intel/0x2806, using Realtek/0x0887
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 7 Series PCIE" rev 0xc4: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 2 "Intel 7 Series PCIE" rev 0xc4: msi
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x06: RTL8168E/8111E-VL (0x2c80), apic 2 int 18, address d4:3d:7e:54:01:73
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 5
ppb2 at pci0 dev 28 function 3 "Intel 82801BAM Hub-to-PCI" rev 0xc4: msi
pci3 at ppb2 bus 3
ppb3 at pci3 dev 0 function 0 "ASMedia ASM1083/1085 PCIE-PCI" rev 0x03
pci4 at ppb3 bus 4
ehci1 at pci0 dev 29 function 0 "Intel 7 Series USB" rev 0x04: apic 2 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 vendor "Intel", unknown product 0x1e5f rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 7 Series AHCI" rev 0x04: msi, AHCI 1.3
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 5 lun 0: <ATA, SAMSUNG HD204UI, 1AQ1> SCSI3 0/direct fixed naa.50024e90043ffac3
sd0: 1907729MB, 512 bytes/sector, 3907029168 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 7 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-10600
spdmem1 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-10600
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhidev0 at uhub2 port 2 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/27.20 addr 3
uhidev0: iclass 3/1
ums0 at uhidev0: 8 buttons, Z dir
wsmouse0 at ums0 mux 0
umass0 at uhub2 port 4 configuration 1 interface 0 "Verbatim STORE N GO" rev 2.00/11.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Verbatim, STORE N GO, 1100> SCSI2 0/direct removable serial.18a50302012080138739
sd1: 7651MB, 512 bytes/sector, 15669248 sectors
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (f5c7e15bbcd00efe.a) swap on sd1b dump on sd1b
The only daemons I start are
Code:
apmd_flags="-C"
ntpd_flags="-s"
fstab:
Code:
/dev/sd1a / ffs rw,noatime,softdep 1 1
swap /tmp mfs rw,-s=512000,nodev,noatime 0 0
swap /var/tmp mfs rw,-s=256000,nodev,noatime,noexec 0 0
/dev/sd0a /export ffs rw,softdep,noexec 0 0
If I submit the command "atactl sd0 setstandby 120", the disk spins down after a few seconds. But after I access the disk, they spin up, and never spins down.

I have no idea where the problem lies...

Greetings
Sabbel
Reply With Quote
  #4   (View Single Post)  
Old 9th August 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by Sabbel View Post
The OS is installed on the Verbatim STORE N GO USB stick, data resists on the Samsung HD.

Code:
...
sd0 at scsibus0 targ 5 lun 0: <ATA, SAMSUNG HD204UI, 1AQ1> SCSI3 0/direct fixed naa.50024e90043ffac3
sd0: 1907729MB, 512 bytes/sector, 3907029168 sectors
...
sd1 at scsibus1 targ 1 lun 0: <Verbatim, STORE N GO, 1100> SCSI2 0/direct removable serial.18a50302012080138739
sd1: 7651MB, 512 bytes/sector, 15669248 sectors
...
root on sd1a (f5c7e15bbcd00efe.a) swap on sd1b dump on sd1b
If I submit the command "atactl sd0 setstandby 120", the disk spins down after a few seconds. But after I access the disk, they spin up, and never spins down.
OpenBSD deals with both SATA & USB devices as SCSI devices. This is why you see the attached storage as sd0 & sd1 (See the sd(4) manpage for more information.) in the dmesg(8) output. The atactl(8) manpage states that it manipulates IDE devices (See wd(4)). This would account why you are not getting the desired behavior with sd(4) devices.
Reply With Quote
  #5   (View Single Post)  
Old 9th August 2013
Sabbel Sabbel is offline
Port Guard
 
Join Date: Sep 2008
Posts: 11
Default

But the command works with SATA drives (the first call), only after "waking up" the disc dont switch to standby.
Reply With Quote
  #6   (View Single Post)  
Old 9th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Your hard drive is the Samsung HD204UI. This may or may not be applicable to your situation but there is a known problem with the drive and its handling of S.M.A.R.T. commands issued by programs such as atactl(8).

Samsung has a firmware fix for the HD204UI and a firmware fix for the HD204UI/JP variant.
Reply With Quote
  #7   (View Single Post)  
Old 9th August 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
This may or may not be applicable to your situation but there is a known problem with the drive and its handling of S.M.A.R.T. commands issued by programs such as atactl(8).
My apologies. I had not digested enough of the atactl(8) manpage to see that SMART commands are being handled as well. My last comment about atactl(8) being wd(4) specific was in error.
Reply With Quote
  #8   (View Single Post)  
Old 9th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The default atactl command is identify, and that is the command that can cause a data loss during a write, prompting the firmware updates.

I did find some comments about this rebadged Samsung/Seagate drive through Googling that lead me to believe that standby timing may be affected by apmset power management levels.

Last edited by jggimi; 9th August 2013 at 01:51 PM. Reason: clarity
Reply With Quote
  #9   (View Single Post)  
Old 9th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I've been wondering:

The # atactl sdo setstandby 120 command issues an ATA standby command, which per the ATA specification is supposed to place the drive in standby and set or disable the timer value. I wonder if Sabbel could force the drive to enter standby mode after a failure of the timer to do so, using the # atactl sd0 standby command, which issues standby immediate, a different ATA command to the drive.

Without the firmware update, issuing an ATA identify command should be safe when the drive is operationally unused (unmounted). I wonder if, after a failure to enter standby, if an # atactl sd0 (the default identify command) might show power management disabled or the power management level set to a range that prevents the drive from re-entering standby mode.

Last edited by jggimi; 9th August 2013 at 05:45 PM. Reason: typo, clarity
Reply With Quote
Old 11th August 2013
Sabbel Sabbel is offline
Port Guard
 
Join Date: Sep 2008
Posts: 11
Default

So, the tip with the firmware have make my day I have a few of HD204UI's, and one of them has the original firmware, the other ones have the updated firmware. The original firmware has problems with the standby / setidle.

Thanks to your support!
Sabbel
Reply With Quote
Old 12th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I'm glad the problem is resolved!

I'm particularly pleased that your dmesg lead me to a useful answer.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web page fills up hard disk J65nko News 0 1st March 2013 12:46 PM
Hard disk reliability ephemera General Hardware 32 20th April 2010 10:17 AM
Hard disk utilization Greg_Morgan General software and network 3 16th October 2009 12:13 PM
Formatting Hard Disk Drive to UFS in OS X 10.5 Turquoise88 Other BSD and UNIX/UNIX-like 1 7th March 2009 09:57 PM
Hard disk bottle neck deathsoul FreeBSD General 1 28th September 2008 10:44 AM


All times are GMT. The time now is 10:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick