http://public-wiki.iucc.ac.il/index.php?title=How_to_mount_Google_Cloud_Storage_inside_a_Linux_machine&feed=atom&action=history
How to mount Google Cloud Storage inside a Linux machine - Revision history
2024-03-29T14:44:51Z
Revision history for this page on the wiki
MediaWiki 1.41.0
http://public-wiki.iucc.ac.il/index.php?title=How_to_mount_Google_Cloud_Storage_inside_a_Linux_machine&diff=832&oldid=prev
Eyales at 09:46, 5 March 2019
2019-03-05T09:46:10Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:46, 5 March 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l27">Line 27:</td>
<td colspan="2" class="diff-lineno">Line 27:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: '''sudo chown MyUser:MyUser /dev/cloudstorage/'''</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: '''sudo chown MyUser:MyUser /dev/cloudstorage/'''</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: '''sudo chmod 777 /dev/cloudstorage/'''</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: '''sudo chmod 777 /dev/cloudstorage/'''</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: '''gcsfuse --key-file ~/key.json StorageName /dev/cloudstorage'''</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: '''gcsfuse <ins style="font-weight: bold; text-decoration: none;">--implicit-dirs </ins>--key-file ~/key.json StorageName /dev/cloudstorage'''</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: Note 1: Replace '''MyUser''' with the username you have logged into the Linux machine</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: Note 1: Replace '''MyUser''' with the username you have logged into the Linux machine</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: Note 2: Replace '''StorageName''' with the target Google storage bucket name</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: Note 2: Replace '''StorageName''' with the target Google storage bucket name</div></td></tr>
</table>
Eyales
http://public-wiki.iucc.ac.il/index.php?title=How_to_mount_Google_Cloud_Storage_inside_a_Linux_machine&diff=828&oldid=prev
Eyales at 11:00, 24 February 2019
2019-02-24T11:00:45Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:00, 24 February 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l40">Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Additional references regarding permanent mount using FSTAB ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Additional references regarding permanent mount using FSTAB ==</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">: </ins>https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>https://reiners.io/mounting-google-cloud-buckets-in-centos/</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">: </ins>https://reiners.io/mounting-google-cloud-buckets-in-centos/</div></td></tr>
</table>
Eyales
http://public-wiki.iucc.ac.il/index.php?title=How_to_mount_Google_Cloud_Storage_inside_a_Linux_machine&diff=827&oldid=prev
Eyales: Created page with "== Create credentials file == * Login to the GCP console: : https://console.cloud.google.com/ * From the upper pane, select the target GCP project * Login to the link below to..."
2019-02-24T11:00:31Z
<p>Created page with "== Create credentials file == * Login to the GCP console: : https://console.cloud.google.com/ * From the upper pane, select the target GCP project * Login to the link below to..."</p>
<p><b>New page</b></p><div>== Create credentials file ==<br />
* Login to the GCP console:<br />
: https://console.cloud.google.com/<br />
* From the upper pane, select the target GCP project<br />
* Login to the link below to create a new service account key:<br />
: https://console.cloud.google.com/apis/credentials/serviceaccountkey<br />
* Service account -> select New service account:<br />
:* Service account name: Specify an informative name for the new service account<br />
:* Role: Select Storage -> Storage object admin<br />
:* Key type: JSON<br />
* Click on Create<br />
* Save the newly created JSON file in a secured location<br />
* Click on Close<br />
<br />
== GCFuse installation ==<br />
* Login using SSH to the target Linux machine using privileged account.<br />
* Follow the instructions below to install the Cloud storage Fuse adapter:<br />
: https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/installing.md<br />
* Copy the JSON file created above into ~/<br />
* Rename the JSON file:<br />
: '''mv ~/Myfile.json ~/key.json'''<br />
: Note: Replace '''Myfile.json''' with the actual JSON file<br />
<br />
== Mount phase ==<br />
* Run the commands below to mount the Google Cloud Storage:<br />
: '''sudo mkdir /dev/cloudstorage'''<br />
: '''sudo chown MyUser:MyUser /dev/cloudstorage/'''<br />
: '''sudo chmod 777 /dev/cloudstorage/'''<br />
: '''gcsfuse --key-file ~/key.json StorageName /dev/cloudstorage'''<br />
: Note 1: Replace '''MyUser''' with the username you have logged into the Linux machine<br />
: Note 2: Replace '''StorageName''' with the target Google storage bucket name<br />
* To view the content of the Google cloud storage bucket, switch to the new mount point:<br />
: '''cd /dev/cloudstorage'''<br />
<br />
== Unmount phase ==<br />
* When completing the work on the bucket, from the Linux SSH console, and run the commands below to unmount the Google Cloud Storage:<br />
: '''cd ~'''<br />
: '''sudo fusermount -u /dev/cloudstorage'''<br />
* Logoff the Linux machine<br />
<br />
== Additional references regarding permanent mount using FSTAB ==<br />
https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/mounting.md<br />
https://reiners.io/mounting-google-cloud-buckets-in-centos/</div>
Eyales