[SOLVED] Rename tank storage name in second node

Feb 25, 2019
19
0
6
41
Hello everyone,
I have 2 node server (PVE1 - PVE2) with proxmox inside.

I need to clone my VM from PVE1 on PVE2.
But the operation don't done because in PVE2 doesn't exist the storage "Tank1"

Infact in PVE2 isn't Tank1 but is Tank2.

So... How can I rename tank2 in tank1 in PVE2 Storage?

Code:
dir: local
        path /var/lib/vz
        content backup,iso,vztmpl

zfspool: tank1
        pool tank1
        content images,rootdir
        nodes pve1

zfspool: local-zfs
        pool rpool/data
        content rootdir,images
        sparse 1

zfspool: tank2
        pool tank2
        content rootdir,images
        nodes pve2
        sparse 1

This is my storage.cfg in /etc/pve/storage.cfg
I edit this file but doesn't work... In LVM exist again tank2

Thanks a lot!
 
You can use 'zpool export' and 'zpool import' and choose a new name for the pool when importing. (see 'man zpool')
 
Ok... Don't work...
Can't mount tank2...
And now my zpool status is:
Code:
pool: rpool
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            sdg3    ONLINE       0     0     0
            sdh3    ONLINE       0     0     0

errors: No known data errors

  pool: tank2
 state: ONLINE
  scan: none requested
config:

        NAME                              STATE     READ WRITE CKSUM
        tank2                             ONLINE       0     0     0
          raidz1-0                        ONLINE       0     0     0
            wwn-0x5000cca02f2ddb08        ONLINE       0     0     0
            wwn-0x5000cca02f2dda98        ONLINE       0     0     0
            wwn-0x5000cca02f23b05c        ONLINE       0     0     0
            wwn-0x5000cca02f23dd9c        ONLINE       0     0     0
            wwn-0x5000cca02f23cbe4        ONLINE       0     0     0
            wwn-0x5000cca02f2e12d8        ONLINE       0     0     0
        logs
          mirror-1                        ONLINE       0     0     0
            wwn-0x55cd2e414d5b2f2b-part5  ONLINE       0     0     0
            wwn-0x55cd2e414d5b2ee8-part5  ONLINE       0     0     0
        cache
          wwn-0x55cd2e414d5b2f2b-part4    ONLINE       0     0     0
          wwn-0x55cd2e414d5b2ee8-part4    ONLINE       0     0     0

errors: No known data errors

I lost the name of the disk... (sda / sdb). PVE2 Work, but i havn't name but his serial... Why?
 
What were the concrete commands you executed? (Please post them in the correct order)
If you still have the output of those commands, please post them as well.
ZFS labels the disks with portable EFI labels (see 'man zpool' -> 'zpool export').
 
Code:
zpool export tank2

zpool import tank1 (wrong name and zpool didn't make the operation "Cannot import 'tank1': no such pool available")

zpool import tank2 tank1 (Error "Cannot import 'tank2': no such pool available")

zpool status and exit the list without sda, sdb, sdc, sdd, ...
 
You can list all pools available for import with just 'zpool import'. What is the output of 'zpool import' after a 'zpool export tank2'?
 
Code:
root@pve2:/dev# zpool export tank2
root@pve2:/dev# zpool import
   pool: tank2
     id: 7758790164637552920
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

        tank2                             ONLINE
          raidz1-0                        ONLINE
            wwn-0x5000cca02f2ddb08        ONLINE
            wwn-0x5000cca02f2dda98        ONLINE
            wwn-0x5000cca02f23b05c        ONLINE
            wwn-0x5000cca02f23dd9c        ONLINE
            wwn-0x5000cca02f23cbe4        ONLINE
            wwn-0x5000cca02f2e12d8        ONLINE
        cache
          wwn-0x55cd2e414d5b2f2b-part4
          wwn-0x55cd2e414d5b2ee8-part4
        logs
          mirror-1                        ONLINE
            wwn-0x55cd2e414d5b2f2b-part5  ONLINE
            wwn-0x55cd2e414d5b2ee8-part5  ONLINE
 
It says 'The pool can be imported using its name or numeric identifier.'. You should be able to import it with 'zpool import tank2 tank1' as long as that's the case.
And I already mentioned the reason why it's no longer using 'sda' etc.. ZFS uses those labels for portability. This has no impact on operation.
 
I try again... But it doesn't work.
"Cannot import 'tank2': no such pool available"

I also try
Code:
zpool export tank2
zpool import 7758790164637552920 tank1
cannot import '7758790164637552920': no such pool available
 
In our tests here it works. Are there any error messages in dmesg or the journal?
 
I think to resolve.
I need to use not only EXPORT and IMPORT zpools command, but also DETACH.

In my case i lost my VM, but in this moment isn't production status yet. So after changed the name, I cloned my default VM on PVE1 and restarted.

Thanks Mira again!
 

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!