FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,156 views 6 comments
by anonymous
I have multiple RUT240 deployed all over a city. In the original configuration before deployment i created a script in /etc/openvpn/script/ that is monitoring and if necessary restarting the OpenVPN service. This script is running every 10 minutes with crontab. There was no problem with this configuration.
About 3-4 months after deployment i need to add something to the script but i get read-only file system. This is in at least 10 of my deployed RUT240. I tried rebooting but nothing. I tried to change a file in some other folder (/tmp/) but the same error. The routers seem to work fine, at least for my goal, but i cannot make any change on them.
I also tried to make some changes in the firewall (custom rules) but from the web ui after save the changes i make disappear. If i try to vi the file /etc/firewall.user the same problem, read-only file system
How can i revoke read-only from file system?

2 Answers

0 votes
by anonymous

The problem was that the file system was locked because logs filled it up. Using the following command the file system could be unlocked

mount -o remount,rw /

With the following command the logs where deleted and after a reboot the system was OK. 

rm /usr/var/log/messages

After the reboot the logging was turned back to "RAM memory" to prevent the filling of the file system.
Thank you @ErnestasB for the help.

Best answer
0 votes
by anonymous

Hi,

Could you please execute command df in your CLI and give an output of that here?

EB.

by anonymous

Hi Ernestas, here is the output from two devices with the problem


root@RUT240ETHNIKISAMINIS:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    3712      3612       100  97% /
/dev/root                10752     10752         0 100% /rom
tmpfs                    30508       172     30336   1% /tmp
/dev/mtdblock5            3712      3612       100  97% /overlay
overlayfs:/overlay        3712      3612       100  97% /
tmpfs                      512         0       512   0% /dev
/dev/mtdblock7             576       236       340  41% /mnt/mtdblock7
root@RUT240ETHNIKISAMINIS:~#

root@RUT240ARISTOTELOUS:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    3712      3616        96  97% /
/dev/root                10752     10752         0 100% /rom
tmpfs                    30508       400     30108   1% /tmp
/dev/mtdblock5            3712      3616        96  97% /overlay
overlayfs:/overlay        3712      3616        96  97% /
tmpfs                      512         0       512   0% /dev
/dev/mtdblock7             576       256       320  44% /mnt/mtdblock7
root@RUT240ARISTOTELOUS:~#

and one with no problem for now
 

root@RUT240PAVLOUMELA:/etc/openvpn/script# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    3712      2116      1596  57% /
/dev/root                10752     10752         0 100% /rom
tmpfs                    30508       400     30108   1% /tmp
/dev/mtdblock5            3712      2116      1596  57% /overlay
overlayfs:/overlay        3712      2116      1596  57% /
tmpfs                      512         0       512   0% /dev
/dev/mtdblock7             576       260       316  45% /mnt/mtdblock7
root@RUT240PAVLOUMELA:/etc/openvpn/script#
by anonymous
Could you try resetting the router and see if that fixes the problem? Because i've looked into your df output and I can't see the reason why the router would act like the filesystem isn't mounted. So the main issue that is causing this is unknown in this case.

EB.
by anonymous
Could it be because i have enabled "Save log in" "Flash memory" and the flash is filled up?
Is there any other way to maybe solve this problem because i cannot reset so many devices in the field.
by anonymous

It could be. You could test it by logging into CLI and using the rm command to delete the log file and once it opens up some space - try rebooting and writing something in the memory (or just edit the script as you did), and see if it lets you save it.

EB.

by anonymous
I tried changing the setting to RAM and rebooting but it didn't take. Where is the location of the log file? Is there a user that has more privileges from root?
by anonymous

Once logs are saved in flash, they're saved in this directory: /usr/var/log/ under the file name messages.

And no, there is no user that has more privileges than root.

EB.