Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Read-only file system" error #189

Open
longlostnick opened this issue Jun 13, 2016 · 7 comments
Open

"Read-only file system" error #189

longlostnick opened this issue Jun 13, 2016 · 7 comments

Comments

@longlostnick
Copy link

I'm sorry if this has already been answered somewhere. I looked at the FAQ and didn't see anything that could help me.

Everything was working fine for the past couple weeks or so, but suddenly when I went start everything up I'm running into some mount permissions issues.

This is the error I get when trying to modify a anything inside the container in my mount directory:

root@e17260d4d5d7:/code# touch file
touch: cannot touch 'file': Read-only file system

Here are the current permissions of my volume inside the container:

drwxr-xr-x  29  501 dialout  986 Jun 10 21:49 code

Here's the info from running mount:

192.168.99.1:/Users/nick/Development/upcounsel/uc-docker/code/uc-web on /code type nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto=udp,port=19370,timeo=7,retrans=3,sec=sys,local_lock=all,addr=192.168.99.1)

The odd part is that it has been working fine, and suddenly today it decided to stop working. I'm not sure what happened. The only big thing I did since the last time I was working is install Mac updates and restart my computer.

Thanks!

@tschum
Copy link

tschum commented Jun 14, 2016

http:https://askubuntu.com/questions/197459/how-to-fix-sudo-unable-to-open-read-only-file-system

The filesystem will usually go into read-only while the system is running if there is a filesystem consistency issue. This is specified in fstab as errors=remount-ro and will occur when a FS access fails or an emergency read-only remount is requested via Alt+SysRq+U. You can run:

sudo fsck -Af -M
to force a check of all filesystems. As one of the other answers states, looking at dmesg is also very helpful.

@codekitchen
Copy link
Owner

Are files actually still readable in this state? I'm surprised that NFS could get into a state where reads work but writes fail, unless your Mac's disk truly was failing. Does the problem persist across a dinghy restart and a restart of your Mac?

@longlostnick
Copy link
Author

longlostnick commented Jun 15, 2016

Thanks guys. I think I figured it out.

I was having problems with Rails picking up file changes so I added lookupcache=none to custom_nfs_export_options. Removing that seems to have fixed it.

However now I'm still going to be back to the caching problem, and I'm not sure what to do there. I also don't know why setting lookupcache would have caused a problem in the first place.

Edit: also restarting dingy and even my mac wasn't fixing the problem.

@codekitchen
Copy link
Owner

Yeah, that might be difficult to answer without digging into unfs internals, unfortunately. Are you still seeing issues with Rails not picking up file changes? Are you using the default asset pipeline?

@mqliang
Copy link

mqliang commented Jul 6, 2017

I meet this issue also.

  1. dinghy up
➜  proginn git:(dev) ✗ dinghy up
Starting the dinghy VM...
Starting NFS daemon, this will require sudo
Waiting for NFS daemon...
Mounting NFS /Users/mqliang
Starting the FsEvents daemon
Starting DNS and HTTP proxy
48df0d75cb8c0f415b8e2dab716de1225d1952ec5d456a0b68f09bdc1658a404
   VM: running
  NFS: running
 FSEV: running
  DNS: running
PROXY: running

Your environment variables are already set correctly.
  1. run my app
➜  proginn git:(dev) ✗ docker-compose -f dev.yml up -d
Starting proginn_web
Starting proginn_sites
➜  proginn git:(dev) ✗ docker ps
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS                  PORTS                                                                           NAMES
48df0d75cb8c        codekitchen/dinghy-http-proxy:2.5   "/app/docker-entry..."   21 seconds ago      Up 20 seconds           0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 19322/tcp, 0.0.0.0:19322->19322/udp   dinghy_http_proxy
9d9cecad4575        proginn_sites                       "/code/script/ngin..."   32 minutes ago      Up Less than a second   0.0.0.0:8002->80/tcp                                                            proginn_sites
69d662784236        proginn_web                         "/code/script/web_..."   32 minutes ago      Up Less than a second   80/tcp                                                                          proginn_web
  1. docker logs
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (30: Read-only file system)
2017/07/06 22:16:04 [emerg] 22#0: open() "/var/log/nginx/access.log" failed (30: Read-only file system)

@solidevolution
Copy link

Any news here? It's 2018 ;)

@codekitchen
Copy link
Owner

I'm not sure what news you are looking for, if you are experiencing this and you have more information that could help pin down this issue then we may be able to get some movement on it. #274 may also be relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants