Add files via upload

This commit is contained in:
kneutron 2024-11-27 13:12:41 -07:00 committed by GitHub
parent 687adab5b1
commit 5677d4df0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 239 additions and 0 deletions

14
OSX/freshinstall-mac.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# /opt/local/bin/bash
port-install.sh -N bash bwm-ng sysstat joe
#port-install.sh -N mc +sftp
port-install.sh -N grsync xaos md5sha1sum openjdk11 mutt mediainfo geeqie \
putty shellcheck gawk jc jq sxiv unison lf inetutils nomacs kitty \
tmux byobu html2text flock gptfdisk gsed pv watch parallel findutils \
nmap imagemagick buffer lame veracrypt git rclone mediainfo
# TODO ntp
# ristretto build fail 2023.0321
# atom no longer avail

View File

@ -0,0 +1,23 @@
#!/bin/bash
# no usrlocalbin - that 4 brew
PATH=/var/root/bin:/var/root/bin/boojum:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/opt/local/bin:
# avoid conflicts/errs with brewstuff
mv -v /usr/local/include /usr/local/notinclude
# no lsof; hfstar build failed
port -N install autossh bash bwm-ng bzip2 cmatrix coreutils curl detox ffmpeg flock gnutar gptfdisk grsync \
gsmartcontrol gstreamer1 htop iftop imagemagick iperf3 joe lame lftp lz4 lzma lzo2 lzop nmap p7zip \
parallel pidof pigz pstree pv smartmontools ssh-copy-id sshfs util-linux watch youtube-dl yt-dlp \
wget zstd
#port uninstall mc
#port clean mc
#port install mc +sftp
[ -e /usr/local/notinclude ] && mv -v /usr/local/notinclude /usr/local/include
date
exit;

View File

@ -0,0 +1,17 @@
#!/bin/bash
# REF: https://discussions.apple.com/thread/255859460?sortBy=rank
# https://www.macworld.com/article/673697/what-version-of-macos-can-my-mac-run.html
cd ~/Downloads
softwareupdate --list-full-installers
echo "Enter version"
read instversion
[ "$instversion" = "" ] && exit 99;
# As of Nov 25, 2024 - Monterey
time softwareupdate -d --fetch-full-installer --full-installer-version $instversion # 12.7.6
date

View File

@ -0,0 +1,20 @@
#!/bin/bash
# Make bootable MacOS / OSX 12.7 install media
# REF: https://krypted.com/mac-os-x/create-bootable-installation-media-high-sierra-installations/
# REF: https://osxdaily.com/2022/02/23/make-macos-monterey-boot-install-drive/
# NOTE usb media must be pre-erased and mounted at /Volumes/macosinstall
# Use Disk Utility, Erase, Mac OS Extended Journaled, GUID partition
# NOTE monterey needs 16GB
source ~/bin/failexit.mrg
[ $(df |grep -c /Volumes/macosinstall) -gt 0 ] || failexit 40 "/Volumes/macosinstall not mounted/found - need to have pre-formatted USB mounted"
#cd ~/Downloads && \
set -x
cd /Volumes/Monterey-Latest-App && \
cd "Install macOS Monterey.app" && \
Contents/Resources/createinstallmedia \
--volume /Volumes/macosinstall --nointeraction

View File

@ -0,0 +1,15 @@
#!/bin/bash
tmutil listlocalsnapshots /Volumes/iscsi-macosmont12-davemacpro\ -\ Data
echo "SEE SOURCE"
exit;
# REF: https://www.google.com/search?q=monterey+delete+apfs+snapshot+commandline&num=10&sca_esv=fb0328165e44674a&rlz=1C5CHFA_enUS1050US1082&sxsrf=ADLYWIInlgRBKpZsnFqWtPdDbIPHgIviyw%3A1732216760856&ei=uIc_Z_z2M-Tfp84P5I6d0As&ved=0ahUKEwj8stGlku6JAxXk78kDHWRHB7oQ4dUDCBA&uact=5&oq=monterey+delete+apfs+snapshot+commandline&gs_lp=Egxnd3Mtd2l6LXNlcnAiKW1vbnRlcmV5IGRlbGV0ZSBhcGZzIHNuYXBzaG90IGNvbW1hbmRsaW5lMgcQIRigARgKMgcQIRigARgKMgcQIRigARgKMgcQIRigARgKMgcQIRigARgKSNcSULADWK8RcAF4AZABAZgBzAKgAfANqgEIMC4xMS4wLjG4AQPIAQD4AQGYAgygAugMwgIKEAAYsAMY1gQYR8ICBRAhGKABwgIFECEYqwLCAgUQIRifBcICBxAjGLACGCfCAggQABiABBiiBMICCBAAGKIEGIkFmAMAiAYBkAYIkgcIMS4xMC4wLjGgB4JC&sclient=gws-wiz-serp
tmutil listlocalsnapshots
tmutil deletelocalsnapshots /Volumes/iscsi-macosmont12-davemacpro\ -\ Data 2024-10-08-181025
tmutil deletelocalsnapshots /Volumes/iscsi-macosmont12-davemacpro\ -\ Data
tmutil deletelocalsnapshots /Volumes/iscsi-macosmont12-davemacpro
tmutil listlocalsnapshots /Volumes/iscsi-macosmont12-davemacpro\ -\ Data
tmutil deletelocalsnapshots 2024-10-08-181025

View File

@ -0,0 +1,47 @@
#!/bin/bash
# copy 1 zpool/datasets to another destination pool+dataset
# TODO editme if you have an @NOW snap
zsnap=zintmacpro2@Sat
dest=zsgtera6bkp
destip=10.9.12.12
#(HOST)
time zfs send -L -R -e $zsnap \
|pv -t -r -b -W -i 2 -B 250M \
|nc -w 10 $destip 32100
date
# |zfs recv -Fev $dest; date
# |zfs recv -Fevn $dest; date
#(VM/dest)
# TODO Remove the "n" for live xmit! Otherwise test run - can ^C after ~10 sec!
# |zfs recv -evn $dest; date
# time nc -l -p 32100 |zfs recv -Fev zhome/home; date
exit;
NOTE the below results in:
zhgstsas4 zfs 2.9T 128K 2.9T 1% /zhgstsas4
zhgstsas4/shrcompr zfs 3.0T 101G 2.9T 4% /zhgstsas4/shrcompr
zhgstsas4/notshrnotcompr zfs 2.9T 128K 2.9T 1% /zhgstsas4/notshrnotcompr
zhgstsas4/notshrcompr zfs 2.9T 128K 2.9T 1% /zhgstsas4/notshrcompr
zhgstsas4/NEVERLOSE-notshrcompr zfs 2.9T 291M 2.9T 1% /zhgstsas4/NEVERLOSE-notshrcompr
zhgstsas4/BURNME-shrcompr zfs 3.5T 622G 2.9T 18% /zhgstsas4/BURNME-shrcompr
zwd6t/zhgstsas4 zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4
zwd6t/zhgstsas4/BURNME-shrcompr zfs 5.0T 622G 4.4T 13% /zwd6t/zhgstsas4/BURNME-shrcompr
zwd6t/zhgstsas4/NEVERLOSE-notshrcompr zfs 4.4T 291M 4.4T 1% /zwd6t/zhgstsas4/NEVERLOSE-notshrcompr
zwd6t/zhgstsas4/notshrcompr zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4/notshrcompr
zwd6t/zhgstsas4/notshrnotcompr zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4/notshrnotcompr
zwd6t/zhgstsas4/shrcompr zfs 4.5T 101G 4.4T 3% /zwd6t/zhgstsas4/shrcompr
zsnap=zhgstsas4@Sat
dest=zwd6t
#(HOST)
time zfs send -L -R -e $zsnap \
|zfs recv -Fev $dest; date

43
OSX/zpool-copy.sh Normal file
View File

@ -0,0 +1,43 @@
#!/bin/bash
# copy 1 zpool/datasets to another destination pool+dataset
# TODO editme if you have an @NOW snap
zsnap=zhgstsas4@Sat
dest=zwd6t
#(HOST)
time zfs send -L -R -e $zsnap \
|pv -t -r -b -W -i 2 -B 250M \
|zfs recv -Fev $dest; date
# |zfs recv -Fevn $dest; date
#(VM/dest)
# TODO Remove the "n" for live xmit! Otherwise test run - can ^C after ~10 sec!
# |zfs recv -evn $dest; date
# time nc -l -p 32100 |zfs recv -Fev zhome/home; date
exit;
NOTE the below results in:
zhgstsas4 zfs 2.9T 128K 2.9T 1% /zhgstsas4
zhgstsas4/shrcompr zfs 3.0T 101G 2.9T 4% /zhgstsas4/shrcompr
zhgstsas4/notshrnotcompr zfs 2.9T 128K 2.9T 1% /zhgstsas4/notshrnotcompr
zhgstsas4/notshrcompr zfs 2.9T 128K 2.9T 1% /zhgstsas4/notshrcompr
zhgstsas4/NEVERLOSE-notshrcompr zfs 2.9T 291M 2.9T 1% /zhgstsas4/NEVERLOSE-notshrcompr
zhgstsas4/BURNME-shrcompr zfs 3.5T 622G 2.9T 18% /zhgstsas4/BURNME-shrcompr
zwd6t/zhgstsas4 zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4
zwd6t/zhgstsas4/BURNME-shrcompr zfs 5.0T 622G 4.4T 13% /zwd6t/zhgstsas4/BURNME-shrcompr
zwd6t/zhgstsas4/NEVERLOSE-notshrcompr zfs 4.4T 291M 4.4T 1% /zwd6t/zhgstsas4/NEVERLOSE-notshrcompr
zwd6t/zhgstsas4/notshrcompr zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4/notshrcompr
zwd6t/zhgstsas4/notshrnotcompr zfs 4.4T 128K 4.4T 1% /zwd6t/zhgstsas4/notshrnotcompr
zwd6t/zhgstsas4/shrcompr zfs 4.5T 101G 4.4T 3% /zwd6t/zhgstsas4/shrcompr
zsnap=zhgstsas4@Sat
dest=zwd6t
#(HOST)
time zfs send -L -R -e $zsnap \
|zfs recv -Fev $dest; date

View File

@ -0,0 +1,60 @@
#!/bin/bash
# create ZFS pool that should be cross-boot compatible with v.207 and import OK
# REF: https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Feature%20Flags.html
# EDITME!
# REF: https://www.reddit.com/r/zfs/comments/b092at/cant_import_pool_from_zol_to_bsd/
# REF: https://zgrep.org/zfs.html # OLD zfs by-OS compat. chart
# REF ' man zpool-features ' - large_blocks needed for recordsize=1024k
zp=zsamt72mp2
diskk=/dev/disk2s6 # sdc # Linux - use dev/disk/by-id
zpool create -f -d \
-o feature@allocation_classes=enabled \
-o feature@async_destroy=enabled \
-o feature@bookmark_v2=enabled \
-o feature@bookmark_written=enabled \
-o feature@bookmarks=enabled \
-o feature@device_rebuild=enabled \
-o feature@device_removal=enabled \
-o feature@edonr=enabled \
-o feature@embedded_data=enabled \
-o feature@empty_bpobj=enabled \
-o feature@enabled_txg=enabled \
-o feature@encryption=enabled \
-o feature@extensible_dataset=enabled \
-o feature@filesystem_limits=enabled \
-o feature@hole_birth=enabled \
-o feature@large_blocks=enabled \
-o feature@large_dnode=enabled \
-o feature@livelist=enabled \
-o feature@log_spacemap=enabled \
-o feature@lz4_compress=enabled \
-o feature@multi_vdev_crash_dump=enabled \
-o feature@obsolete_counts=enabled \
-o feature@project_quota=enabled \
-o feature@redacted_datasets=enabled \
-o feature@redaction_bookmarks=enabled \
-o feature@resilver_defer=enabled \
-o feature@sha512=enabled \
-o feature@skein=enabled \
-o feature@spacemap_histogram=enabled \
-o feature@spacemap_v2=enabled \
-o feature@userobj_accounting=enabled \
-o feature@zpool_checkpoint=enabled \
-o feature@zstd_compress=enabled \
-o ashift=12 -o autoexpand=on -o autoreplace=off \
-O atime=off -O compression=zstd-3 $zp "$diskk"
zfs-newds-zstd.sh 11 $zp shrcompr-$zp
zfs-newds-zstd.sh 10 $zp notshrcompr-$zp
gdf -hT
exit;
# Created by pasting into spreadsheet, grabbing 2.0.7=yes and deleting the NOs
# TODO alt.method https://vermaden.wordpress.com/2022/03/25/zfs-compatibility/