dmsetup remove_all
wipefs -a --force /dev/sda2
mkfs -t xfs -f -mreflink=0 /dev/sda2
mkdir -p /fs/sda2
modprobe xfs
mount -t xfs -o inode64 /dev/sda2 /fs/sda2
mkdir /export
mount -t tmpfs nfsv4_root_export /export
mkdir -p /export//fs/sda2
mount --bind /fs/sda2 /export//fs/sda2
echo '/export//fs/sda2 *(rw,no_subtree_check,no_root_squash)' >> /etc/exports
systemctl restart rpcbind
systemctl restart rpc-statd
systemctl restart nfs-idmapd
systemctl restart nfs-server
mkdir -p /nfs/sda2
timeout 5m mount -t nfs -o vers=4 localhost:/fs/sda2 /nfs/sda2
touch /nfs/sda2/wait_for_nfs_grace_period

for cpu_dir in /sys/devices/system/cpu/cpu[0-9]*
do
	online_file="$cpu_dir"/online
	[ -f "$online_file" ] && [ "$(cat "$online_file")" -eq 0 ] && continue

	file="$cpu_dir"/cpufreq/scaling_governor
	[ -f "$file" ] && echo "performance" > "$file"
done

postmark