What's new

/opt : Read-only file system

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Ribboa

Occasional Visitor
Hi everyone,

I have a Asus RT-AC87U. Firmware: 384.5

Nearly after every second reboot I have the problem that the /opt folder (which is redirected to /tmp/mnt/ext3/entware) is a "read-only filesystem".

Take a look at this:
Code:
admin@ASUS-ROUTER:/tmp/mnt/ext3/entware# touch test.txt
touch: test.txt: Read-only file system

After a reboot it works most often, but I really would like to know the cause, because it's very annoying. I have a nginx (with entware) and it can not start because of the read-only filesystem.

Does anyone have an idea what's going wrong?

Kind regards
Ribboa
 
Hi everyone,

I have a Asus RT-AC87U. Firmware: 384.5

Nearly after every second reboot I have the problem that the /opt folder (which is redirected to /tmp/mnt/ext3/entware) is a "read-only filesystem".

Take a look at this:
Code:
admin@ASUS-ROUTER:/tmp/mnt/ext3/entware# touch test.txt
touch: test.txt: Read-only file system

After a reboot it works most often, but I really would like to know the cause, because it's very annoying. I have a nginx (with entware) and it can not start because of the read-only filesystem.

Does anyone have an idea what's going wrong?

Kind regards
Ribboa
My first guess is either file system or usb drive failure. These are warnings of impending problems.
 
So replacing the usb device is a promising option?
Yes and try to format and name the drive at the same time. ext2/ext3/ext4 what ever your flavour. I choose to use ext2 because the volume is small (16gig) and the file system uses no journaling.
 
So replacing the usb device is a promising option?

You can try running fsck on it to see if there are any filesystem issue first.

Edit: If you’re running nginx from it though it’s highly likely you’ll need to replace the drive due to wear and tear.
 
Last edited:
You can try running fsck on it to see if there are any filesystem issue first.

Edit: If you’re running nginx from it though it’s highly likely you’ll need to replace the drive due to wear and tear.

So it's not a good idea to run a nginx on a Asus router with a usb stick because there is too much i/o? What about a Raspberry Pi 3 with a SD card? Do they have the same problem?
 
So it's not a good idea to run a nginx on a Asus router with a usb stick because there is too much i/o? What about a Raspberry Pi 3 with a SD card? Do they have the same problem?

SD cards probably break more easily than USB drives.

It’s not that it’s a bad idea, but you just have to know the limitation and adjust your expectations of the longevity or your USB drive. That said there are configurations for nginx to use more RAM and less disk IO, might help.
 
SD cards probably break more easily than USB drives.

It’s not that it’s a bad idea, but you just have to know the limitation and adjust your expectations of the longevity or your USB drive. That said there are configurations for nginx to use more RAM and less disk IO, might help.
Hmm, the nginx acts as revery proxy for the application I store my photos and videos. Especially for videos the nginx seems to store them in a tmp-folder before passing it to the target, right? So this might lead to a lot of i/o. Using the RAM is not an option for videos as the video's size exceeds the ram size. So is there any option to tell nginx to bypass the data directly to the proxy target without saving it temporarily?

Edit: proxy_request_buffering=off seems to be the right option: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering
 
Last edited:
I think just disabling buffering might hurt performance. Instead of disabling it, change proxy_cache_path and proxy_temp_path to somewhere under /tmp/*?

/tmp is a tmpfs therefore RAM based, but obviously has the same problem of being pretty small. I’m not familiar with nginx enough to know how these changes would impact performance on different workloads like transferring a lot of small files vs one long stream of a video though.
 
SD cards probably break more easily than USB drives.

Depends on the quality of the SD Card and USB drive - some are better than others - all things being equal, USB drive is probably the better choice as the bus speed is faster than SDIO for the Asus devices (and many others).

Cheap is not good - and larger is better than being small...

One advantage that might be of use for some with SD Cards - TRIM support (if the OS supports it)

My Pi's all run 32GB cards - I prefer, use, and recommend the SanDisk Extreme's, as they support TRIM, which helps out quite a bit - not all SD Cards do (Samsung evo and pro cards also support TRIM) - most USB Thumbdrives use the bulk-storage mode, and not UASP, so TRIM is not supported on them...
 
  • Like
Reactions: kfp

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top