usb-freenet: Set up USB devices for freenet.
This commit is contained in:
parent
ad7cb99cdb
commit
13b4326435
|
@ -1,2 +1,2 @@
|
|||
ssh hpdisk sudo reboot; time wssh hpdisk true = 6m41s
|
||||
ssh hpdisk sudo reboot; time wssh hpdisk true = 6m21s
|
||||
|
||||
|
|
18
hpdisk/usb-freenet
Normal file
18
hpdisk/usb-freenet
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
format_disk() {
|
||||
DISK="$1"
|
||||
name="$2"
|
||||
wipefs -a "$DISK"
|
||||
end_position=$(sgdisk -E $DISK | tail -1)
|
||||
sgdisk -n2:1M:$(( $end_position - (($end_position + 1) % 2048) )) -t2:BF01 $DISK
|
||||
sgdisk -c2:"$name" $DISK
|
||||
fdisk -l $DISK
|
||||
}
|
||||
|
||||
format_disk /dev/sdi freenet1TB
|
||||
format_disk /dev/sdj freenet80GB
|
||||
format_disk /dev/sdk freenet80GB2
|
||||
format_disk /dev/sdm freenet160GB
|
||||
|
||||
zpool create -O mountpoint=/freenet freenetpool freenet160GB freenet80GB freenet80GB2 freenet1TB
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo 1 > /sys/module/zswap/parameters/enabled
|
||||
echo z3fold > /sys/module/zswap/parameters/zpool
|
||||
echo zsmalloc > /sys/module/zswap/parameters/zpool
|
||||
echo 50 > /sys/module/zswap/parameters/max_pool_percent
|
||||
echo lz4 > /sys/module/zswap/parameters/compressor
|
||||
echo zstd > /sys/module/zswap/parameters/compressor
|
||||
grep -R . /sys/module/zswap/parameters
|
||||
grep -R . /sys/kernel/debug/zswap/
|
||||
# Do not overcommit memory
|
||||
echo 2 > /proc/sys/vm/overcommit_memory
|
||||
|
|
|
@ -161,7 +161,7 @@ m2grep() {
|
|||
eval "cat $(printf "|_mgrep \"%s\"" "$@")"
|
||||
}
|
||||
|
||||
(play -q -n synth sine F2 sine C3 remix - fade 0 4 .1 norm -20 bend 0.5,2477,2 fade 0 4.0 0.5 2>/dev/null &)
|
||||
(play -q -n synth sine F2 sine C3 remix - fade 0 4 .1 norm -20 bend 0.5,2477,2 fade 0 4.0 0.5 2>/dev/null &) 2>/dev/null
|
||||
|
||||
alias y=idok
|
||||
|
||||
|
|
Loading…
Reference in a new issue