Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logical Volumes are not being disabled #10

Open
f403 opened this issue Jan 31, 2023 · 0 comments
Open

Logical Volumes are not being disabled #10

f403 opened this issue Jan 31, 2023 · 0 comments

Comments

@f403
Copy link

f403 commented Jan 31, 2023

# disable any active LVM partitions
lvs=$(lvs --noheadings --rows | head -n1)
if [ ! -z "$lvs" ]; then
echo -n "Deactivating LVM volumes ... "
for lv in $lvs
do
lvchange -an $lv > /dev/null 2>&1
done
echo -e "${green}done${normalText}"
fi

I think, there is an error here: lvchange -an requires VG, not LV.
(And suppressing error output is also not a good idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant