Using CIFS/NFS as datastore

I am interested in how you did this. I too want to use my Synology with PBS and a NFS share. How did you get Proxmox to see it?
After you installed PBS, you need to install the CIFS and NFS packages (libnfs12-utils and cifs-utils if I'm not wrong), then create your mountpoint somewhere and set the user and group owner to "backup:backup"
Create your share in the Synology and set NFS permissions to the PBS ip, but connect the share in CIFS first, then add a new datastore in PBS where the CIFS share is mounted
It will go in timeout if you created from from the web console, but that's normal, after some minutes it should appear as a new datastore
Before rebooting, set in the fstab the same NFS share you used with CIFS then do a clean reboot, everything should be working fine (including prune, unlike CIFS)
 
After you installed PBS, you need to install the CIFS and NFS packages (libnfs12-utils and cifs-utils if I'm not wrong), then create your mountpoint somewhere and set the user and group owner to "backup:backup"
Create your share in the Synology and set NFS permissions to the PBS ip, but connect the share in CIFS first, then add a new datastore in PBS where the CIFS share is mounted
It will go in timeout if you created from from the web console, but that's normal, after some minutes it should appear as a new datastore
Before rebooting, set in the fstab the same NFS share you used with CIFS then do a clean reboot, everything should be working fine (including prune, unlike CIFS)
I am very new to this and do not know how to create the mount point you reference. I am sure I can use the apt-get for the packages correct?
 
No, your method is wrong, it could not be safe.
PBS's mount points should be corrected before release. At this point, this is beta software for CIFS / NFS / iSCSI.
 
No, your method is wrong, it could not be safe.
PBS's mount points should be corrected before release. At this point, this is beta software for CIFS / NFS / iSCSI.
Please explain. I have not started yet and would like the most straightforward method without too many challenges. Thanks!
 
CIFS is flawed by prune and delete
NFS can't create a datastore, EPERM error, that mean there is an underlying permission problem too
iSCSI is ... well, if someone could find a good working tutorial to mount iSCSI without the same EPERM problem than NFS, I will take it.

So, PBS for now is only for local storage, that mean using PBS into PVE and mount external disks is not working (excluding the case where you add local disks to PBS into PVE, it's illogical for a backup).
 
so.. news about this? i try cifs + samba, work but i cant prune or delete... nfs create datastore but backups dont work... system get stuck.

create a datastore with cifs then mount nfs before restar how someone wirte is a work solution?
 
so.. news about this? i try cifs + samba, work but i cant prune or delete... nfs create datastore but backups dont work... system get stuck.

create a datastore with cifs then mount nfs before restar how someone wirte is a work solution?

I'm using a CIFS / SMB share without issues - including prune / delete - since a few weeks. Based on Feedback in various Threads seems like most important is a updated Kernel Version as well custom mount options, at least it worked for me that way.

----------
root@pbs1:~# uname -a
Linux pbs1 5.9.16-1 #1 SMP 5.9.16-1 generic (Mon, 21 Dec 2020 14:11:06 +0000) x86_64 GNU/Linux

root@pbs1:~# proxmox-backup-manager version
proxmox-backup-server 1.0.6-1 running version: 1.0.6
----------


1)
Upgrade to 5.9 Edge Kernel as potential Workaround for https://bugzilla.proxmox.com/show_bug.cgi?id=2941 and https://forum.proxmox.com/threads/gc-error.74353/#post-331798
Kernel Source: https://github.com/fabianishere/pve-edge-kernel

Bash:
mkdir /tmp/pve-edge-kernel
cd /tmp/pve-edge-kernel
wget https://github.com/fabianishere/pve-edge-kernel/releases/download/v5.9.16-1/pve-edge-kernel-5.9.16-1_5.9.16-1_amd64.deb
apt install ./pve-edge-kernel-5.9.16-1_5.9.16-1_amd64.deb


2)
Automount via Systemd is also quite stable regarding reconnects, to avoid issues with PBS following mount options should be applied, doesn't matter if you use systemd or just a manual fstab entry:

Bash:
iocharset=utf8,rw,credentials=/path_to_credentials.file,uid=34,noforceuid,gid=34,noforcegid,file_mode=0660,dir_mode=0770
 
  • Like
Reactions: hki
hi!
all of this approaches seems a little bit hacky, why does PBS not support remote storage by default? is this an near planned upcomming feature?

regards, volker.
 
  • Like
Reactions: C.G.B. Spender
1)
Upgrade to 5.9 Edge Kernel as potential Workaround for https://bugzilla.proxmox.com/show_bug.cgi?id=2941 and https://forum.proxmox.com/threads/gc-error.74353/#post-331798
Kernel Source: https://github.com/fabianishere/pve-edge-kernel

Bash:
mkdir /tmp/pve-edge-kernel
cd /tmp/pve-edge-kernel
wget https://github.com/fabianishere/pve-edge-kernel/releases/download/v5.9.16-1/pve-edge-kernel-5.9.16-1_5.9.16-1_amd64.deb
apt install ./pve-edge-kernel-5.9.16-1_5.9.16-1_amd64.deb
thx for reply, ill try it, same error , backup ok but prune/delete dont work

anyways i cant update kernel , all proced without errors but kernel is 5.4 with uname -a even reboot pbs.
psb is a vm in pve..
what i do wrong?
 
Last edited:
I just wanted to add in here that I had the same issues. Here's my workaround:
  1. Set up your NFS share owned by "backup:backup"
  2. Set up an fstab entry to mount the share under /mnt/Backups, but leave it commented out for now.
  3. In the GUI, create a normal datastore under "/mnt/Backups".
  4. Then mount the backup NFS share in /mnt/tmp.
  5. cp -r /mnt/Backups/.lock /mnt/Backups/.chunks /mnt/tmp
  6. rm -r /mnt/Backups/.lock and rm -r /mnt/Backups/.chunks
  7. uncomment the fstab entry
  8. reboot and remove the /mnt/tmp directory. the NFS share should be mounted under /mnt/Backups now
  9. Add PBS to Proxmox and backup normally.
Hope this helps someone!
 
  • Like
Reactions: steelghost and xcj
CIFS works here OK using the additional uid=34,noforceuid,gid=34,noforcegid mountoptions (numbers are from id backup

Note, on datastore create we pre-allocate quite a few directories (2^16), on local filesystem this can happen relatively fast (~ 1s) but on a network attached storage it can take a few minutes. Currently, this does not run in a task (that's planned), so the webinterface aborts the connection after 30 seconds, but the backend still finishes the allocation (you can check the syslog) - so the datastore should actually appear after a few minutes even if it times out.

An alternative is using the CLI for this one-time addition, for example:
Bash:
proxmox-backup-manager datastore create NAME /mnt/tl-cifs/dest

NFS can be more troublesome, especially if not NFSv4 with id mapping.
I just tried to access CIFS-Volume from PBS, mounted drive at mounting point /mnt/rs1219; afterwords I used "Proxmox-backup-manager datastore create rs1219 /mnt/rs1219" to make this mount accessible in PBS, but I get an error in dashboard for the datastore:

Bad Request (400)
Permission denied (os error 13)

Any hint what's my mistake?

Kind regards

Martin
 
CIFS works here OK using the additional uid=34,noforceuid,gid=34,noforcegid mountoptions (numbers are from id backup

Note, on datastore create we pre-allocate quite a few directories (2^16), on local filesystem this can happen relatively fast (~ 1s) but on a network attached storage it can take a few minutes. Currently, this does not run in a task (that's planned), so the webinterface aborts the connection after 30 seconds, but the backend still finishes the allocation (you can check the syslog) - so the datastore should actually appear after a few minutes even if it times out.

An alternative is using the CLI for this one-time addition, for example:
Bash:
proxmox-backup-manager datastore create NAME /mnt/tl-cifs/dest

NFS can be more troublesome, especially if not NFSv4 with id mapping.
I thank you. It worked for me too. By adjusting the UID, the vHost can also write backups.
 
I have the same problem using cifs with a share on my synology nas.
I have setup the fstab like this:

Code:
//192.168.0.110/pve_backup /mnt/backup cifs credentials=/root/.smbcredentials,defaults,uid=1024,gid=100,noforceuid,noforcegid,noauto,nofail,x-systemd.automount,x-systemd.requires=network-online.target 0 0

I've entered the UID and GID of the admin user on my Synology nas. (User admin group users)

- Mounting works fine,
- I was also able to create the backup storage.
- I can see the created .chunks directory on the network share
- when running "df -h" I also get the correct total and available space of the volume

but on the Dashboard as well as when I try to setup a backup job I get the same error as Martin_Fischer

Code:
Bad Request (400)
Permission denied (os error 13)

Any help is greatly appreciated

Best regards
Bastian
 
I just wanted to add in here that I had the same issues. Here's my workaround:
  1. Set up your NFS share owned by "backup:backup"
  2. Set up an fstab entry to mount the share under /mnt/Backups, but leave it commented out for now.
  3. In the GUI, create a normal datastore under "/mnt/Backups".
  4. Then mount the backup NFS share in /mnt/tmp.
  5. cp -r /mnt/Backups/.lock /mnt/Backups/.chunks /mnt/tmp
  6. rm -r /mnt/Backups/.lock and rm -r /mnt/Backups/.chunks
  7. uncomment the fstab entry
  8. reboot and remove the /mnt/tmp directory. the NFS share should be mounted under /mnt/Backups now
  9. Add PBS to Proxmox and backup normally.
Hope this helps someone!
Had the same problem, this worked , in my case it was SMB/CIFS, not NFS.
The copy on STEP 5 took 7 hours in my case.
 
Had the same problem, this worked , in my case it was SMB/CIFS, not NFS.
The copy on STEP 5 took 7 hours in my case.
I followed @783923875's method.

By chance could someone using the fstab method and NFS share their entry? I can get it to load and can see the directory and '.lock' & 'block' but PBS does not see it. Also noticed that the Group for the mounted directory is odd; Not root or backup but a string of numbers so I figure it is related to my fstab entry.

Code:
192.168.x.x:/mnt/RAID/PBSBackup /mnt/Backups  nfs      defaults    0       0
 
I followed @783923875's method.

By chance could someone using the fstab method and NFS share their entry? I can get it to load and can see the directory and '.lock' & 'block' but PBS does not see it. Also noticed that the Group for the mounted directory is odd; Not root or backup but a string of numbers so I figure it is related to my fstab entry.

Code:
192.168.x.x:/mnt/RAID/PBSBackup /mnt/Backups  nfs      defaults    0       0
Took almost a day but just figured out my error. It was related to the permissions on the dataset from the NFS. I had to make sure that those were set to backup:backup as well even though I had them listed pretty much everywhere else.

System now reboots and automounts NFS without error and sees the NFS volume as a dataset.
 
I just wanted to add in here that I had the same issues. Here's my workaround:
  1. Set up your NFS share owned by "backup:backup"
  2. Set up an fstab entry to mount the share under /mnt/Backups, but leave it commented out for now.
  3. In the GUI, create a normal datastore under "/mnt/Backups".
  4. Then mount the backup NFS share in /mnt/tmp.
  5. cp -r /mnt/Backups/.lock /mnt/Backups/.chunks /mnt/tmp
  6. rm -r /mnt/Backups/.lock and rm -r /mnt/Backups/.chunks
  7. uncomment the fstab entry
  8. reboot and remove the /mnt/tmp directory. the NFS share should be mounted under /mnt/Backups now
  9. Add PBS to Proxmox and backup normally.
Hope this helps someone!
Registered an account just to say that this worked like a charm for me :D
 
  • Like
Reactions: Johannes S

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!