2017-02-06 13:40:28 -05:00
|
|
|
# VM setup - Attach persistent disk
|
|
|
|
|
|
|
|
|
|
|
|
## Create `aio-builds` persistent disk (if not already exists)
|
|
|
|
- Follow instructions [here](https://cloud.google.com/compute/docs/disks/add-persistent-disk#create_disk).
|
2020-05-02 09:14:11 -04:00
|
|
|
- `sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/disk/by-id/google-aio-builds`
|
2017-02-06 13:40:28 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Mount disk
|
|
|
|
- `sudo mkdir -p /mnt/disks/aio-builds`
|
|
|
|
- `sudo mount -o discard,defaults /dev/disk/by-id/google-aio-builds /mnt/disks/aio-builds`
|
|
|
|
- `sudo chmod a+w /mnt/disks/aio-builds`
|
|
|
|
|
|
|
|
|
|
|
|
## Mount disk on boot
|
2017-03-09 15:12:01 -05:00
|
|
|
- Run:
|
2020-05-02 09:14:11 -04:00
|
|
|
```sh
|
2017-03-09 15:12:01 -05:00
|
|
|
echo UUID=`sudo blkid -s UUID -o value /dev/disk/by-id/google-aio-builds` \
|
2020-05-02 09:14:11 -04:00
|
|
|
/mnt/disks/aio-builds ext4 defaults,discard,nofail 0 2 | sudo tee -a /etc/fstab
|
2017-03-09 15:12:01 -05:00
|
|
|
```
|