How to attach ZFS volume to PVE 5.2

turdor

Member
Apr 2, 2017
52
1
13
45
Good evening forum!
I have a HDD with a ZFS volume made in PVE 4.3.x, I stored all VM disks there, so:
how do I open/attach this volume in freshly installed PVE 5.2 please to read those VMs disks?
I installed PVE 5.2 on ZFS formatted volume as well.

I'm afraid I do not really understand all the concepts of ZFS, if there is an infographics or simple explanation with schematics to start with I would appreciate!

P.S. I suppose to have saved somewhere commands/method I created it with if its matter...

tyvm!
 
As long as your old volume is not part of rpool,that is the root pool if you install on zfs,
You just connect the old drive to host and run zfs import <pool name>.
You can run zfs import command first and it will list the names of pools that can be imported.
The command will import the pool into the same way it was setup on old system and mount it into the same mount point.
If you want to use different mount Google proper command options to set.
 
thanx for quick reply jim.bond.9862!!!
sounds perfect to me - will test and report back!

and if I will mount to PVE installed on ext4?
I really need more robust solution regarding missing UPS and other concerns till I make a proper setup...
 
pool imported, online, mounted, zpool list and zfs list shows it correctly

but I cannot see it on PVE web-interface!

Tested on different browsers, rested cash etc.
need to update something?
 
You will not see it still you add it as local store. But before you do read up the manuals and hold of if someone chime in here about adding pool with data to local store. Could be destructive so back up all somewhere else.
In my setup I used empty disks so not sure what happens if pool already have data.
That is just like you I had a separated set of disks designated as extra storage, since my setup is on mirrored 120gb ssd.
Too small to hold the system and vm info.
But I did not have any thing on the pool when I rebuild.
 
pool imported, online, mounted, zpool list and zfs list shows it correctly

but I cannot see it on PVE web-interface!

Tested on different browsers, rested cash etc.
need to update something?


zfs do not have anything like volume. If you imported your pool in pmx, then you need to use data center where you can add any zfs pool that is accessible in pmx host.
 
zfs do not have anything like volume. If you imported your pool in pmx, then you need to use data center where you can add any zfs pool that is accessible in pmx host.

thanx guletz, I kinda understand it, but how shall I call it then?

anyway - I have a hdd disk with ZFS pool named "storage01" created on another (dead now 4.3x PVE) server w all my guests (VM disks), so how do I open it on PVE 5.2-1 without destroying its data on this host plz? My target is to recreate those VMs and attache disks from this "storage01" ZFS pool

Shall I ...
Datcenter>Storage>Add>ZFS ?
and then what:
ID - ? (how shall I call it? is it important?)
ZFS Pool - storage01 (its there already, I just select it from dropdown menu)
Content - DiskImage, Container
Nodes - pve
(my only node)
Enable - seleted
Thin provisioning - selected
(?)
Block size - 8k (selected by default)

I HAVE A STRONG FEELING IT WILL ERASE ALL MY DATA INSIDE EXISTING ZFS POOL?!??!! lol how to NOT to erase its data plzzzz?

Anyway - I feel ZFS is a bit too much for me so I need to get red of it later as feel very nervous as do not really understand whats going on... LOL (not that funny actually)

thanx in advance!
 
additional info -
I can see "storage01" with
zpool list

I can see its contents w
zfs list

and it says I have a mount point /storage01
but it's content is empty, I cannot see anything from sftp client

from GUI I can see it only in pve>Disks, it says Usage-ZFS;
and I also can see it in Datacenter>Storage>Add>ZFS>ZFS Pool but nowhere else I can try
 
Last edited:
No do not add new pool.
If you already did the import you should be able to access the data. Unless something went wrong with import.
Can you elaborate on what exactly did you do step by step. And what your expectations are.
 
Hi,
Adding it via Datacenter>Storage>Add>ZFS is the equivalent of adding it manually to `/etc/pve/storage.cfg`:
Code:
zfspool: storage01
    pool storage01
    content rootdir,images
    sparse 1

Then you'll see it in the GUI as well (see https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_configuration).

Adding a new 'Disk' (via Datacenter>Node>Disk) is the option where a diskdrive gets formatted and added as ZFSPool - however this should not let you select a drive where you already have data on in the first place

hope this helps!
 
Hi,
Adding it via Datacenter>Storage>Add>ZFS is the equivalent of adding it manually to `/etc/pve/storage.cfg`:
Code:
zfspool: storage01
    pool storage01
    content rootdir,images
    sparse 1

Then you'll see it in the GUI as well (see https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_storage_configuration).

Adding a new 'Disk' (via Datacenter>Node>Disk) is the option where a diskdrive gets formatted and added as ZFSPool - however this should not let you select a drive where you already have data on in the first place

hope this helps!
Good to know. Thanks.
In fact I wish I knew that a few weeks ago.
It seams that OP is having similar issue I had last month, now that I re-read the initial post.
In my case the data was not important so I just redid the pool anew.
OP has a toughter task at hand.
 
Adding it via Datacenter>Storage>Add>ZFS is the equivalent of adding it manually to `/etc/pve/storage.cfg`:

Did work!
thanx so much Stoiko! - just a bit scary to manipulate data from last backup location available =P

Now way more simple question - how do I access this data from sftp client to backup manually these VM disks plz?
/storage01 folder is empty...
 
an if I will add a root from old system and give it another id - is it going to replace my current root and doom the system or is it gonna be mounted un a folder w its id?

I want to look inside the lost PVE4.x, may be restore VMs cfg files...
 
Aproveitando este post porque o assunto é o mesmo.

Testar servidor
Eu tenho um proxmox instalado em um disco ssd 60gb.
Eu criei dois zfs pool
raidz (02 discos) (2 tb)
raid10 (08 discos) (1 tb)

agora eu apaguei a instalação do ssd 60 gb.

Fiz uma nova instalação no SDS 60 GB.

minha esperança era que o proxmox reconhecesse
os dois zfs pool.

Não aconteceu.

Eu pesquisei como montar ou recriar o pool zfs sem perder as informações nesses pools.

Como exemplo e experiência, usando o debian com o mdadm, quando eu faço uma nova instalação, o mdam reconhece o disco de um pool (raid) e o monta.

No proxmox apesar da pesquisa eu não encontrei uma descrição exata sobre isso.

Qualquer orientação sobre isso, recuperar um pool criado em uma instalação anterior e colocado em uma nova instalação?

Agradecemos antecipadamente por sua orientação.
 
Taking advantage of this post because the subject is the same.

Test server.
I have a proxmox installed on a ssd 60gb disk.
I created two zfs pool
raidz (02 discs) (2 tb)
raid10 (08 discs) (1 tb)

now I deleted the installation of ssd 60 gb.

I made a new installation in SDS 60 GB.

my hope was that the proxmox recognized
the two zfs pool.

Did not happen.

I researched how to mount or recreate the zfs pool without losing the information in those pool.

As an example and experience, using debian with mdadm, when I do a new installation, mdam recognizes the disk of a pool (raid) and mounts it.

In the proxmox despite the research I did not find an exact description about it.

Any guidance on this, retrieve a pool created in a previous installation and placed in a new installation?

Thanks in advance for your guidance.
 
Follow proxmox image.
 

Attachments

  • Anotação 2019-03-29 151936.jpg
    Anotação 2019-03-29 151936.jpg
    199.1 KB · Views: 98
  • Anotação 2019-03-29 152006.jpg
    Anotação 2019-03-29 152006.jpg
    98.1 KB · Views: 92

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!