Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
lvm2-clvm
collect_lvm
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File collect_lvm of Package lvm2-clvm
#!/bin/sh PVNAME=$1 source /etc/sysconfig/lvm /sbin/lvm pvs --config "devices {filter = [ \"a|$PVNAME|\", \"r/.*/\" ]}" --partial -o vg_name,vg_attr,pv_uuid,vg_uuid --ignorelockingfailure --noheadings $PVNAME 2>/dev/null | while read vgname vgattr pvuuid vguuid; do if [[ $vgattr =~ mode. ]]; then continue fi if [[ $vgattr =~ .....c ]]; then exit 1 fi lvlist=$(/sbin/lvm lvs --config "devices {filter = [ \"a|$PVNAME|\", \"r/.*/\" ]}" --partial -o lv_name,lv_attr --ignorelockingfailure --noheadings $vgname 2>/dev/null | while read lvname lvattr; do if [[ $lvattr =~ mode. ]] ; then continue fi if [[ $lvattr =~ ....-. ]]; then echo -n $lvname fi done) if [ -z "$lvlist" ] ; then exit 1 fi pvlist=$(/sbin/lvm vgdisplay --config "devices {filter = [ \"a|$PVNAME|\", \"r/.*/\" ]}" --partial -v $vgname 2>/dev/null | while read str1 str2 val; do if [[ $str1 =~ PV && $str2 =~ UUID ]]; then echo $val fi done) echo PVUUID=$pvuuid echo VGUUID=$vguuid echo VGNAME=$vgname if [[ -n $LVM_VGS_ACTIVATED_ON_BOOT ]]; then found=0 for autovg in $LVM_VGS_ACTIVATED_ON_BOOT; do if [[ $vgname == $autovg ]]; then found=1 break fi done if [[ $found == 0 ]]; then echo COLLECT=1 exit 0 fi fi collected=0 for pv in $pvlist; do if [[ x$pv = x$pvuuid ]]; then continue fi if [[ ! -h /dev/disk/by-id/lvm2-pvuuid-$pv ]]; then echo COLLECT=1 collected=1 break fi done if [[ $collected = 0 ]]; then echo COLLECT=0 fi # /lib/udev/collect $vguuid $pvuuid $pvlist # echo COLLECT=$? done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor