Skip to main content
Crusoe Support Help Center home page
Crusoe

How-to Import an Existing Crusoe Volume as a PV/PVC in CMK Cluster

Sanchit Pathak
Sanchit Pathak
Updated

Last Updated: Oct 23, 2025

Introduction

This article highlights the procedure on how to import an existing Crusoe volume as a PV/PVC into the CMK cluster.

Prerequisites 

  • Access to a Kubernetes cluster created through Crusoe Managed Kubernetes (CMK) offering. Note that the Crusoe CSI Driver is only supported on CMK.
  • Access to Crusoe CLI/UI/API
  • Existing Persistent and/or Shared disks. You can create these by following our official doc

Step-by-Step Instructions

  1. Identify the Volume/Volumes using Crusoe CLI
    $ crusoe storage disks get <disk_name>
    Example:
    $ crusoe storage disks get persistent-icat
    name: persistent-icat
    id: 9eddc28c-262b-4d24-ad3b-8c90ef8c3da7
    attached_to: none
    created_at: 2025-04-25T18:06:53Z
    location: eu-iceland1-a
    serial_number: 4D665A4FF32FT4B2053
    size: 10TiB
    type: persistent-ssd
  2. Create Persistent Volume
    Example for Persistent Disk:
    kind: PersistentVolume
    apiVersion: v1
    metadata:
    name: crusoe-persistent-pv
    spec:
    capacity:
      storage: 10Ti # Must match PVC and with existing Crusoe Disk size
    accessModes:
      - ReadWriteOnce
    storageClassName: crusoe-csi-driver-ssd-sc
    volumeMode: Filesystem # Supported modes are Block and Filesystem
    persistentVolumeReclaimPolicy: Retain
    csi:
      driver: ssd.csi.crusoe.ai
      readOnly: false
      volumeHandle: 9eddc28c-262b-4d24-ad3b-8c90ef8c3da7 # Must match spec to Crusoe Disk ID
      volumeAttributes:
        csi.crusoe.ai/disk-name: persistent-icat # Must match spec to Crusoe Disk Name
        csi.crusoe.ai/serial-number: 4D665A4FF32T64B2053 # Must match spec to Crusoe Disk Serial Number
    Example for Shared Disk:
    kind: PersistentVolume
    apiVersion: v1
    metadata:
    name: crusoe-shared-pv
    spec:
    capacity:
      storage: 8Ti # Must match PVC and with existing Crusoe Disk size
    accessModes:
      - ReadWriteMany
    storageClassName: crusoe-csi-driver-ssd-sc
    volumeMode: Filesystem # Supported modes Filesystem
    persistentVolumeReclaimPolicy: Retain
    csi:
      driver: fs.csi.crusoe.ai
      readOnly: false
      volumeHandle: ta0eb851-49a1-497e-ad23-f26f364cfbef # Must match spec to Crusoe Disk ID
      volumeAttributes:
        csi.crusoe.ai/disk-name: shared-disk-icat # Must match spec to Crusoe Disk Name
        csi.crusoe.ai/serial-number: 47C58J8CBD2A908866C # Must match spec to Crusoe Disk Serial Number
    Note: The driver for Persistent Disks is `ssd.csi.crusoe.ai` and for shared disks is `fs.csi.crusoe.ai`. Also, for Shared-Disks, the supported access modes are ReadWriteOnce & ReadWriteMany while for Persistent Disks it is ReadWriteOnce.
  3. Create Persistent Volume Claim
    Example for Persistent Disk:
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
    name: crusoe-persistent-pvc
    spec:
    accessModes:
      - ReadWriteOnce
    storageClassName: crusoe-csi-driver-ssd-sc
    resources:
      requests:
        storage: 10Ti
    volumeMode: Filesystem
    Example for Shared Disk:
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
    name: crusoe-shared-pvc
    spec:
    accessModes:
      - ReadWriteMany
    storageClassName: crusoe-csi-driver-ssd-sc
    resources:
      requests:
        storage: 8Ti
    volumeMode: Filesystem
  4. Create Deployment referencing the PV and PVC resources
    Example deployment file:
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: crusoe-deployment
    spec:
    replicas: 1
    selector:
      matchLabels:
        app: crusoe-deployment
    template:
      metadata:
        labels:
          app: crusoe-deployment
      spec:
        terminationGracePeriodSeconds: 0
        containers:
          - name: my-import-deployment
            image: ubuntu:24.04
            command: ["sleep", "infinity"]
            volumeMounts:
              - mountPath: "/opt/persistent-volume"
                name: myvolume
              - mountPath: "/opt/shared-volume"
                name: sharedvolume
        volumes:
          - name: myvolume
            persistentVolumeClaim:
              claimName: crusoe-persistent-pvc
              readOnly: false
          - name: sharedvolume
            persistentVolumeClaim:
              claimName: crusoe-shared-pvc
                readOnly: false
  5. Access the pod via 'exec' and verify configuration

    Example.

    $ kubectl exec -it crusoe-deployment-6fcfdfc4fb-xs9fk -- bash
    # ls -lrt /opt/
    total 4
    drwxrwxrwx. 2 root root 4096 Apr 29 16:05 shared-volume
    drwxr-xr-x  3 root root 4096 Apr 29 16:28 persistent-volume

Common Issues

  • Location Mismatch between CMK cluster and Disk Location: If disk and cluster lie in different locations, you may see something as follows in your pod logs.
AttachVolume.Attach failed for volume "crusoe-persistent-pv" : rpc error: code = Internal desc = failed to get result of disk attachment: operation failed: 
The disk location does not match the VM location. Please choose a disk in the same location as the VM and try again.
  • Persistent Disk Attached to a Instance: If your persistent disk is already attached to an instance, you may see something as follows in the logs.
AttachVolume.Attach failed for volume "crusoe-persistent-pv" : rpc error: code = Internal desc =failed to attach disk: 400 Bad Request
disk 'persistent-icat' (id: 9eddc28c-262b-4d24-ad3b-8c90ef8c3da7) is already attached in read-write mode to an instance (4534ff88-28k6-21bf-bdc2-76k98cbc8b2a).
persistent disks can only be attached to a single instance at a time in read-write mode
  • Attaching Shared disks to non-supported instances: Shared Disks attachments are supported only on the largest GPU VM sizes (e.g., l40s-48gb.10x or h100-80gb-sxm-ib.8x), and on any size for CPU-only VMs (e.g., c1a, s1a). If you are trying to attach to a non-supported VM, you may see the following in the logs.
AttachVolume.Attach failed for volume "crusoe-shared-pv" : rpc error: code = Internal desc = failed to get result of disk attachment for disk 7eddc28c-462b-8d24-pd3b-0c90ef8c3da7: 
operation failed: Shared volumes are not supported on this VM instance type.

Additional Resources

 

 

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Still need help?

Our support team is ready to assist you with any questions.

Have more questions? Submit a request

Recently Viewed

Comments

0 comments

Article is closed for comments.