Re: disk spindown

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

 



On 20.04.2013 03:34, Wolfgang S. Rupprecht wrote:
> 
> Has anyone succeeded in spinning down disks under Fedora?
> 
> I've done the following and the "hdparm -C" does show the disk spun
> down, but the next time I look it is spun up, and it stays up.  The disk
> is unmounted and I've stopped and disabled smartd, so it isn't accessing
> the disks.  I don't think anything else is either.  I'm probably missing
> a trick somewhere, but what???
> 
>     disk=/dev/sdc
> 
>     hdparm -S 120 $disk
>     hdparm -y $disk
>     hdparm -C $disk
> 

yum info sdparm
…
: Warning: It is possible (but unlikely) to change SCSI disk settings
: such that the disk stops operating or is slowed down. Use with care.

i.e.
/usr/bin/diskungfu:
#!/bin/sh
# Disk stop - spin down

grep -w sdc /proc/diskstats >dstat.1st
sleep 60
grep -w sdc /proc/diskstats >dstat.2nd
if cmp dstat.1st dstat.2nd >/dev/null 2>&1
then
    echo Stopping disk, spinning down…
    sdparm -f -r -q -v -C stop /dev/sdc
    exit 0
else
    echo Disk busy.
    exit 1
fi
EOF

Change the parameters as needed,
set-up a cron job,
and there you go. ;)


poma



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux