start to prepare to do btrfs

This commit is contained in:
Christoph Cullmann 2024-10-28 21:27:17 +01:00
parent c73b0bb62b
commit c5c2372749
No known key found for this signature in database

View file

@ -33,42 +33,30 @@ HOST=neko
# ensure 4k sector size # ensure 4k sector size
nvme format --lbaf=1 --force $DISK nvme format --lbaf=1 --force $DISK
nvme id-ns -H $DISK nvme id-ns -H $DISK
sleep 5 sleep 5
# create partition table on all disks and EFI partition
for D in $DISK $DISK2 $DISK3; do
# kill old data # kill old data
sgdisk --zap-all $DISK sgdisk --zap-all $D
blkdiscard -v $DISK blkdiscard -v $D
wipefs -a $DISK wipefs -a $D
gdisk -l $DISK
# wipe second disk
sgdisk --zap-all $DISK2
blkdiscard -v $DISK2
wipefs -a $DISK2
# wipe third disk
sgdisk --zap-all $DISK3
blkdiscard -v $DISK3
wipefs -a $DISK3
sleep 5 sleep 5
# create partitions # create partitions
parted $DISK -- mklabel gpt parted $D -- mklabel gpt
sgdisk -n 1:0:+1024M -c 1:"EFI System Partition" -t 1:EF00 $DISK sgdisk -n 1:0:+1024M -c 1:"EFI System Partition" -t 1:EF00 $D
sgdisk -n 2:0:0 -c 2:"Linux" -t 2:8e00 $DISK sgdisk -n 2:0:0 -c 2:"Linux" -t 2:8e00 $D
parted $DISK -- set 1 boot on parted $D -- set 1 boot on
sleep 5 sleep 5
# take a look
cat /proc/partitions
# boot partition # boot partition
mkfs.fat -F 32 -n EFIBOOT $DISK-part1 mkfs.fat -F 32 -n EFIBOOT $D-part1
sleep 5 sleep 5
done
# take a look at the partitions
cat /proc/partitions
# ZFS zpool creation with encryption # ZFS zpool creation with encryption
zpool create \ zpool create \