Page 1 of 1
Auto mount drive on connect & and spindown on iddle
Posted: 24 Sep 2008, 01:54
by janeks
Hi!
I have USB external hard drive that before I have Bubba was connected to my Win desktop PC. Now I connected them to Bubba without problem by using Admin Web interface.
But of course I would like to do that on reboot. So I found descriptions about automount.
But I would like to make it so that outomount also happens when I disk hardware is connected. In my case that disk is enough noisy - so I would like to switch them off and then switch back without touching admin web interface.
Probably another economich solution could be spin down on inactivity - is it possible on USB disks?
Posted: 24 Sep 2008, 08:01
by janeks
Found myself:
First make directory where your usb drive will be mounted. I made usb_h in /home/storage/extern
Give apropriate permissions by chmod.
Find your USB volume label:
Add into /etc/fstab (f.ex. nano /etc/fstab) follwing line:
Code: Select all
LABEL=your_label /home/storage/extern/usb_h your_disktype auto 0 0
But it works only for boot time, when HD is disconected or switched off then it does not automount.
Posted: 24 Sep 2008, 17:07
by andersos
you can use usbmount or
ivman for automounting.
Posted: 24 Sep 2008, 17:26
by janeks
I am more looking now for some way how to auto spin down after some time that external USB HD. Then I could leave them untouched.
Posted: 25 Sep 2008, 15:48
by andersos
hdparm may be able to spin it down.
Posted: 25 Sep 2008, 15:52
by janeks
hdparm may be able to spin it down
Allready tried - unsuccesfuly.

Gave some kind of incompatibility error.
Also tried one spindown utility - accepts command, but no result.
Now I am trying spindown from:
http://code.google.com/p/spindown/
But I hooked on makeing when got following problem:
make: g++: Command not found
But I have GCC...
How to correctly give permissions for attached USB drive
Posted: 26 Sep 2008, 06:54
by janeks
Hi!
How to correctly give permissions for attached USB drive?
Is it fstab, mount point or disk (/dev/sdb1)?
I tried permision commands on mount point but nothing happens when disk is mounted.
Now mu usb disk is readonly, but I would like also write access.
Thanks in advance!
Posted: 26 Sep 2008, 07:33
by janeks
Found already:
For my disk vfat in fstab there should be umask=000, f.ex.:
LABEL=your_label /home/storage/extern/usb_h your_disktype auto,umask=000 0 0
Posted: 26 Sep 2008, 09:01
by andersos
Yes. Spinning down usb disk can be hard. But there are disks that can be configured to spin down after f.ex. 15 minutes idleness. F.ex. Maxtor OneTouch 4 disks.
Spindown solved
Posted: 28 Sep 2008, 13:52
by janeks
Solved by using Spindown daemon from:
http://code.google.com/p/spindown/
Also from there I learn correct command for spinning down (at least for my Buffalo drive station external disk):
Note: This is good only for external HD, that you don't use frequently. Too often spindowns/ups will short life of your HD.
Posted: 03 Oct 2008, 07:23
by jcw
Thanks!
FWIW, I recently tried enabling the auto-spindown built into the kernel driver, but couldn't get it to work. Whereas "sg_start 0 /dev/sdb" works fine to spin down. Spin-up is automatic, i.e. on first access to the drive. Great.
Using just the sg_start command, you could even simply add a periodic crontab entry to spin disks down, e.g. at night.
-jcw