Fix zpool datastore usb dev/by-id

elmarconi

Well-Known Member
Nov 28, 2017
50
15
48
56
Hi,

created a datastore zpool on attached usb disk, which at the time identified itself by /dev/sdi.
Need to change that to /dev/disk/by-id.
Tried https://plantroon.com/changing-disk-identifiers-in-zpool/#detach-and-attach

Want to export and import -d /dev/disk/by-id.

Bash:
root@pve-ML110:/etc/proxmox-backup# zpool status
  pool: PassPort2TB
 state: ONLINE
  scan: scrub repaired 0B in 12:34:54 with 0 errors on Sun Jul 11 12:58:56 2021
config:

        NAME         STATE     READ WRITE CKSUM
        PassPort2TB  ONLINE       0     0     0
          sdi        ONLINE       0     0     0

Bash:
root@pve-ML110:/etc/proxmox-backup# zpool export PassPort2TB
cannot unmount '/mnt/datastore/PassPort2TB': unmount failed
root@pve-ML110:/etc/proxmox-backup# umount /mnt/datastore/PassPort2TB/
umount: /mnt/datastore/PassPort2TB: target is busy.

Been looking at the "proxmox-backup-manager datastore " but can figure out how to use that.
Anyone care to hint me in the right direction(s)?
 
to prevent the daemons from accessing the datastores, temporarily stop them:
Code:
systemctl stop proxmox-backup proxmox-backup-proxy
then do the umount/export/import

and start them again afterwards:
Code:
systemctl start proxmox-backup proxmox-backup-proxy

edit: NOTE: just wanted to mention, stopping the daemons will abort all running tasks, so make sure no backups/restores/etc. are running
 
Last edited:
Works like magic!

Bash:
root@pve-ML110:/etc/proxmox-backup# zpool status
  pool: PassPort2TB
 state: ONLINE
  scan: scrub repaired 0B in 12:34:54 with 0 errors on Sun Jul 11 12:58:56 2021
config:

        NAME                                                    STATE     READ WRITE CKSUM
        PassPort2TB                                             ONLINE       0     0     0
          usb-WD_My_Passport_0820_567895678941343630385A54-0:0  ONLINE       0     0     0

errors: No known data errors

Thanks!