Page 1 of 1

Let fstab mount go to sleep

Posted: Tue Mar 24, 2015 11:41 am
by Ronnie N
Hello,

At start-up my Pi (with Rasbian) mounts a few network shares. Problem is, when these shares are mounted, the network drives will almost never enter sleep modus (stop HDD from spinning) even if there is no writing or reading going on.

My question is, can I add an command to fstab that will allow the drives to go to sleep after a certain amount of time?

thanks in advance,

Ronald

Re: Let fstab mount go to sleep

Posted: Tue Mar 24, 2015 11:43 am
by DougieLawson
What machine hosts the shares?
What sharing system is it? NFS or Samba/CIFS?
What filesystem is on the shares? ext4 or NTFS?

Install hdparm on the system that hosts the drives and try
hdparm -S 241 /dev/sdb

http://linux.die.net/man/8/hdparm

Re: Let fstab mount go to sleep

Posted: Tue Mar 24, 2015 12:04 pm
by Ronnie N
Thanks for the reply!

I should indeed have given that information.
The shares are NFS shares hosted on a Debian Weezy based machine. The machine is an WD MyBook live. The web interface that is provided with the machine gives me an option to enable the HDD's to go to sleep. When the Raspberry is off, the drive goes to sleep relatively fast. But when it on (in my case 24/7) it doesn't.

Which makes everything a little more complicated....

Re: Let fstab mount go to sleep

Posted: Tue Mar 24, 2015 12:18 pm
by DougieLawson
What files are open when the Raspberry Pi is idle? Is there something doing a heartbeat function?
Are you able to umount the share without it coming back "device busy"?