There are several times where customers are
mistakenly creating folders where there should be btrfs subvolumes, so this script will check now to see if it is valid. I plan to add a migrate-to-proper-subvolume feature later.
This commit is contained in:
parent
0d56c8ec3c
commit
618899ba8f
1 changed files with 7 additions and 1 deletions
|
@ -172,12 +172,18 @@ else
|
||||||
if [[ $? == 2 ]]; then
|
if [[ $? == 2 ]]; then
|
||||||
echo "No shares or LUNs found."
|
echo "No shares or LUNs found."
|
||||||
else
|
else
|
||||||
objects=$(echo "$objects" |egrep -v "^.apps\/$|^home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//;s/\.\///')
|
objects=$(echo "$objects" |egrep -v "^.apps\/$|^\.\/home\/$|^.purge\/$|^._share\/$|^.timemachine\/$|^.vault\/$|^.TemporaryItems\/$" | sed 's/\/$//;s/\.\///')
|
||||||
echo "= Objects found: $(echo $objects | wc -w)"
|
echo "= Objects found: $(echo $objects | wc -w)"
|
||||||
echo $objects
|
echo $objects
|
||||||
backup_configs
|
backup_configs
|
||||||
for item in $objects; do
|
for item in $objects; do
|
||||||
echo "== Reviewing $item"
|
echo "== Reviewing $item"
|
||||||
|
btrfs subv show /"$volume"/"$item" &>/dev/null
|
||||||
|
if [[ $? -eq "1" ]]; then
|
||||||
|
echo "WARNING! /$volume/$item is NOT a valid btrfs subvolume, so it may not appear in the UI."
|
||||||
|
echo "We will create the configs, but will work on a migration feature later to proper btrfs subvolume."
|
||||||
|
fi
|
||||||
|
|
||||||
if ls -QdA /"$volume"/"$item"/.iscsi >/dev/null 2>&1; then
|
if ls -QdA /"$volume"/"$item"/.iscsi >/dev/null 2>&1; then
|
||||||
iscsi_create
|
iscsi_create
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue