Config changes not saving

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
zukakog
Posts: 4
Joined: Wed Jul 22, 2020 12:57 am

Config changes not saving

Post by zukakog »

A few months ago, my bandwidth usage reports started running low. I rarely reach my data cap, so I didn't worry too much. A few days ago, I added a new port forwarding rule, but it's disappeared.

It looks like my x86_64 router loses power once in a while, and mounts a few points as ro:

Code: Select all

root@Gargoyle:/etc/config# mount
/dev/root on / type ext4 (ro,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/sda1 on /boot type ext4 (rw,noatime)
/dev/sda1 on /boot type ext4 (rw,noatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda2 on /tmp/usb_mount/3a893016-02 type ext4 (ro,noatime)
My storage and ram are fine:

Code: Select all

root@Gargoyle:/etc/config# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                29.3G    162.1M     29.2G   1% /
tmpfs                     1.8G    304.0K      1.8G   0% /tmp
/dev/sda1                15.7M      3.3M     12.1M  21% /boot
/dev/sda1                15.7M      3.3M     12.1M  21% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda2                29.3G    162.1M     29.2G   1% /tmp/usb_mount/3a893016-02

root@Gargoyle:/etc/config# free -h
             total       used       free     shared    buffers     cached
Mem:       3869120      62672    3806448        304       3416      16328
-/+ buffers/cache:      42928    3826192
Swap:            0          0          0
So, the primary issue is how do I get those mount points back to rw? Rebooting and then checking the mounts shows they're back to rw, but then if I check again after adding a new port forward, they're back to ro.

Secondary questions are:
* How do I prevent this from happening again if I lose power? Is there a config option to just always mount as rw?
* Is this a result of going with ext4 instead of squashfs? I've never had this issue on my old Buffalos, Netgears, etc.

Thanks in advance!

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Config changes not saving

Post by pythonic »

zukakog wrote:
Sun Jan 02, 2022 11:55 pm
* Is this a result of going with ext4 instead of squashfs?
Yes. The only defence is to force an fsck of the root partition before mounting rw.

Using a UPS is prudent if there are power issues but won't reliably mitigate the filesystem not being unmounted cleanly unless you can monitor the UPS and shutdown before final power loss.

zukakog
Posts: 4
Joined: Wed Jul 22, 2020 12:57 am

Re: Config changes not saving

Post by zukakog »

pythonic wrote:
Tue Jan 04, 2022 8:34 am
Yes. The only defence is to force an fsck of the root partition before mounting rw.

Using a UPS is prudent if there are power issues but won't reliably mitigate the filesystem not being unmounted cleanly unless you can monitor the UPS and shutdown before final power loss.
OK, you're going to laugh, but it's the UPS that's causing the issues. It just randomly shuts down once in a while, even at full power. I just have to go turn it back on and it'll be good for months, working flawlessly during black or brownouts. I think it just gets bored and wants attention. ¯\_(ツ)_/¯

Anyway, a quick e2fsck of the affected partition (while mounted ro) seems to have done the trick. I did have to reboot after, rather than just remounting as rw. This'll do me for now, since the power losses aren't frequent. Thanks for setting me on the right path!

Looking at my obnoxiously overpowered stats from the first post, what would I be losing out on if I went back to squashfs?

Thanks again!

pythonic
Posts: 230
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: Config changes not saving

Post by pythonic »

zukakog wrote:
Tue Jan 04, 2022 11:50 pm
it's the UPS that's causing the issues. It just randomly shuts down once in a while, even at full power.
I don't think that's a laughing matter at all :roll: . Seriously, I'd pull that UPS out and get a replacement ASAP (at least as quickly as other consideration$ allow anyway!). Been there, done that :(.
zukakog wrote:
Tue Jan 04, 2022 11:50 pm
what would I be losing out on if I went back to squashfs?
I think the standard x86 squashfs build allows 256MB for the squashfs+overlay partition which would cover the usage I can see in your stats.

As I recall the squashfs install doesn't expand the overlay fs to use the rest of the storage, however you should be able to create a partition from the unused space if you need it.

zukakog
Posts: 4
Joined: Wed Jul 22, 2020 12:57 am

Re: Config changes not saving

Post by zukakog »

Sigh, a child plugged in a huge color laser printer directly to the UPS, rather than to the nearby surge protector where it was supposed to be. It does a monthly cleaning cycle that pulls too much current so the UPS shuts off.

Now that that issue is solved and my partitions are RW again, I'll probably stick to the ext4 image until the next major update that requires a complete reinstall. Thanks again for pointing me in the right direction!

Post Reply