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 \u003ccode\u003eVolume\u003c/code\u003e class in the Batch v1alpha API defines a volume and its parameters for mounting to a virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eThis \u003ccode\u003eVolume\u003c/code\u003e class supports various volume types, including Google Cloud Storage (GCS), Network File System (NFS), and attached disk volumes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVolume\u003c/code\u003e class provides properties such as \u003ccode\u003eDeviceName\u003c/code\u003e, \u003ccode\u003eMountPath\u003c/code\u003e, \u003ccode\u003eMountOptions\u003c/code\u003e, \u003ccode\u003eGcs\u003c/code\u003e, and \u003ccode\u003eNfs\u003c/code\u003e to configure volume attachment and access.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePd\u003c/code\u003e property is now deprecated, with \u003ccode\u003eDeviceName\u003c/code\u003e being the preferred method for specifying attached disk volumes.\u003c/p\u003e\n"],["\u003cp\u003eMount options for \u003ccode\u003eVolume\u003c/code\u003e vary based on storage type, with support for \u003ccode\u003egcsfuse\u003c/code\u003e options for GCS and \u003ccode\u003emount\u003c/code\u003e command options for disks and NFS.\u003c/p\u003e\n"]]],[],null,["# Batch v1alpha API - Class Volume (1.0.0-alpha31)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha31 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Volume)\n- [1.0.0-alpha30](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/1.0.0-alpha30/Google.Cloud.Batch.V1Alpha.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 v1alpha 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.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Volume), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Volume](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.Volume), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Volume](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha.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.V1Alpha](/dotnet/docs/reference/Google.Cloud.Batch.V1Alpha/latest/Google.Cloud.Batch.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1Alpha.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### Pd\n\n [Obsolete]\n public PD Pd { get; set; }\n\nDeprecated: please use device_name instead.\n\n### SourceCase\n\n public Volume.SourceOneofCase SourceCase { get; }"]]