Storage device setup/removal
All storage devices used by chunkserver are defined in sfshdd.cfg (see man sfshdd.cfg
for more details). They need to be mounted to a specific directory
and defined in the file. The chunkserver will assume it's dedicated, but it's
not strictly necessary for it to be (but highly recommended).
After any modification to the sfshdd.cfg files, the chunkserver needs to be reloaded, by:
systemctl reload saunafs-chunkserver
OR
sfschunkserver reload
OR sending a SIGHUP signal to the running process.
Recommended Filesystems
While any filesystem can be used, we recommend XFS for CMR drives with the following options:
/dev/sda /mnt/sfschunkservers/data/sda xfs rw,noexec,nofail,nodev,noatime,nodiratime,largeio,allocsize=16777216,inode64 0 0
allocsize
can vary depending on the goal replication. For simple goals it
should be 64 MiB, but for EC this will depend on the number of data parts. For
example, with EC(4,3) (4 data parts and 3 parities), the alloc size should be
(64 MiB / 4) 16 MiB (16777216). Or with EC(3,1), it should be (64 MiB / 3) 22.4
MiB (22369621)
Adding storage devices
Adding a storage device is to simply point to the directory where it's mounted.
For example, if you had /dev/sda mounted in /mnt/hdd1/, you need to simply add
/mnt/hdd1
to the file.
Replacing storage devices (non-damaged)
If you wish to replace the storage devices (provided they are still working), it
may be best to mark them for removal with *. From the previous example, to
replace /dev/sda
, add *
to the beginning:
*/mnt/hdd1
It will start copying files to other devices. Once the process finishes (all the chunks are copied to other drives), it can safely be removed by deleting or commenting the line.
Removing/replacing storage devices
Removing the devices is achieved by simply deleting/commenting out the line. In
this case the device will be treated as missing and, after some delay (defined
by OPERATIONS_DELAY_INIT
in sfsmaster.cfg), will start replicating from other
devices to restore the chunks.
With bigger data, this is much faster than moving the data out of a device, but will put the entire system under strain as it will need to replicate data to elsewhere.