mirror of
https://github.com/samuelncui/yatm.git
synced 2026-09-10 01:56:09 +00:00
feat: add tapes index view
This commit is contained in:
+12
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user