0afbbc68db
Resolves: #741655
13 lines
320 B
Bash
Executable File
13 lines
320 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Test if the given device is an LVM PV. If yes, activate its VG.
|
|
#
|
|
# Suggested by Milan Brož in
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=741655#c19
|
|
|
|
device="$1"
|
|
[ -b "$device" ] || exit 1
|
|
|
|
blkid -t TYPE=LVM2_member "$device" > /dev/null && \
|
|
vgchange -a y $(pvs --noheadings -o vg_name "$device")
|