Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
public RepeatedField<string> MountOptions { get; }
Mount options vary based on the type of storage volume:
For a Cloud Storage bucket, all the mount options provided
by
the gcsfuse tool
are supported.
For an existing persistent disk, all mount options provided by the
mount command
except writing are supported. This is due to restrictions of
multi-writer
mode.
For any other disk or a Network File System (NFS), all the
mount options provided by the mount command are supported.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eVolume\u003c/code\u003e class in the Batch v1 API is 2.13.0, with previous versions available back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVolume\u003c/code\u003e class, part of the \u003ccode\u003eGoogle.Cloud.Batch.V1\u003c/code\u003e namespace, describes a volume and its mounting parameters to a virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eThis class supports different volume types, including Google Cloud Storage (GCS) and Network File System (NFS), each with their own specific mounting options.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eVolume\u003c/code\u003e class include \u003ccode\u003eDeviceName\u003c/code\u003e, \u003ccode\u003eMountPath\u003c/code\u003e, \u003ccode\u003eGcs\u003c/code\u003e, \u003ccode\u003eNfs\u003c/code\u003e, \u003ccode\u003eMountOptions\u003c/code\u003e, and \u003ccode\u003eSourceCase\u003c/code\u003e, enabling detailed volume configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVolume\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces.\u003c/p\u003e\n"]]],[],null,["# Batch v1 API - Class Volume (2.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Volume)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.12.0/Google.Cloud.Batch.V1.Volume)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.11.0/Google.Cloud.Batch.V1.Volume)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.10.0/Google.Cloud.Batch.V1.Volume)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.9.0/Google.Cloud.Batch.V1.Volume)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.8.0/Google.Cloud.Batch.V1.Volume)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.7.0/Google.Cloud.Batch.V1.Volume)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.6.0/Google.Cloud.Batch.V1.Volume)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.5.0/Google.Cloud.Batch.V1.Volume)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.4.0/Google.Cloud.Batch.V1.Volume)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.3.0/Google.Cloud.Batch.V1.Volume)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.2.0/Google.Cloud.Batch.V1.Volume)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.1.0/Google.Cloud.Batch.V1.Volume)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.0.0/Google.Cloud.Batch.V1.Volume)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.3.0/Google.Cloud.Batch.V1.Volume)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.2.0/Google.Cloud.Batch.V1.Volume)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.1.0/Google.Cloud.Batch.V1.Volume)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.0.0/Google.Cloud.Batch.V1.Volume) \n\n public sealed class Volume : IMessage\u003cVolume\u003e, IEquatable\u003cVolume\u003e, IDeepCloneable\u003cVolume\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Batch v1 API class Volume.\n\nVolume describes a volume and parameters for it to be mounted to a VM. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Volume \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Volume](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Volume), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Volume](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Volume), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Volume](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Volume), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Batch.V1](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1.dll\n\nConstructors\n------------\n\n### Volume()\n\n public Volume()\n\n### Volume(Volume)\n\n public Volume(Volume other)\n\nProperties\n----------\n\n### DeviceName\n\n public string DeviceName { get; set; }\n\nDevice name of an attached disk volume, which should align with a\ndevice_name specified by\njob.allocation_policy.instances\\[0\\].policy.disks\\[i\\].device_name or\ndefined by the given instance template in\njob.allocation_policy.instances\\[0\\].instance_template.\n\n### Gcs\n\n public GCS Gcs { get; set; }\n\nA Google Cloud Storage (GCS) volume.\n\n### HasDeviceName\n\n public bool HasDeviceName { get; }\n\nGets whether the \"device_name\" field is set\n\n### MountOptions\n\n public RepeatedField\u003cstring\u003e MountOptions { get; }\n\nMount options vary based on the type of storage volume:\n\n- For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported.\n- For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer\n mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).\n- For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.\n\n### MountPath\n\n public string MountPath { get; set; }\n\nThe mount path for the volume, e.g. /mnt/disks/share.\n\n### Nfs\n\n public NFS Nfs { get; set; }\n\nA Network File System (NFS) volume. For example, a\nFilestore file share.\n\n### SourceCase\n\n public Volume.SourceOneofCase SourceCase { get; }"]]