feat: add tapes index view

This commit is contained in:
Samuel N Cui
2023-10-03 16:12:44 +08:00
parent 15079aaa50
commit 999b9bf9b2
27 changed files with 1357 additions and 358 deletions
+12 -2
View File
@@ -1,6 +1,16 @@
#!/usr/bin/env bash
set -ex;
SG_DEVICE=`sg_map | grep ${DEVICE} | awk '{print $1}'`
ltfs -o devname=${SG_DEVICE} -o noatime -o sync_type=unmount -o work_directory=/opt/ltfs -o capture_index -o min_pool_size=256 -o max_pool_size=1024 -o eject -s ${MOUNT_POINT}
CURDIR=$(cd $(dirname $0); pwd);
SG_DEVICE=`${CURDIR}/get_device`
ltfs -o devname=${SG_DEVICE} -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index -o min_pool_size=256 -o max_pool_size=1024 -o eject -s ${MOUNT_POINT}
sleep 3
MOUNT_POINT_TARGET=`df ${MOUNT_POINT} --output=target | sed -n '1!p'`
if [[ $MOUNT_POINT != $MOUNT_POINT_TARGET ]]; then
echo "mount '$MOUNT_POINT' fail, current target is '$MOUNT_POINT_TARGET'" >&2
exit 1
fi
echo "mount '$MOUNT_POINT' success" >&2