问题
I use google cloud for a hpc project. I have multiple instances writing and reading from from the same persistent disk (mounted using sshfs). I want to analyze some data using Datalab, and I'm not sure how to mount the persistent disk from Datalab (which natively uses google storage). Should I just execute the mount as a bash command from within my notebook, or is there a more elegant way to set things up? Am I wrong sticking with persistent disks over google storage?
回答1:
Yes, just use a %%bash cell and do the mount that way if that is easiest. Sorry for the slow response.
There is no right or wrong answer for where to store your data; it depends what you are trying to do.
回答2:
Assuming that the disk is already attached to the instance, you can mount with bash by ssh'ing to the instance:
# find the name of the attached disk
lsblk
# set the name of the disk to <disk-name>
sudo mkdir -p /mnt/<disk-name>
sudo mount /dev/sdb /mnt/<disk-name
来源:https://stackoverflow.com/questions/34909298/using-persistent-disks-with-google-datalab