Skip to content

Instantly share code, notes, and snippets.

@clemenko
Created June 11, 2025 00:05
Show Gist options
  • Save clemenko/3b216ed3059e4151850ad9467fe2610a to your computer and use it in GitHub Desktop.
Save clemenko/3b216ed3059e4151850ad9467fe2610a to your computer and use it in GitHub Desktop.

Pure Docker plugin

from https://hub.docker.com/r/purestorage/docker-plugin

Starting with Rocky 9.6

install docker

yum clean all; yum install -y vim yum-utils && yum-config-manager -y --add-repo https://download.docker.com/linux/centos/docker-ce.repo && yum install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin && mkdir -p /etc/docker && systemctl enable --now docker

install multipathd

yum install -y device-mapper-multipath libstoragemgmt-udev libstoragemgmt nfs-utils cryptsetup iscsi-initiator-utils kpartx; systemctl enable --now iscsid

sed -i '/CAPACITY_DATA_HAS_CHANGED/s/#ACTION/ACTION/' /usr/lib/udev/rules.d/90-scsi-ua.rules
systemctl restart systemd-udevd.service

cat << EOF > /etc/multipath.conf
defaults {
    user_friendly_names no
    enable_foreign "^$"
    polling_interval    10
}

devices {
    device {
        vendor                      "NVME"
        product                     "Pure Storage FlashArray"
        path_selector               "queue-length 0"
        path_grouping_policy        group_by_prio
        prio                        ana
        failback                    immediate
        fast_io_fail_tmo            10
        user_friendly_names         no
        no_path_retry               0
        features                    0
        dev_loss_tmo                60
        find_multipaths             yes
    }
    device {
        vendor                   "PURE"
        product                  "FlashArray"
        path_selector            "service-time 0"
        hardware_handler         "1 alua"
        path_grouping_policy     group_by_prio
        prio                     alua
        failback                 immediate
        path_checker             tur
        fast_io_fail_tmo         10
        user_friendly_names      no
        no_path_retry            0
        features                 0
        dev_loss_tmo             600
        find_multipaths          yes
    }
}

blacklist_exceptions {
        property "(SCSI_IDENT_|ID_WWN)"
}

blacklist {
      devnode "^pxd[0-9]*"
      devnode "^pxd*"
      device {
        vendor "VMware"
        product "Virtual disk"
      }
}
EOF

systemctl restart multipathd.service && udevadm control --reload-rules && udevadm trigger

install plugin

mkdir -p /etc/pure-docker-plugin /mnt/pure

cat << EOF > /etc/pure-docker-plugin/pure.json
{
    "FlashArrays": [
        {
            "MgmtEndPoint": "192.168.1.11",
            "APIToken": "3d84e613-c905-649a-2b7a-0bc8def997e9"
        }
    ]
}
EOF

docker plugin install purestorage/docker-plugin:v3.10 --alias pure --grant-all-permissions

create volume and use

docker volume create --driver=pure -o size=32GB test32

docker run -ti -v test32:/data ubuntu:25.04 /bin/bash

inspect

with docker volume inspect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment