Skip to main content
RunBook Academy

Proxmox VEVII · Shared StorageFile-level backends

CIFS/SMB and directory storage

Intermediate⏱ ~28 minpvesmmount

What you'll learn

  • Describe the standard directory layout and override it with content-dirs
  • Explain how an unmounted mount point fills the root filesystem, and configure against it
  • Add a CIFS storage with credentials stored correctly, and choose an SMB version
  • Say what qcow2 provides on a backend with no storage-level snapshots, and what it costs
  • Decide when a file-backed backend is the right answer and when it is a shortcut

Prerequisites

Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12

Not yet marked complete on this device.

Directory and CIFS are the backends people add without a design review. One is “a path”, the other is “the share the Windows team already gave us”. Both are legitimate answers to real problems, and both have a specific way of going wrong that the other backends do not.

They belong together because CIFS is the directory backend, extended with the options needed to mount a share. Everything about layout, formats and snapshots applies to both.

The directory backend

One required property — path, an absolute filesystem path — and a predefined layout underneath it:

Content typeSubdirectory
VM imagesimages/<VMID>/
ISO imagestemplate/iso/
Container templatestemplate/cache/
Backup filesdump/
Snippetssnippets/
Importimport/

That layout is why a directory storage’s volume IDs carry a path: local:141/vm-141-disk-1.qcow2 resolves to <path>/images/141/vm-141-disk-1.qcow2.

It is overridable. content-dirs takes a comma-separated list of vtype=path entries, each path relative to the storage mount point — useful when an existing share already has a layout you cannot change, or when you want backups on a different filesystem from images.

Configuration changea directory storage with a custom layout
pvesm add dir bulk-store \
--path /srv/bulk \
--content backup,iso,vztmpl \
--content-dirs backup=archives,iso=media/iso \
--prune-backups keep-daily=7,keep-weekly=4

pvesm status --storage bulk-store

Two more properties earn a decision:

preallocationoff, metadata, falloc or full, defaulting to metadata and treated as off for raw images. The documentation notes that on network storage with large qcow2 images, choosing off can help prevent timeouts, which is a real consideration on a slow NFS or CIFS target.

shared — as always, an assertion. On a directory backend it is almost always wrong; the exception is a directory whose path is a mount of something genuinely shared, in which case the shared backend’s own plugin is usually the better choice.

The failure that fills the root filesystem

This is the one to internalise, because it is silent, common, and the diagnosis looks nothing like the cause.

You add a disk, mount it at /srv/bulk, and add a directory storage pointing there. It works. Months later the node reboots, the mount fails — a changed UUID, a dead disk, an fstab typo, a systemd ordering problem — and /srv/bulk is now an ordinary empty directory on the root filesystem.

Proxmox VE does not notice. pvesm add defaults to create-base-path yes and create-subdirs yes, so the storage layer creates the directory tree it expects and carries on. Backups run. They write to /srv/bulk/dump on the root filesystem.

Configuration changemake the storage fail instead of filling the root filesystem
pvesm set bulk-store --create-base-path 0 --create-subdirs 0

pvesm status --storage bulk-store
Read-only / Safeprove the storage is on the filesystem you think it is
STORE_PATH=/srv/bulk

findmnt --target "$STORE_PATH"

df -h "$STORE_PATH"

pvesm status --storage bulk-store
Read-only / Safe
$ findmnt --target /srv/bulk
TARGET SOURCE    FSTYPE OPTIONS
/      /dev/mapper/pve-root ext4 rw,relatime,errors=remount-ro

The CIFS backend

CIFS is the directory backend plus a mount. Its extra properties:

PropertyMeaning
serverIP or DNS name. An IP avoids DNS lookup delays
shareThe share name. Discover them with pvesm scan cifs <address>
usernameDefaults to guest
passwordStored at /etc/pve/priv/storage/<STORAGE-ID>.pw, readable only by root
domainUser domain or workgroup
smbversionDefaults to 3. SMB1 is unsupported for security reasons
subdirA subdirectory of the share to use, defaulting to the share root
pathThe local mount point, defaulting to /mnt/pve/<STORAGE_ID>/
optionsExtra mount.cifs options; PVE already sets soft mode, credentials and domain
Configuration changeadd a CIFS storage for backups
pvesm add cifs backup-smb \
--server 192.0.2.40 \
--share backups \
--username svc-pve \
--domain EXAMPLE \
--smbversion 3 \
--subdir /site-a \
--content backup \
--prune-backups keep-daily=14,keep-monthly=6

pvesm status --storage backup-smb

Snapshots, and what qcow2 actually buys

Neither backend has snapshots of its own. The documentation is direct: most filesystems do not support snapshots out of the box, so the directory backend uses qcow2’s internal snapshot capability instead; and CIFS does not support snapshots at the storage level, but qcow2 backing files give you snapshots and cloning.

So on both backends:

  • raw — no snapshots, no linked clones, best performance.
  • qcow2 — snapshots and clones, thin allocation, at a performance cost and with one important caveat.

Key takeaways

  • CIFS is the directory backend plus a mount, so the layout, formats and snapshot behaviour are the same for both.
  • The standard layout is images/<VMID>/, template/iso/, template/cache/, dump/, snippets/, import/, and content-dirs overrides it with vtype=path entries relative to the storage mount point.
  • create-base-path and create-subdirs default to yes, which is why an unmounted filesystem results in PVE creating the tree on the root filesystem and writing there silently. Set both to 0 where the path only exists when mounted, and check with findmnt --target.
  • CIFS credentials live at /etc/pve/priv/storage/<STORAGE-ID>.pw, root-only but replicated to every node. Use a dedicated, narrowly scoped service account, and treat rotation as a coordinated change.
  • smbversion defaults to 3 and SMB1 is unsupported for security reasons.
  • Neither backend has storage-level snapshots. qcow2 supplies them, and creating or deleting an internal qcow2 snapshot blocks a running VM, so do not accumulate them and do not delete them during business hours.
  • PVE sets CIFS mounts to soft mode: a server hiccup produces an I/O error inside the guest rather than a hang. Good for backups, bad for disks.
  • Alert on the age of the newest successful backup, not only on job failure.

Knowledge check

Knowledge check · 5 questions

  1. Q1. A node with a 96 GB root and a 4 TB data disk runs out of root space overnight. The data disk failed to mount after a reboot, and a directory storage points at its mount point. Why did nothing report a storage error?

  2. Q2. A 2 TB VM disk in qcow2 format lives on a CIFS share. Deleting a snapshot during the working day causes the guest application to be declared dead by its cluster peers. What happened?

  3. Q3. Which of these are true of the CIFS backend in Proxmox VE 9? Select all that apply.

  4. Q4. Setting shared 1 on a directory storage is the standard way to enable live migration for guests whose disks live on it.

  5. Q5. A CIFS backup storage has been inactive for three weeks and nobody noticed, despite backup-failure alerting being configured. What alert would have caught it?

Passing score: 75%. Answers are checked in this browser.