2

I would like to use Local SSD for one of my applications, however the data is > 350GB, so I would need to use 2 of them.

gce auto mounts and formats the SSDs into /mnt/disks/ssdx, but is there any way I could get the VM to RAID0 the SSDs before mounting?

Would editing the Startup script in a new instance template be the right place for this?

PS: I'm very new to GCE but fairly competent with Linux.

Jesse Scherer
  • 271
  • 1
  • 8
sajal
  • 582
  • 6
  • 12

2 Answers2

2

This documented fairly well in the Local SSD documentation

Navigate to

Format and mount individual local SSD devices

jaxxstorm
  • 606
  • 6
  • 10
  • Yes its easy for compute engine, but I was interested to know about how to do it in *container* engine where Google manages the VM for you. – sajal Dec 19 '16 at 15:25
1

I do have a solution for this, you can use a DaemonSet [1][2] it's useful for deploying ongoing background tasks that you need to run on all or certain nodes.

Example: if you want to run a start-up script on node level. see below the example, the DaemonSet is used for several purpose:

kind: DaemonSet 
apiVersion: extensions/v1beta1 
metadata: 
name: startup-script 
labels: 
app: startup-script 
spec: 
template: 
metadata: 
labels: 
app: startup-script 
spec: 
hostPID: true 
containers: 
- name: startup-script 
image: gcr.io/google-containers/startup-script:v1 
imagePullPolicy: Always 
securityContext: 
privileged: true 
env: 
- name: STARTUP_SCRIPT 
value: | 
#! /bin/bash 
<YOUR COMMAND LINE> 
<YOUR COMMAND LINE> 
echo done 

[1]https://cloud.google.com/kubernetes-engine/docs/concepts/daemonset#creating_daemonsets [2]https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

Alioua
  • 381
  • 1
  • 8