Events
31 Mar, 23 - 2 Apr, 23
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You can clone persistent volumes in Azure Container Storage. A cloned volume is a duplicate of an existing persistent volume. You can only clone volumes of the same size that are in the same storage pool.
Follow the instructions below to clone a persistent volume.
Use your favorite text editor to create a YAML manifest file such as code acstor-clonevolume.yaml
.
Paste in the following code and save the file. A built-in storage class supports volume cloning, so for dataSource be sure to reference a PVC previously created by the Azure Container Storage storage class. For example, if you created the PVC for Azure Disks, it might be called azurediskpvc
. For storage, specify the size of the original PVC.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-acstor-cloning
spec:
accessModes:
- ReadWriteOnce
storageClassName: acstor-azuredisk
resources:
requests:
storage: 100Gi
dataSource:
kind: PersistentVolumeClaim
name: azurediskpvc
Apply the YAML manifest file to clone the PVC.
kubectl apply -f acstor-clonevolume.yaml
You should see output similar to:
persistentvolumeclaim/pvc-acstor-cloning created
Use your favorite text editor to create a YAML manifest file such as code acstor-pod.yaml
.
Paste in the following code and save the file. For claimName, be sure to reference the cloned PVC.
kind: Pod
apiVersion: v1
metadata:
name: fiopod2
spec:
nodeSelector:
acstor.azure.com/io-engine: acstor
volumes:
- name: azurediskpv
persistentVolumeClaim:
claimName: pvc-acstor-cloning
containers:
- name: fio
image: nixery.dev/shell/fio
args:
- sleep
- "1000000"
volumeMounts:
- mountPath: "/volume"
name: azurediskpv
Apply the YAML manifest file to deploy the new pod.
kubectl apply -f acstor-pod.yaml
You should see output similar to the following:
pod/fiopod2 created
Check that the pod is running and that the persistent volume claim has been bound successfully to the pod:
kubectl describe pod fiopod2
kubectl describe pvc azurediskpvc
Events
31 Mar, 23 - 2 Apr, 23
The biggest Fabric, Power BI, and SQL learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Learn storage concepts that help you solve real problems with Windows containers running on Azure Kubernetes Service (AKS) and AKS Hybrid.