Open main menu
SUPPORT DOCUMENTATION

Automating network access to storage

Overview

Platinum systems use tertiary storage, such as a USB stick or external hard drive, for recording data files. This is not the same as the internal flash memory used for the firmware, system state and backfill ring buffers. The tertiary storage is kept powered off unless it is being written to in order to save power. A NAM uses the same firmware, so it has the same behaviour, even though it does not actually switch off power to the device.

In release 12355, Platinum introduced a simple method to access files recorded to on-board storage without the need to run any extra commands to control the power. This scheme supports any storage medium (USB stick, hard drive, SD card, internal partition, or NFS/network file system) and access via SCP, SFTP or rsync.

The method involves creating a special user-name and password that has access to the storage (but not to change configuration etc.). When a user (or program, such as SFTP) logs in using this user-name/password pair, the system will automatically power up the storage and provide access. When the user (or program) logs out, the storage will be powered down again.

Note that access is reference counted, so there is no problem if multiple user sessions collide, or if the system wishes to flush during user access. These operations can all proceed in parallel and power will only be switched off when all demand for it is gone.

Method

Via SSH, run the following command:

Pt-storage-adduser download
Note the command is case-sensitive and must be typed exactly. Tab completion (type some of the word and hit tab twice) can be helpful. The "download" part of the command is actually the name of the user to be created. We recommend the use of the name "download" for consistency with the documentation.

The command will ask for a password to be entered twice. Pick a secure password to avoid the system being vulnerable to dictionary attacks.

The user-name and password pair can now be used to access the storage.

Using SSH keypairs

SSH keypairs are both safer and more convenient than password-based login. You may wish to see our guide on securing Platinum systems for guidance on the creation of SSH keypairs or for further discussion of the commands used here.

Before installing SSH keys, it is necessary to create a directory for the key files. The permissions on this directory are important; SSH will ignore it if they are not correct. To create it, first log in as the download user, and then run:

mkdir -m 0700 /home/download/.ssh

Now the SSH public keys must be added to the file:

/home/download/.ssh/authorized_keys
Note the spelling of the file-name: it is important to get this correct. Keys may be added to this file using a variety of techniques but possibly the simplest is to use the nano command ("nano to edit the file directly.

For more information, first contact your local distributor or email .