@@ -70,7 +70,23 @@ gcloud compute instances create $GCP_NODE_VAL \
70
70
--shielded-integrity-monitoring \
71
71
--reservation-affinity=any
72
72
73
- # ### Setting up the base node
73
+ # Validator node 2
74
+ INSTANCE_NAME_1=validator2-terra
75
+ GCP_ZONE_1=us-east1-b
76
+ gcloud compute instances create $INSTANCE_NAME_1 \
77
+ --project=$GCP_PROJECT_NAME \
78
+ --zone=$GCP_ZONE_1 \
79
+ --machine-type=e2-highmem-4 \
80
+ --network-interface=network-tier=PREMIUM,subnet=default --maintenance-policy=MIGRATE \
81
+ --service-account=335875269057-compute@developer.gserviceaccount.com \
82
+ --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \
83
+ --create-disk=auto-delete=yes,boot=yes,device-name=$INSTANCE_NAME_1 ,image=projects/ubuntu-os-cloud/global/images/ubuntu-2004-focal-v20220331,mode=rw,size=10,type=projects/$GCP_PROJECT_NAME /zones/$GCP_ZONE_1 /diskTypes/pd-balanced \
84
+ --no-shielded-secure-boot \
85
+ --shielded-vtpm \
86
+ --shielded-integrity-monitoring \
87
+ --reservation-affinity=any
88
+
89
+ # Creates the external volume.
74
90
gcloud compute disks create $GCP_DISK_VALIDATOR \
75
91
--size=400GB \
76
92
--type=pd-ssd \
@@ -79,13 +95,32 @@ gcloud compute disks create $GCP_DISK_VALIDATOR \
79
95
80
96
gcloud compute instances attach-disk $GCP_NODE_VAL --disk $GCP_DISK_VALIDATOR --zone=$GCP_ZONE
81
97
82
- # gcloud beta compute disks create columbus-b --project=terra-col-1 --type=pd-ssd --size=800GB --zone=us-west1-b
98
+ # Creates the external volume for validator node 2.
99
+ GCP_DISK_VALIDATOR_1=col5b
100
+ gcloud compute disks create $GCP_DISK_VALIDATOR_1 \
101
+ --project=$GCP_PROJECT_NAME \
102
+ --type=pd-ssd \
103
+ --size=900GB \
104
+ --zone=$GCP_ZONE_1
105
+ gcloud compute instances attach-disk $INSTANCE_NAME_1 --disk $GCP_DISK_VALIDATOR_1 --zone=$GCP_ZONE_1
83
106
84
107
sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,nodiscard /dev/sdb
85
108
sudo mkdir $MOUNT_POINT
86
- sudo mount -o discard ,defaults /dev/sdb $MOUNT_POINT
109
+ sudo mount -o nodiscard ,defaults /dev/sdb $MOUNT_POINT
87
110
```
88
111
112
+ Reference: https://cloud.google.com/compute/docs/disks/add-persistent-disk?&_ga=2.261534606.-2010853228.1625020273#formatting
113
+
114
+ # Auto remount the volume.
115
+
116
+ Since the device name can change with each reboot, the more reliable method to remount the volume is to use the UUID. The UUID of the device can be retrieved like so:
117
+
118
+ ` sudo blkid /dev/sdb `
119
+
120
+ After getting the device UUID, add the following entry to _ /etc/fstab_ file:
121
+
122
+ ` UUID=<uuid> /mnt/col5 ext4 defaults,nofail,noatime 0 2 `
123
+
89
124
### ~~ Reconfiguring disks~~
90
125
91
126
~~ First check that there are no processes accessing the filesystem.~~
0 commit comments