Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Google Cloud Platform (GCP) provides rich set of resources for building true enterprise-class NAS server readily.  Please note that the network bandwidth is tied to the number of cpu cores of the compute instance. The storage IOPS is based on capacity of provisioned storage. Please refer to Google cloud documentation for detailed configuration steps.


PurposeMachineCoresMemoryNetworkStorage
Shared  block storage for IP-SAN or NVMeoFn1-highcpu-443.6GB~8Gbps

pd-ssd

Mirrored ephemeral NVMe

Capacity Optimized NFS server

LVM + VDO + XFS + NFS Server

n1-standard-4416GB~8Gbps

Bcache(writeback) on pd-ssd

Data on pd-standard

ssd:standard ratio 1:4

High Performance NFS Servern1-standard-8830GB~16Gbps

Bcache  uses pd-ssd

Data on pd-std

All Flash NFS server

ZFS Storage Appliance

n1-highmem-3232208GB~40GbpsData & Log uses SSD Persistent Disk (pd-ssd)
High-Availability


IPAliases feature of GCP


Here is the sequence of steps involved in deploying High-Availability (HA) MayaNAS on Google cloud platform. The next steps assume you’ve already created a project, and installed gcloud. You can check that gcloud is installed and authenticated by running:

...

  1. Start with a new project name for all resources used with MayaNAS either for evaluation or production use.
    # gcloud create project maya-eval-proj

  2. MayaNAS requires a service account with sufficient permissions to manipulate disk attachments for proper sharing and fencing, and also storage read-write access to object storage. It also needs sufficient permission to float the virtual IP across multiple instances.  By having separate service account for all MayaNAS deployments you can enforce proper security measures as the assigned roles are limited to this project instance only.


    # gcloud iam service-accounts create maya-gce-account --display-name "mayanas service account"
    # gcloud iam service-accounts list

    The output will contain the EMAIL of the newly created service account. Load them into shell environment variables which will be used in the next steps

    PROJECT=$(gcloud info --format='value(config.project)')
    SA_EMAIL=$(gcloud iam service-accounts list --filter="displayName:$SERVICE_ACCOUNT_NAME" \
        --format='value(email)')

    Add relevant permissions to the newly created service account with the role scope limited to this project only. Your other instances in different projects will not be affected by these changes.

    # permission to create/modify instances in your project
    gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$SA_EMAIL \
        --role roles/compute.instanceAdmin
    
    # permission to create/modify network settings in your project
    gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$SA_EMAIL \
        --role roles/compute.networkAdmin
    
    # permission to create/modify firewall rules in your project
    gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$SA_EMAIL \
        --role roles/compute.securityAdmin
    
    # permission to create/modify images & disks in your project
    gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$SA_EMAIL \
        --role roles/compute.storageAdmin
  3. Google

    cloud

    brilliantly

    engineered

    way

    to

    provide

    floating

    IP

    addresses

    on

    cloud.

    We

    will

    make

    use

    of

    that

    to

    assign

    virtual

    ip

    addresses

    in

    10.9.0.0

    net.

    #gcloud

    compute

    networks

    subnets

    update 

    default  

    --add-secondary-ranges

    range1=10.9.0.0/24


  4. Create persistent storage of size 2TB and of type pd-ssd in the default zone configured with gcloud.  Consult Google Cloud documentation for cost and availability in your zone.
    Based on the above table plan on compute and storage instances and create them accordingly.  For example

    # gcloud --project $PROJECT compute disks create mayadata-disk --size=2TiB --type=pd-ssd

  5. Create compute instancesgcloud 

    Code Block
    themeEclipse
    # gcloud  --project $PROJECT compute instances
    create 
     create  mayanas-ha1
     
       --machine-type n1-highmem-
    32 
    32  \
    		--metadata=serial-port-enable=
    1  
    1   --image-project centos-
    cloud 
    cloud  --image-family centos-
    7  
    7   \
    		--service-account=$SA_EMAIL --scopes compute-rw,storage-rw --network-interface
    '
    gcloud 
    
    #gcloud  --project $PROJECT compute instances
    create 
     create  mayanas-ha2
     
       --machine-type n1-highmem-32 \
    		--metadata=serial-port-enable=
    1  
    1   --image-project centos-
    cloud 
    cloud  --image-family centos-
    7  
    7   \
    		--service-account=$SA_EMAIL --scopes compute-rw,storage-rw --network-interface
    '


  6. Once the instances are ready and login to the instances using ssh shell to proceed with MayaNAS installation and configuration.