ZFS Raid 01 to 1 / Recreate rpool

shorez

New Member
May 21, 2018
10
3
3
54
Germany
shorez.de
Hello there!
Right now I am running on rare disk configuration, I would like to get rid of.

Inventory:

They are set up like this:
Code:
  pool: rpool
 state: ONLINE
config:
        NAME                STATE     READ WRITE CKSUM
        rpool               ONLINE       0     0     0
          mirror-0          ONLINE       0     0     0
            sda2            ONLINE       0     0     0
            sdc2            ONLINE       0     0     0
          mirror-1          ONLINE       0     0     0
            sdb             ONLINE       0     0     0
            sdd             ONLINE       0     0     0

I would like to get rid of two of those disk, creating a regular raid1. Afterwards it should look similar to this:
Code:
  pool: rpool
 state: ONLINE
config:
        NAME                STATE     READ WRITE CKSUM
        rpool               ONLINE       0     0     0
          mirror-0          ONLINE       0     0     0
            sda             ONLINE       0     0     0
            sdb             ONLINE       0     0     0

It's probably not possible to achieve this without recreating the pool, but it still has to be done. I just don't know how. Reboots are fine.
 
Yes, you have to send/receive the pool off to another temporary pool and recreate the current pool. Maybe it's easier to reinstall PVE if you're not able to do this by yourself.

In the end, it'll look like this (mind the partitions):

Code:
  pool: rpool
 state: ONLINE
config:
        NAME                STATE     READ WRITE CKSUM
        rpool               ONLINE       0     0     0
          mirror-0          ONLINE       0     0     0
            sda2            ONLINE       0     0     0
            sdc2            ONLINE       0     0     0

What are you doing with the other 2 disks?
 
Thank you. The setup was just temporary after all. Started as a stripe of two ssd's, the other two ones got added for redundancy. Was never meant to run in production but exactly this is the case right know. I want to remove two ssd's and leave only the pve install on the rpool, while moving the actual vm images to a bigger, hdd+slog pool.

I'm just asking for any things to watch out for .. I mean at least it's the root pool, somewhere sits grub, etc. I just don't want to screw any boot stuff. So asking in a more concise way:

How do I transfer all relevant data to a new pool, including all information needed for booting and mark this new pool as the one to boot from?
 
How do I transfer all relevant data to a new pool, including all information needed for booting and mark this new pool as the one to boot from?

That is hard, but possible if you do not have a ZFS-based rescue system and the knowledge to do that. Best way is - if you do not want to go deep into this - just backup all you stopped VMs, copy them to another machine and reinstall PVE using only two disks attached.

If you still want to dive into it, play it through with another machine as destination (or even a VM). There is no step-by-step workthrough, so I just give you some pointers that do something similar:

https://github.com/zfsonlinux/zfs/wiki/Debian-Stretch-Root-on-ZFS (boot stuff)
man zfs (send/receive) stuff
 

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!