CIFS mount options

Liviu Sas

Member
Jun 11, 2018
26
5
23
45
Hello,

Is there a way to specify the mount options when mounting a cifs filesystem in ProxMox 5.2?
Currently I'm using a CIFS filesystem for backup and all my backups made using lzo fail to restore with a "Compressed data violation".
A backup with no compression fails with the error " tar: -: Cannot close: Input/output error"

After a bit of googling, I managed to reproduce the issue on another linux box, and managed to fix it using "wsize=98304" option while mounting the share.

Unfortunately I can't find a way to specify this option to a "CIFS" storage.

If I do a "pvesm set <storage> --options wsize=98304" I get an error "unable to parse value of 'options': unexpected property 'options'"

Cheers,
Liviu
 
HI,

if you need extra options you must mount the SMB share with fstab.
We do not support extra mount options.

Normally the wsize will negotiate automatically. What storage do you use that this does not work?
 
Hi Wolfgang,

I am using "CIFS" storage shared between nodes in the proxmox cluster to a windows 10 machine. I have tried multiple hard drives. Some connected via USB3 some SATA. Some hard drives using bitlocker and some not.
I actually tried another windows 10 box, and I have the same issue.

If I mount the share via fstab, can I still use it for backups?

Cheers.
Liviu
 
You have to mount the share over fstap and than add a Storage with Type "directory" to the mount path.
Also, you have to use the correct content type in this case "vzdump Backup file".
 
Thank you, I'll do that.

Would be good if the "options" could be added to the CIFS mounts in the future, as the cluster-wide cifs storage management is much nicer and cleaner solution.

Cheers,
Liviu
 
  • Like
Reactions: guletz and fireon
For anyone else who ends up here off a google search for this issue, here's a systemd script you can use since the regular mount dependency mechanisms don't work with proxmox managed mounts
INI:
[Unit]
Description=Change cifs mount options
[Service]
Type=oneshot
Environment=MOUNT=/etc/pve/mount-name
Environment=PASS=dontstorepassinplaintext
Environment=OPTS="group=storage"
ExecStart=bash -c "while ! mount | grep $MOUNT; do sleep 1; done"
ExecStart=mount -o remount,$OPTS,password=$PASS $MOUNT
[Install]
WantedBy=default.target
Don't use this config as-is. You should use some kind of secure password storage mechanism that a more responsible sysadmin would know about, and if you have many mounts it would make more sense to convert this to an instanced service and use environment files instead.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!