Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Batch disks options

Hi there,
I have been playing with Cloud Batch these weeks and I've noticed that when I'm defining an instance policy for the Job I have two options for the disks :


1. Create a new persistent disk and mount it as an RW volume in the container


2. Use an existing persistent disk and mount it as an RO volume in the container


The disk created using option 1. will be destroyed when the Job is finished. Is there a reason why the option to keep the disk after the Job VM is destroyed isn't available in the spec?
I understand the job's output is normally written back in a GCS bucket. But for me keeping the persistent disk with some data produced by the job is also valid.

 

Thanks!

Solved Solved
1 2 299
1 ACCEPTED SOLUTION

Hi @davidg527,

Thanks for your feedback!

Yes you are right, now for existing PD, Batch will keep it,  while for newly created PD through the job process, it will be auto deleted with VMs deletion, since Batch considered customers pre-create existing PD as a more sharable and reusable purpose.

Batch is considering of offering flexibility to let customers decide whether auto deleting disks or not, but unfortunately that feature hasn't been prioritized yet.

Thanks for the valuable input and we'll consider about that!

Best,

Wenyan

View solution in original post

2 REPLIES 2

Hi @davidg527,

Thanks for your feedback!

Yes you are right, now for existing PD, Batch will keep it,  while for newly created PD through the job process, it will be auto deleted with VMs deletion, since Batch considered customers pre-create existing PD as a more sharable and reusable purpose.

Batch is considering of offering flexibility to let customers decide whether auto deleting disks or not, but unfortunately that feature hasn't been prioritized yet.

Thanks for the valuable input and we'll consider about that!

Best,

Wenyan

Thank you! 

As a workaround we are querying the Cloud Batch VM using the job uuid and changing the disk deletion policy.