Storage/Media

Setting up storage/media server on RPi.

NextCloud suite is quite appropriate for this purpose. With symlinks we can link a big drive to the smaller data flash drive.

To do:

    • see how to set up media server (on specific subnet/interface only, for example) similar to XBMC distribution

Roles

NextCloud storage

Music

Ampache (link) is a music streaming server and a protocol.

NextCloud Music app (github link, store link) can be used serverside. It can read the music collection from a configurable location and serve it through Ampache API. To access, generate an API key in the NextCloud settings.

It also can serve as a web-based music player.

Audio Player can be used to play music via the web.

Power Ampache is an Android app that understands the Ampache protocol. It can cache music offline.

Media server

    • How-To: Raspberry Pi media SERVER (easy) (link)
    • RPi Plex server (link)

Samba NAS

Set up Samba access for Windows machines on the local network.

Software

NextCloud can be used as the main host for the files.

Music

There are two music apps for NextCloud, allowing the creation of playlists, caching of songs, etc.

Media Server

Links

    • set up media server or RPi (link)

Samba File Share

Allow access from Windows machines on the network. Install samba

sudo apt-get install samba samba-common-bin

Hardware

HDD

Set the drive to power off after certain period of inactivity.

Install NTFS support if sharing drive(s) with Windows:

sudo apt-get install ntfs-3g

Create a mount point and set up fstab with the drive id and mount information.

Sleep

Power down the HDD when not in use. Install "hdparm" package. Check if drive is spinning with

hdparm -C /dev/hdX

Drive can be put to sleep manually immediately with

hdparm -y /dev/sdX

Set the spindown parameters with "sudo hdparm -B127 /dev/sdX" or edit "/etc/hdparm.conf" for permanent configuration. Configure the drive by UUID.

Eventually, set the drive to power down right after boot by creating "/etc/systemd/system/hdparm.service" end enabling it by "systemctl enable hdparm". See "Putting a drive to sleep directly after boot" in hdparm page below, and "Enabling systemd service".

Reboot the system after configuration.

Links

    • Spin Down and Manage Hard Drive Power (link)
    • Enabling systemd service (link)
    • hdparm reference (link)
    • Spin down (link)
    • HDD Standby hdparm (link)
    • Spin down disk with hdparm (link)

Links

    • RPi External storage (link)
    • How to Turn a Raspberry Pi into a Low-Power Network Storage Device (link)
    • NAS (link)
    • disk command reference (link)
    • fstab reference (link)