meta data for this page
This is an old revision of the document!
Move root to ZFS
Based on Debian Buster Root on ZFS
Prepare new disc
DISK=/dev/disk/by-id/scsi-SATA_disk1 sgdisk --zap-all $DISK sgdisk -a8 -n1:24K:+1000K -t1:EF02 $DISK # grub bios sgdisk -n2:1M:+256M -t2:EF00 $DISK # EFI sgdisk -n3:0:+512M -t3:BF01 $DISK # /boot sgdisk -n4:0:0 -t4:BF00 $DISK # rpool
Create boot pool
zpool create \ -o ashift=12 -d \ -o feature@async_destroy=enabled \ -o feature@bookmarks=enabled \ -o feature@embedded_data=enabled \ -o feature@empty_bpobj=enabled \ -o feature@enabled_txg=enabled \ -o feature@extensible_dataset=enabled \ -o feature@filesystem_limits=enabled \ -o feature@hole_birth=enabled \ -o feature@large_blocks=enabled \ -o feature@lz4_compress=enabled \ -o feature@spacemap_histogram=enabled \ -o feature@zpool_checkpoint=enabled \ -O acltype=posixacl -O canmount=off -O compression=lz4 \ -O devices=off -O normalization=formD -O relatime=on -O xattr=sa \ -O mountpoint=/boot -R /bpool \ bpool ${DISK}-part3
create root pool
zpool create \ -o ashift=12 \ -O acltype=posixacl -O canmount=off -O compression=lz4 \ -O dnodesize=auto -O normalization=formD -O relatime=on \ -O xattr=sa -O mountpoint=/ -R /rpool \ rpool ${DISK}-part4
prepare filesystem
zfs create -o canmount=off -o mountpoint=none rpool/ROOT zfs create -o canmount=off -o mountpoint=none bpool/BOOT
zfs create -o canmount=noauto -o mountpoint=/ rpool/ROOT/debian mkdir -p /rpool/ROOT/debian zfs set mountpoint=/rpool/ROOT/debian rpool/ROOT/debian zfs mount rpool/ROOT/debian zfs create -o mountpoint=/boot bpool/BOOT/debian mkdir -p /bpool/BOOT/debian zfs set mountpoint=/bpool/BOOT/debian bpool/BOOT/debian
DONT FORGET TO ADD NEXT MIRROR DEVICE DRIVE TO ZFS POOLS:
- bpool
- rpool
/dev/sda1 1MB BIOS boot
/dev/sda2 512MB EFI System
vfat
/dev/sda3 rest zfs_member
rpool 136G 314G 104K /rpool rpool/ROOT 5,79G 314G 96K /rpool/ROOT rpool/ROOT/pve-1 5,79G 314G 5,79G /