automatically mounting a GCS bucket on startup fails

307 views
Skip to first unread message

Alex

unread,
Aug 5, 2018, 3:01:18 PM8/5/18
to gce-discussion
I'm running an ubuntu 18.04 instance and attempt to mount my bucket in a startup script like so:

    gcsfuse --implicit-dirs mybucket /my/dir/

where /my/dir/ gets created on startup. This command seems to work fine if I just ssh into the machine and run it but fails on startup: I end up with a dir that looks like (when running ll)

    d?????????  ? ?      ?         ?            ? dir/

Any ideas?

Thanks,
Alex

Alex

unread,
Aug 5, 2018, 3:02:35 PM8/5/18
to gce-discussion
Also: in /var/log/syslog it seems to indicate that the bucket was mounted successfully.

Alex

unread,
Aug 5, 2018, 3:25:39 PM8/5/18
to gce-discussion
solved: must be mounted as the login user rather than root (which is the user during the startup script) so the command should be run with 

    sudo -H -u myusername ....
Reply all
Reply to author
Forward
0 new messages