MX on Linux: Difference between revisions

8 bytes removed ,  05:01, 3 May 2022
m
Line 270: Line 270:
The expected life of any storage device, and the extent to which its life is shortened depends on the actual device.  The external devices that have the longest life (and therefore can cope most easily with multiple read/write actions) are solid state discs (SSD). Also the larger the capacity of the storage device, the more places on the device where files can be stored and the storing algorithm will try to spread the storing evenly across the entire storage area, so wear at any one location is reduced.
The expected life of any storage device, and the extent to which its life is shortened depends on the actual device.  The external devices that have the longest life (and therefore can cope most easily with multiple read/write actions) are solid state discs (SSD). Also the larger the capacity of the storage device, the more places on the device where files can be stored and the storing algorithm will try to spread the storing evenly across the entire storage area, so wear at any one location is reduced.


All Linux computers will have some random access memory chips (RAM) and it is worthwhile to define part of that RAM as a drive used for temporary files.  For a Raspberry Pi computer, a typical approach would be to edit the fstab file, adding the line ''tmpfs /var/tmp tmpfs nodev,nosuid,size=1M 0 0'', but the size you choose will depend on RAM available and what temporary files are being created.  For maximum life of the "high capacity micro-SD" card if that is what your computer boots from, you should create a symbolic link path that maps the '''/tmp''' folder used by the system to your '''/var/tmp''' you have just defined in RAM.  The difficulty will be that you cannot create a logical redirect on '''/tmp''' if the folder is already in use, so that makes it too complicated to explain here.
All Linux computers will have some random access memory chips (RAM) and it is worthwhile to define part of that RAM as a drive used for temporary files.  For a Raspberry Pi computer, a typical approach would be to edit the fstab file, adding the line ''tmpfs /run/tmp tmpfs nodev,nosuid,size=1M 0 0'', but the size you choose will depend on RAM available and what temporary files are being created.  For maximum life of the "high capacity micro-SD" card if that is what your computer boots from, you should create a symbolic link path that maps the '''/tmp''' folder used by the system to your '''/run/tmp''' you have just defined in RAM.  The difficulty will be that you cannot create a logical redirect on '''/tmp''' if the folder is already in use, so that makes it too complicated to explain here.


==web sub-folder==
==web sub-folder==
Line 282: Line 282:
If MX is currently running, you need to stop it, or at least alter any options that generate .json files.  Then you must delete those files that end in ".json", except that you don't delete "websitedataT.json".
If MX is currently running, you need to stop it, or at least alter any options that generate .json files.  Then you must delete those files that end in ".json", except that you don't delete "websitedataT.json".


In a terminal session, issue commands in the following format for each file (this example relates to Raspberry Pi and uses "/var/tmp" which was defined in the extra line added to fstab earlier):
In a terminal session, issue commands in the following format for each file (this example relates to Raspberry Pi and uses "/run/tmp" which was defined in the extra line added to fstab earlier):


<code>sudo ln -s /var/tmp/availabledata.json CHOSEN PATH/CumulusMX/web/availabledata.json</code>
<code>sudo ln -s /run/tmp/websitedata.json CHOSEN PATH/CumulusMX/web/websitedata.json</code>


Notes:
Notes:
Line 290: Line 290:
* Full paths are given both for the file that MX is to be redirected to, and after it the path where it expects to create the file
* Full paths are given both for the file that MX is to be redirected to, and after it the path where it expects to create the file
* "CHOSEN PATH" is defined in [[#Where to install all packages?]], but basically it starts with a "/" and defines the path to get to where "CumulusMX" is a sub-folder.
* "CHOSEN PATH" is defined in [[#Where to install all packages?]], but basically it starts with a "/" and defines the path to get to where "CumulusMX" is a sub-folder.
* The text "availabledata.json" is just one file in the set of files linked from [[:Category:JSON Files]].
* The text "websitedata.json" is just one file in the set of files linked from [[:Category:JSON Files]].
 
 


=Running MX=
=Running MX=
5,838

edits