mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-30 05:02:54 +08:00
Add files via upload
This commit is contained in:
parent
adabf1224b
commit
c8910697e7
33
ZFS/boojum-expand-raidz.sh
Normal file
33
ZFS/boojum-expand-raidz.sh
Normal 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
|
29
ZFS/boojum-expand-raidz2.sh
Normal file
29
ZFS/boojum-expand-raidz2.sh
Normal 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
|
16
ZFS/zpool-create-raidz-for-expansion.sh
Normal file
16
ZFS/zpool-create-raidz-for-expansion.sh
Normal 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'
|
17
ZFS/zpool-create-raidz2-for-expansion.sh
Normal file
17
ZFS/zpool-create-raidz2-for-expansion.sh
Normal 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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user