2024-10-29 13:53:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
|
|
|
cd $DIR
|
|
|
|
|
|
|
|
if [ ! -f ./data/ext-workdir/dwarfs ]; then
|
|
|
|
time mkdwarfs -l 1 -i ./data/datasets/ -o ./data/ext-workdir/dwarfs
|
|
|
|
fi
|
|
|
|
mkdir ./data/mountpoints/dwarfs/
|
|
|
|
time dwarfs ./data/ext-workdir/dwarfs ./data/mountpoints/dwarfs/
|
|
|
|
|
|
|
|
# **DISABLED** - far too slow
|
|
|
|
#cd ./data/datasets/
|
|
|
|
#if [ ! -f ./data/ext-workdir/fuse-archive.tar.gz ]; then
|
|
|
|
# time tar -czf ../ext-workdir/fuse-archive.tar.gz .
|
|
|
|
#fi
|
|
|
|
#cd -
|
|
|
|
#mkdir ./data/mountpoints/fuse-archive-tar-gz/
|
|
|
|
#time fuse-archive ./data/ext-workdir/fuse-archive.tar.gz ./data/mountpoints/fuse-archive-tar-gz/
|
|
|
|
|
|
|
|
if [ ! -f ./data/ext-workdir/fuse-archive.tar ]; then
|
2024-10-29 22:34:44 -05:00
|
|
|
cd ./data/datasets/
|
2024-10-29 13:53:31 -05:00
|
|
|
time tar -cf ../ext-workdir/fuse-archive.tar .
|
2024-10-29 22:34:44 -05:00
|
|
|
cd -
|
2024-10-29 13:53:31 -05:00
|
|
|
fi
|
|
|
|
mkdir ./data/mountpoints/fuse-archive-tar/
|
|
|
|
time fuse-archive ./data/ext-workdir/fuse-archive.tar ./data/mountpoints/fuse-archive-tar/
|
|
|
|
|
|
|
|
# **DISABLED** - also too slow
|
|
|
|
#cd ./data/datasets/
|
|
|
|
#if [ ! -f ./data/ext-workdir/fuse-archive.tar.zst ]; then
|
|
|
|
# time bash -c 'tar -cf - . | zstd -1 - -o ../ext-workdir/fuse-archive.tar.zst'
|
|
|
|
#fi
|
|
|
|
#cd -
|
|
|
|
#mkdir ./data/mountpoints/fuse-archive-tar-zst/
|
|
|
|
#time fuse-archive ./data/ext-workdir/fuse-archive.tar.zst ./data/mountpoints/fuse-archive-tar-zst/
|
2024-10-29 22:34:44 -05:00
|
|
|
|
|
|
|
# btrfs-fuse is broken - ERROR: failed to scan device /dev/nvme0n1p3: -13
|
|
|
|
device=""
|
|
|
|
#mkdir ./data/mountpoints/btrfs-fuse
|
|
|
|
#sudo mount $device ./data/mountpoints/btrfs-fuse
|
|
|
|
#sudo chmod -R 777 ./data/mountpoints/btrfs-fuse/
|
|
|
|
#if [ ! -f ./data/mountpoints/btrfs-fuse/25G-null.bin ]; then
|
|
|
|
# cp -r ./data/datasets/* ./data/mountpoints/btrfs-fuse/
|
|
|
|
# sudo umount ./data/mountpoints/btrfs-fuse/
|
|
|
|
#fi
|
|
|
|
#btrfs-fuse $device ./data/mountpoints/btrfs-fuse
|