Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for filestore

December 7, 2019

GCP Create Filestore

GCP Cloud Filestore is a managed file storage service for applications that require a filesystem interface and a shared filesystem for data. Filestore gives users a simple, native experience for standing up managed Network Attached Storage (NAS) with their Google Compute Engine and Kubernetes Engine instances.

With that said, let’s build one.

gcloud filestore instances create nfs-server \
  --project=[PROJECT_ID] \
  --zone=us-central1-c \
  --tier=STANDARD \
  --file-share=name="vol1",capacity=1TB \
  --network=name="default"

gcloud filestore instances create nfs-server \ --project=[PROJECT_ID] \ --zone=us-central1-c \ --tier=STANDARD \ --file-share=name="vol1",capacity=1TB \ --network=name="default"

How to mount the filestore on clients.

sudo apt-get -y update
sudo apt-get -y install nfs-common
sudo mkdir /mnt/test
sudo mount 10.0.0.2:/vol1 /mnt/test
sudo chmod go+rw /mnt/test

sudo apt-get -y update sudo apt-get -y install nfs-common sudo mkdir /mnt/test sudo mount 10.0.0.2:/vol1 /mnt/test sudo chmod go+rw /mnt/test

Increase capacity to 3TB.

gcloud filestore instances update nfs-server 
  --project=myproject 
  --zone=us-central1-c 
  --file-share=name="vol1",capacity=3TB

gcloud filestore instances update nfs-server --project=myproject --zone=us-central1-c --file-share=name="vol1",capacity=3TB

January 10, 2019

Cloud Filestore

Cloud Filestore is a managed file service by Google Cloud. It’s a shared file system similar to Amazon’s Elastic File System offering. Users of Cloud Filestore will experience something similar to when using a NAS drive (network attached storage). Filestore is used for both Compute and Kubernetes Engine instances. Unlike EFS where storage is unlimited, you have to specify a storage size when creating a new Filestore.

Create a Filestore:

gcloud beta filestore instances create nfs-server \
    --project=your-project-id \
    --location=your-region \
    --tier=STANDARD \
    --file-share=name="vol1",capacity=1TB \
    --network=name="default",reserved-ip-range="10.0.0.0/29"

gcloud beta filestore instances create nfs-server \ --project=your-project-id \ --location=your-region \ --tier=STANDARD \ --file-share=name="vol1",capacity=1TB \ --network=name="default",reserved-ip-range="10.0.0.0/29"

Delete a Filestore:

gcloud beta filestore instances delete nfs-server --project=your-project-id --location=your-region

gcloud beta filestore instances delete nfs-server --project=your-project-id --location=your-region

Instance clients can connect to the Filestore using a NFS client.

sudo apt-get -y update
sudo apt-get -y install nfs-common
sudo mkdir /mnt/test
sudo mount 10.0.0.59:/vol1 /mnt/test
sudo chmod go+rw /mnt/test

sudo apt-get -y update sudo apt-get -y install nfs-common sudo mkdir /mnt/test sudo mount 10.0.0.59:/vol1 /mnt/test sudo chmod go+rw /mnt/test

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021