Auto standby hard drives - solved

Ask questions about Arch Linux ARM. Please search before making a new topic.

Auto standby hard drives - solved

Postby jeajea » Thu Oct 24, 2013 12:09 pm

My Zyxel NSA325 currently has a 60GB SDD as the boot (left) drive.
The first partition is 24 MB ext2 labeled “boot”.
The second partition is 32GB ext4 labeled “rootfs”.
The third partition is the rest of drive.
The second drive is a 4TB Seagate with the same partition structure (I can boot from it if I put it in the left slot).

I can manually run
Hdparm –S 180 /dev/sdb
However, this must be done after each reboot
Last edited by jeajea on Tue Oct 29, 2013 7:37 pm, edited 1 time in total.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Auto standby hard drives

Postby jeajea » Tue Oct 29, 2013 7:12 pm

I was able to create a custom service to start hdparm on boot

In /usr/local/bin I created “jims-auto.sh”

$this->bbcode_second_pass_code('', '#!/bin/sh
hdparm -S 180 /dev/sdb
hdparm -S 180 /dev/sda
# hdparm -S 180 /dev/sdc
# hdparm -S 180 /dev/sdd
exit
# EOF ')
In /usr/lib/systemd/system I created “jims-auto.service”

$this->bbcode_second_pass_code('', '[Unit]
Description=Autorun at startup
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/jims-auto.sh &

[Install]
WantedBy=multi-user.target')

$this->bbcode_second_pass_code('', 'Systemctl start jims-auto
Systemctl enable jims-auto')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 5 guests