[SOLVED] Expanding rpool to bigger disk

Ivan Dimitrov

Well-Known Member
Jul 14, 2016
64
7
48
40
Hi, I have installed ProxMox 6.1 on mirrored pool with systemd-boot. I wanted to migrate to bigger single disk but I think I screwed up the sequence of operations. This is what I have done so far:
- Initial state:
- mirrored rpool 2x250GB
- autoexpand=off

- Executed operations:
- dd one of the pooled disks to the new 400GB disk (I used dd instead of attaching the disk to the pool in order to avoid screwing the creation of new partition table and avoid copying bootloader and risk not booting system.)
- remove the 2x250GB disks from the system
- The rpool was in degraded state. I have removed the missing disk with zpool detach rpool /dev/<old_disk>
- set autoexpand=on
- zpool online -e rpool /dev/nvme (I have tried this when the disk is mounted and from live image - no effect)

- Current disk status
- the system boots and works normally.
- rpool is still shown with the size of the old 250GB disks
Code:
zpool list rpool
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
rpool   236G  51.6G   184G        -         -    43%    21%  1.00x    ONLINE  -

Any idea how to expand the pool to the full disk size without creating mirror pool and reshuffling the data?
Thanks.

zdb output:
Code:
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 2900932
    pool_guid: 1410778047723683399
    errata: 0
    hostid: 893736543
    hostname: 'hyper-convergence'
    com.delphix:has_per_vdev_zaps
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 1410778047723683399
        create_txg: 4
        children[0]:
            type: 'disk'
            id: 0
            guid: 9306575638810125867
            path: '/dev/nvme1n1p3'
            whole_disk: 0
            metaslab_array: 256
            metaslab_shift: 31
            ashift: 12
            asize: 255517786112
            is_log: 0
            DTL: 282
            create_txg: 4
            expansion_time: 1585472028
            com.delphix:vdev_zap_leaf: 131
            com.delphix:vdev_zap_top: 129
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
 
did you expand the third partition on the NVME to the new larger size?
 
did you expand the third partition on the NVME to the new larger size?
I haven't expanded the partition because I don't see the additional space anywhere.

Code:
fdisk -p /dev/nvme1n1
Device           Start       End   Sectors  Size Type
/dev/nvme1n1p1      34      2047      2014 1007K BIOS boot
/dev/nvme1n1p2    2048   1050623   1048576  512M EFI System
/dev/nvme1n1p3 1050624 500118158 499067535  238G Solaris /usr & Apple ZFS

Code:
zpool list  rpool
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
rpool   236G  51.8G   184G        -                    -               44%    21%  1.00x    ONLINE  -

From what I have read the free space should be visible in EXPANDSZ and zpool online -e rpool /dev/nvme should have assigned it to free space.
 
Try using parted. You might have to install it with apt install parted.
Code:
# parted /dev/nvme1n1
(parted) print
Should prompt you with a message that the disk is bigger than the partition table says and if it should fix the partition table accordingly. After that you should be able to resize the partition.
Code:
(parted) resizepart 3 100%

Taken from: https://pve.proxmox.com/wiki/Resize_disks#Online_for_Linux_Guests
 
Thanks a lot that helped. I was so focused on the zfs part and expecting it to automatically expand that I didn't even consider other tools to expand the GPT table.

Code:
parted /dev/nvme1n1
Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  1049kB  1031kB                     bios_grub
 2      1049kB  538MB   537MB   fat32              boot, esp
 3      538MB   400GB   400GB   zfs
 

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!