Wait for all running tasks on that datastore to finish, from webUI set datastore to offline maintenance mode [1], then wait like one minute for proxmox-backup-server service to close all files in the datastore, unmount the drive and then you safely remove the drive. If in doubt, check with lsof...