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

LinuxOptions.BindMountPersistentDisk used for tmpfs mounts #106

Closed
sykesm opened this issue Nov 17, 2016 · 1 comment
Closed

LinuxOptions.BindMountPersistentDisk used for tmpfs mounts #106

sykesm opened this issue Nov 17, 2016 · 1 comment

Comments

@sykesm
Copy link

sykesm commented Nov 17, 2016

The agent settings for the linux platform includes the following:

	// When set to true persistent disk will be mounted as a bind-mount
	BindMountPersistentDisk bool

When that option is enabled, it uses the linuxBindMounter for more than persistent disks. In my case, it's attempting to create and mount a tmpfs at /var/vcap/data/sys/run with the --bind option; this doesn't work:

2016-11-17_19:56:25.34094 [main] 2016/11/17 19:56:25 ERROR - App setup Running bootstrap: Setting up data dir: Mounting tmpfs to /var/vcap/data/sys/run: Shelling out to mount: Running command: 'mount tmpfs /var/vcap/data/sys/run -t tmpfs -o size=1m --bind', stdout: '', stderr: 'mount: special device tmpfs does not exist
2016-11-17_19:56:25.34095 ': exit status 32
2016-11-17_19:56:25.34098 [main] 2016/11/17 19:56:25 ERROR - Agent exited with error: Running bootstrap: Setting up data dir: Mounting tmpfs to /var/vcap/data/sys/run: Shelling out to mount: Running command: 'mount tmpfs /var/vcap/data/sys/run -t tmpfs -o size=1m --bind', stdout: '', stderr: 'mount: special device tmpfs does not exist
2016-11-17_19:56:25.34099 ': exit status 32

Mounting without the bind option works:

/:/var/vcap/bosh# mount tmpfs /var/vcap/data/sys/run -t tmpfs -o size=1m       
/:/var/vcap/bosh# ls -l /var/vcap/data/sys/
total 4
drwxr-x--- 2 root vcap 4096 Nov 17 19:53 log
drwxrwxrwt 2 root root   40 Nov 17 21:52 run
/:/var/vcap/bosh#                                                       
@cppforlife
Copy link
Contributor

i think this was fixed some time ago in 3363.x stemcells: https://github.com/cloudfoundry/bosh-agent/blob/master/platform/disk/linux_bind_mounter.go#L13

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

2 participants