zfs on 1 volume ?

benoitc

Member
Dec 21, 2019
173
9
23
Due to some order issues I only received one of the main disk for the system (M2 NVME) and i would like to start the setup. Is this possible to set it as zfs0 and then come back later? What coul dbe an issue?
 
You can create a single disk pool during installation and once you have the second disk and want to add it to create a mirror you can do so by following the guide to replace a failed ZFS boot disk [0] and instead of the zpool replace command you then run
Code:
zpool attach rpool <current disk> /dev/disk/by-id/<new disk>-part3

This should attach it as mirrored disk to the existing one.


[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_zfs_change_failed_dev
 
Last edited:
  • Like
Reactions: benoitc
You can create a single disk pool during installation and once you have the second disk and want to add it to create a mirror you can do so by following the guide to replace a failed ZFS boot disk [0] and instead of the zpool replace command you then run
Code:
zpool attach rpool <current disk> /dev/disk/by-id/<new disk>-part3

This should attach it as mirrored disk to the existing one.


[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_zfs_change_failed_dev
Thanks! Just to precise things but then setting it as raid0 during setup is enough right?

Screenshot 2020-11-13 at 15.47.44.png
 
Last edited:
for people that eventually came to this topic, what I did to attach the new disk was the following (based on this thread):

  1. replicate the current disk to the new disk:
    sgdisk --replicate=/dev/<device B> /dev/<device A>

  2. create a random uid
    sgdisk --randomize-guids /dev/<device B>

  3. install grub:
    grub-install /dev/<device B>

  4. finally attach the disk and wait
    zpool attach rpool<current disk id> /dev/disk/by-id/<newdisk id>

  5. You can check the status:

    Code:
    # zpool status
    pool: rpool
    state: ONLINE
    scan: resilvered 1.03G in 0 days 00:00:01 with 0 errors on Tue Nov 17 11:14:10 2020
    config:
    
    NAME STATE READ WRITE CKSUM
    rpool ONLINE 0 0 0
    mirror-0 ONLINE 0 0 0
    <disk id B> ONLINE 0 0 0
    <disk id A>  ONLINE       0     0     0
Hope it helps
 
Last edited: