diff --git a/share_lun_ui_fix.sh b/share_lun_ui_fix.sh index 3c3cce6..7b4de83 100755 --- a/share_lun_ui_fix.sh +++ b/share_lun_ui_fix.sh @@ -101,6 +101,16 @@ check_existing_backups() { fi } +subv_checker() { +# Check to see if subv list matches actual directory folders +# This might be because user created folders in the root that are not btrfs subvolumes +# or the user moved a subv from the root to another subvolume (not supported in OS 6) + +# Check the count +# Objects counting +count_btrfs=$(btrfs subv list /data | egrep -v ".snapshots|.apps|.vault|._share|.timemachine|.purge|home\/|home$" | awk '{print $9}' | wc -l) +} + iscsi_create() { iscsi=$((iscsi+1)) found=$((found+1)) @@ -172,8 +182,9 @@ else if [[ $? == 2 ]]; then echo "No shares or LUNs found." else - objects=$(echo "$objects" |egrep -v "^.apps\/$|^home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//') + objects=$(echo "$objects" | egrep -v "^.apps\/$|^home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//') echo "= Objects found:" $objects + subv_checker backup_configs for item in $objects; do echo "== Reviewing $item"