Scratch Disks are helpful for keeping temporary or persistant data outside of the FMADIO host capture system. Many times the OS disks is unable to be used due to capacity or location.
Scratch Disks can be run as a RAID0 or RAIDx group of drives, allow you the system flexible allocation of the total storage capacity of the system between Capture vs Analytics.
Start by editing the disk configuration file
Then moving serial numbers from the CacheDisk section to the ScratchDisk section.
For example moving a single disk (serial number "22443E9DC54E") from ssd8 -> scr0
Before:
renameing ssd8 to scr0
After:
Save the file.
This can be repeated for as many disks as you require, please keep the numbering sequential e.g. scr0, scr1, scr2, scr3 etc so the system can map it correctly.
Rebooting is required as the system needs to rename the mount points in /opt/fmadio/disk
Create the RAID0 partition using mdmadm as follows. Change the appropriate fields to create a RAID0 2 disk partition or more.
Or for a 2 disk Scratch Partition
The output will look something like below
The partition now exists on /dev/md1 we need to create a filesystem next so it can be used in a general purpose way. Run the following command to create an EXT4 based Scratch Disk partition
Example output looks like below
Next confirm th file system mounts correctly, by creating a test file on the partition
Then creating a file and confirming, such as below
Step 5) Confirm automatic mounting
Reboot the system and confirm the ScratchDisk gets mounted automatically on boot to
The test file created above should exit, example below
In some cases its best to locate the Capture Filesystems Metadata onto the scratch disk. A few extra steps in addition to the above steps are required.
Create a stream directory on the ScratchDisk such as below
Example output looks like the following
Edit the file
Near the end of the file create a one line entry as follows
Example output looks like
Reboot the system
Run the command
Confirm the /opt/fmadio/stream symblic link is pointing to the correct location, example below.
Run a quick format via the GUI to reset the storage partition. This changes the number of drives used for the capture file system.
The above will take about 5 minutes and reboot 2 times by itself.
Check the directory listing
Example looks as follows
After this the file system can be moved along with the diskpacks.