Spin down HDD with seafile-data

Hi all,

at the moment, I’m setting up my new Seafile-Server. System (Ubuntu Server 16.04 LTS and Seafile-Pro) is installed on a small SSD, seafile-data should be moved to a large 2TB-SATA-HDD which is mounted at startup via /etc/fstab.
Since there are only a few users (max 3) and Seafile access is very rare, I thought about whether it could make sense to send the HDD to sleep and/or spin it completely down after a certain time of no access. So the whole system would be totally silent most of the time and it would consume less energy.
Does this make sense? Can the seafile-server handle this?
If yes, how would you do that? hdparm? Systemd automount?

Thank you for your opinion, hints and ideas!
Cheers,
Jochen

Hi Jochen,

I have a similar setup, the seafile server application and nginx are located on the SSD, the seafile data is on two harddisks in a RAID setup.
However, as long as seafile clients are connected to the server, the disks keep spinning.
So they only shut down during night hours, when all three clients are disconnected.
I wonder if this can be changed?
Because the harddisk keeps spinning even if there is no file activity, the connected client itself keeps the disks running.
Does anyone know if it is possible to move the seafile database to the SSD as well, and keep only the data itself on the HDD? but also to keep a copy of the database on the HDD, when files are changed?
Thanks,
Ruediger

How did you manage to migrate seafile-data to your HDD? I have the same configuration but I can’t change the seafile-data path to my HDD.
Can you help?
Cheers,
NBN

With fdisk I made a partition on my HDD, afterwards I created a filesystem on it:
# mkfs.ext4 /dev/sdb1
Then you can list all the UUIDs of all partitions, that exist in the system:
# blkid
With the information about the UUID of your HDD-partition, you can mount this partition on every system start. Therefore you first have to create a mountpoint (I’ve installed seafile to /opt/seafile, you should change this accordingly):
# mkdir /opt/seafile/data
Then you should change ownership of this folder to the seafile user (here user seafile and group seafile):
# chown -R seafile.seafile /opt/seafile/data
Then you have to edit /etc/fstab and add your new partition:
UUID=7f1f8d9a-d0...... /opt/seafile/data ext4 defaults 0 2
Then change the location of the seafile-data folder in /opt/seafile/ccnet/seafile.ini:
/opt/seafile/data/seafile-data
Restart Seafile and seahub. That’s it.

Cheers,
Jochen