mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-18 02:42:21 +00:00
Update disk-passthrough_ct.sh
This commit is contained in:
parent
d2200a64e0
commit
7693f313c4
@ -187,7 +187,12 @@ is_disk_in_use() {
|
|||||||
|
|
||||||
FREE_DISKS=()
|
FREE_DISKS=()
|
||||||
|
|
||||||
LVM_DEVICES=$(pvs --noheadings -o pv_name 2> >(grep -v 'File descriptor .* leaked') | xargs -n1 readlink -f | sort -u)
|
LVM_DEVICES=$(pvs --noheadings -o pv_name 2> >(grep -v 'File descriptor .* leaked') | xargs -r -n1 readlink -f | sort -u)
|
||||||
|
|
||||||
|
if [[ -n "$LVM_DEVICES" ]] && echo "$LVM_DEVICES" | grep -qFx "$REAL_PATH"; then
|
||||||
|
IS_MOUNTED=true
|
||||||
|
fi
|
||||||
|
|
||||||
RAID_ACTIVE=$(grep -Po 'md\d+\s*:\s*active\s+raid[0-9]+' /proc/mdstat | awk '{print $1}' | sort -u)
|
RAID_ACTIVE=$(grep -Po 'md\d+\s*:\s*active\s+raid[0-9]+' /proc/mdstat | awk '{print $1}' | sort -u)
|
||||||
|
|
||||||
while read -r DISK; do
|
while read -r DISK; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user