Add files via upload

This commit is contained in:
kneutron 2024-06-08 23:15:00 -06:00 committed by GitHub
parent c843a31b0d
commit 8df3367d4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,12 @@
# TODO EDITME before running! # TODO EDITME before running!
destdir=/mnt/macpro-sgtera2 destdir=/mnt/macpro-sgtera2
# Will be mounted on this server / local dir
sshfsmountthis=/Volumes/sgtera2
# destination directory on the remote side
# TODO add a subdir here for different systems
loginid=dave loginid=dave
# for sshfs # for sshfs
@ -20,6 +26,7 @@ destserver=macpro-static
# NOTE this **needs** to be the correct disk! # NOTE this **needs** to be the correct disk!
zfsroot=sdb zfsroot=sdb
# Obtain from /dev/disk/by-id # Obtain from /dev/disk/by-id
disktomir="ata-Samsung_Portable_SSD_T5_S49WNV0MC04217F-part3" disktomir="ata-Samsung_Portable_SSD_T5_S49WNV0MC04217F-part3"
# Obtain from zpool status -v # Obtain from zpool status -v
@ -57,14 +64,14 @@ if [ $(df -T |grep sshfs |grep -c $destdir) -eq 0 ]; then
# TODO change this to samba, nfs, whatever works for you # TODO change this to samba, nfs, whatever works for you
# TODO ssh-copy-id for passwordless access # TODO ssh-copy-id for passwordless access
sshfs -o Ciphers=chacha20-poly1305@openssh.com \ sshfs -o Ciphers=chacha20-poly1305@openssh.com \
$loginid@$destserver:/Volumes/sgtera2 $destdir $loginid@$destserver:$sshfsmountthis $destdir
fi fi
if [ $(df -T |grep -c $destdir) -eq 0 ]; then if [ $(df -T |grep -c $destdir) -eq 0 ]; then
failexit 40 "$destdir is not mounted, cannot proceed" failexit 40 "$destdir is not mounted, cannot proceed"
fi fi
cd $destdir # TODO add a subdir here for different systems cd $destdir
fdisk -l /dev/$zfsroot >fdisk-l-pve-zfs-bootroot.txt fdisk -l /dev/$zfsroot >fdisk-l-pve-zfs-bootroot.txt
# (OLD) # (OLD)
@ -145,6 +152,7 @@ watchresilver;
echo '' echo ''
echo "$(date) - Check results of scrub and ^C to abort, or Enter to offline the file-backed mirror" echo "$(date) - Check results of scrub and ^C to abort, or Enter to offline the file-backed mirror"
echo "(Waiting for input)"
read read
zpool offline rpool $destdir/$mirfile zpool offline rpool $destdir/$mirfile