[solved]Re-add datastore to pbs

Elleni

Active Member
Jul 6, 2020
143
6
38
51
I have configured and used a local datastore for sync to a removable disk. Then removed the datastore and unattached the disk. I had removed the datastore, as else if just unplugging the usb disk, I had an error in dashboard usage because of the missing datastore.

Now a week later I want to re-attach the usb disk with the external datastore to redo a sync from the pbs-backup pool to the usb removable pool. When I try to add the datastore sandisk again, I get the error: unable to create chunk store 'sandisk' subdir "/backup5-srv/.chunks" -EEXIST: File exists.

zpool status shows the pool online.

zfs list -o name,mountpoint,mounted shows that the pool is mounted
Code:
zfs list -o name,mountpoint,mounted
NAME              MOUNTPOINT    MOUNTED
backup5-srv       /backup5-srv      yes
pbs-backup        /pbs-backup       yes
rpool             /rpool            yes
rpool/ROOT        /rpool/ROOT       yes
rpool/ROOT/pve-1  /                 yes
rpool/data        /rpool/data       yes

Trying to unmount the pool doesn't work either:
Code:
zfs unmount backup5-srv
umount: /backup5-srv: target is busy.
cannot unmount '/backup5-srv': umount failed

I then also deleted the remote named local and the sync job for this usb disk, that I had created for local sync to this usb disk described here.

What is the correct procedure to re-add the pool to my pbs server? And what is the correct procedure before removing the usb disk?

Is it on the roadmap to create a possibility that is easier, intuitive and maybe doable on the webinterface, to add an external, temporary, removable datastore for offsite backups?
 
Last edited:
What is the correct procedure to re-add the pool to my pbs server? And what is the correct procedure before removing the usb disk?
for now sadly the only possibility is to manually edit /etc/proxmox-backup/datastore.cfg to add it again. this way we do not try to create the chunkstore

if you want you can open a feature request on https://bugzilla.proxmox.com for that
maybe a 'disable' options would be enough, so one could temporarily disable/enable a datastore
alternatively an 'import/export' command like zfs has

also it would probably make sense to not trying to force create the .chunks dir when it already exists at the specified location
 
Hi and thanks for your reply.

I tried and edited said datastore.cfg
Code:
datastore: pbs-backup
        comment
        notify gc=error,sync=error,verify=error
        notify-user root@pam
        path /pbs-backup

datastore: sandisk
        comment
        notify gc=error,sync=error,verify=error
        notify-user root@pam
        path /backup5-srv

But there is an error apparently. What do I need to modify?

Dashboard datastore usage showing:
Code:
Bad Request (400)
parsing '/etc/proxmox-backup/datastore.cfg' failed: line 8 - syntax error (expected section properties)
 
Last edited:
can you post the complete file with 'cat -A'
i.e.
Code:
cat -A /etc/proxmox-backup/datastore.cfg
 
I tried to copy the part of the existing pbs-backup datastore and modify it.

Following the requested output:
Code:
root@pbs:~# cat -A /etc/proxmox-backup/datastore.cfg
datastore: pbs-backup$
^Icomment $
^Inotify gc=error,sync=error,verify=error$
^Inotify-user root@pam$
^Ipath /pbs-backup$
$
datastore: sandisk$
        comment$
        notify gc=error,sync=error,verify=error$
        notify-user root@pam$
        path /backup5-srv$

I don't see those ^I and $ is that the problem or are those marks expected comming from the -A switch of cat? Also I tried to modify from shell in webinterface and from direct ssh access - always using nano, but still the same.
 
Last edited:
no the problem is actually the missing space after 'comment', but this is not ... good. i'll see if i can fix that and send a patch. for now, please add a space after 'comment' or delete the line altogether
 
In the meantime - what are be the correct steps to correctly remove the removable usb disk? Is it sufficient to proxmox-backup-manager datastore remove datapool and have a second datastore.cfg for the next time I'll attach the removable datastore? Or should I do zpool export removable-pool, maybe even unmount the dataset first?
 
Last edited:

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!