Add files via upload

This commit is contained in:
kneutron 2025-01-14 13:44:52 -07:00 committed by GitHub
parent adabf1224b
commit c8910697e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,33 @@
#!/bin/bash
# 2025.Jan kneutron
# Expand raidz with 1-2 disks for more free space
echo "o NOTE zfs-2.3.0-1 or higher is required!"
zfs -V
# checkver
# zfs -V |head -n 1 |tr -d 'zfs-' |tr -d '.-'
#2301
# xxx TODO EDITME
usedisk=vdg
#usedisk=vdh # 2nd run, comment above and uncomment thisline
zp=zraidzexpandtest
# zpool attach tank raidz1-0 sda
# REF: https://github.com/openzfs/zfs/pull/15022
# REF: https://arstechnica.com/gadgets/2021/06/raidz-expansion-code-lands-in-openzfs-master/
zpool status -v |awk 'NF>0'
echo '====='
echo "Enter to proceed expanding $zp with disk $usedisk / $(ls -l /dev/disk/by-path |grep $usedisk |head -n 1 |awk '{print $9}')"
read -n 1
time zpool attach $zp raidz1-0 $usedisk
echo "Enter to watch resilver or ^C"
read
zfs-watchresilver-boojum.sh
date

View File

@ -0,0 +1,29 @@
#!/bin/bash
# 2025.Jan kneutron
# Expand raidz2 with 1-2 disks for more free space
# NOTE zfs-2.3.0-1 or higher is required!
# xxx TODO EDITME
usedisk=vdo
#usedisk=vdp # 2nd run, comment above line and uncomment thisline
zp=zraidz2expandtest
# zpool attach tank raidz2-0 sda
# REF: https://github.com/openzfs/zfs/pull/15022
# REF: https://arstechnica.com/gadgets/2021/06/raidz-expansion-code-lands-in-openzfs-master/
zpool status -v |awk 'NF>0'
echo '====='
echo "Enter to proceed expanding $zp with disk $usedisk / $(ls -l /dev/disk/by-path |grep $usedisk |head -n 1 |awk '{print $9}')"
echo " or ^C to stop"
read -n 1
time zpool attach $zp raidz2-0 $usedisk
#echo "PK to watch resilver"
#read
zfs-watchresilver-boojum.sh $zp
date

View File

@ -0,0 +1,16 @@
#!/bin/bash
# 2025.Jan kneutron
echo "o NOTE zfs-2.3.0-1 or higher is required!"
zfs -V
zp=zraidzexpandtest
# vda=vdp avail; f=6
zpool create -o ashift=12 -o autoexpand=on -o autoreplace=off -O atime=off -O compression=lz4 \
$zp raidz1 \
vd{a..f}
zpool list -v
zpool status -v |awk 'NF>0'

View File

@ -0,0 +1,17 @@
#!/bin/bash
# 2025.Jan kneutron
echo "o NOTE zfs-2.3.0-1 or higher is required!"
zfs -V
# vdi..p avail for pool2
zp=zraidz2expandtest
zpool create -o ashift=12 -o autoexpand=on -o autoreplace=off -O atime=off -O compression=lz4 \
$zp raidz2 \
vd{i..n}
zpool list -v
zpool status -v |awk 'NF>0'