search for: pv_name

Displaying 20 results from an estimated 36 matches for "pv_name".

Did you mean: lv_name
2011 Aug 31
1
[PATCH node] fix install when VG exists on disk
...x 5f7f0e3..047bcd1 100644 --- a/scripts/storage.py +++ b/scripts/storage.py @@ -90,13 +90,19 @@ class Storage: vg = subprocess.Popen(vg_cmd, shell=True, stdout=PIPE, stderr=STDOUT) vg_output = vg.stdout.read() for vg in vg_output: - pvs = system("pvscan -o pv_name,vg_uuid --noheadings | grep \"%s\" | egrep -v -q \"%s%s[0-9]+|%s \"") % (vg, dev, part_delim, dev) - if pvs > 0: + pvs_cmd = "pvs -o pv_name,vg_uuid --noheadings | grep \"%s\" | egrep -v -q \"%s%s[0-9]+|%s \"" % (vg, de...
2016 Feb 15
1
[PATCH] Start adding return values tests for bindings
...quot;); +for (my $i = 0; $i < @l; $i++) { + is ($l[$i], $i, "rstringlist/5/$i"); +} +eval { + my $foo = $g->internal_test_rstringlisterr (); +}; +like ($@, qr/error/, "rstringlisterr"); + +# rstruct +my %s = $g->internal_test_rstruct ("unused"); +is ($s{'pv_name'}, "pv0", "rstruct/0"); +eval { + my $foo = $g->internal_test_rstructerr (); +}; +like ($@, qr/error/, "rstructerr"); + +# rstructlist +my @sl = $g->internal_test_rstructlist ("0"); +is (@sl, 0, "rstructlist/empty"); +@sl = $g->interna...
2016 Jul 26
0
[PATCH 4/5] daemon: lvm: list PVs/VGs/LVs with --foreign
...es changed, 7 insertions(+), 4 deletions(-) diff --git a/daemon/lvm.c b/daemon/lvm.c index 831c56e..0123ae5 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -194,7 +194,7 @@ do_pvs (void) int r; r = command (&out, &err, - str_lvm, "pvs", "-o", "pv_name", "--noheadings", NULL); + str_lvm, "pvs", "--foreign", "-o", "pv_name", "--noheadings", NULL); if (r == -1) { reply_with_error ("%s", err); free (out); @@ -212,7 +212,7 @@ do_vgs (void) int r;...
2010 Mar 26
1
[PATCH node] Use vg uuid when detecting whether vg spans multiple disks
...rage +++ b/scripts/ovirt-config-storage @@ -563,9 +563,9 @@ wipe_lvm_on_disk() if [[ "$dev" =~ "/dev/sd" ]]; then part_delim="" fi - for vg in $(pvs -o vg_name --noheadings $dev $dev${dev_delim}[0-9]* 2>/dev/null|sort -u); do - if pvs -o pv_name,vg_name --noheadings | \ - grep $vg | egrep -v -q "${dev}${part_delim}[0-9]+|${dev}" 2>/dev/null; then + for vg in $(pvs -o vg_uuid --noheadings $dev $dev${dev_delim}[0-9]* 2>/dev/null|sort -u); do + if pvs -o pv_name,vg_uuid --noheadings | \ + grep $...
2011 Sep 09
0
[PATCH node] only wipe HostVG if storage_init is not passed in dracut
...5 deletions(-) diff --git a/dracut/ovirt-cleanup.sh b/dracut/ovirt-cleanup.sh index c96d6fe..e9674d8 100755 --- a/dracut/ovirt-cleanup.sh +++ b/dracut/ovirt-cleanup.sh @@ -48,11 +48,16 @@ fi # Check for HostVG lvm pvscan >/dev/null 2>&1 -for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do - storage_init="$hostvg,$storage_init" - info "Found HostVG on $hostvg" -done - +if [ -z "$storage_init" ]; then + for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ H...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...o "scale=0; $ROOT_SIZE * 2 + $HOSTVG_NEED_SIZE"| bc -l) else @@ -204,7 +204,7 @@ check_partition_sizes() # check if an existing HostVG exists on a device other than the target if [ "$OVIRT_ISCSI_ENABLED" != "y" ]; then devices="$(pvs -o pv_name,vg_name --noheadings | \ - grep "HostVG"|grep -v $HOSTVGDRIVE|awk '{ print $1 }')" + grep "HostVG"|grep -v "$HOSTVGDRIVE"|awk '{ print $1 }')" rc=0 if [ -n "$devices" ]; then print...
2010 Feb 24
5
New Storage related patches
This set of patches introduces support for multipath devices for storage. Comments and suggestions are appreciated. Mike
2010 Jul 21
0
[PATCH] RFC: Advanced Storage Configuration
...install_dev="${dev}" + fi + done local devices_var=$2 + local vgname= + { [ -n $3 ] && vgname="$3"; } || vgname="HostVG" + if [ -z "$install_dev" ]; then devices="$(pvs --separator="${TAB}" -o pv_name,vg_name --noheadings | \ - grep "HostVG" | cut -f1)" + grep "${vgname}" | cut -f1)" else devices="$(pvs --separator="${TAB}" -o pv_name,vg_name --noheadings | \ - grep -v "${install_dev}" | grep &q...
2010 Oct 27
0
[PATCH node] add uninstall module
...t2_device = root2_label_lookup.stdout.read() + if root2_device is None: + log("Can't find RootBackup/RootNew/RootUpdate device") + sys.exit(3) + root2_dev, root2_part = get_part_info(root2_device) + + pv_lookup_cmd = "pvs --noheadings -o pv_name,vg_name | grep HostVG | awk '{print $1}'" + pv_lookup = subprocess.Popen(pv_lookup_cmd, shell=True, stdout=PIPE, stderr=STDOUT) + pv_device = pv_lookup.stdout.read() + if pv_device is None: + log("Can't find HostVG device") + sys...
2011 Jul 29
0
[PATCH node] Add debugging info to dracut plugin
...; for dev in "$storage_init"; do device=$(IFS=$oldIFS parse_disk_id "$dev") + info "After parsing \"$dev\", we got \"$device\"" echo "Wiping LVM from device: ${device}" IFS=$oldIFS for i in $(lvm pvs --noheadings -o pv_name,vg_name --separator=, $device* 2>/dev/null); do pv="${i%%,*}" vg="${i##*,}" if [ -n "$vg" ]; then + info "Found and removing vg: $vg" yes | lvm vgremove -ff "$vg" fi + info "...
2011 Aug 25
0
[PATCH node] always remove HostVG in dracut when reinstall/uninstall/firstboot passed
...irt_init arguments not found" - return 0 + else + info "Found storage_init: $storage_init" fi fi -info "Found storage_init: $storage_init" + +# Check for HostVG +lvm pvscan >/dev/null 2>&1 + +for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | awk '/^ HostVG/{print $2}'); do + storage_init="$hostvg,$storage_init" + info "Found HostVG on $hostvg" +done + # storage_init is passed in a specific format # A comma separated list of HostVG devices @@ -60,7 +69,6 @@ info "Escaped all as...
2009 Dec 10
0
[PATCH node] Enables stateless iscsi remote boot
..._SIZE"| bc -l) + else + drive_list="ROOT HOSTVG" + fi fi for drive in $drive_list; do @@ -120,22 +126,26 @@ check_partition_sizes() done # check if an existing HostVG exists on a device other than the target - devices="$(pvs -o pv_name,vg_name --noheadings | \ - grep "HostVG"|grep -v $HOSTVGDRIVE|awk '{ print $1 }')" - rc=0 - if [ -n "$devices" ]; then - printf "\n" - printf "There appears to already be an installation on another device:\n" - f...
2010 Apr 05
1
RESEND: [PATCH node 1/3] enables ability for a common shared root
...o "scale=0; $ROOT_SIZE * 2 + $HOSTVG_NEED_SIZE"| bc -l) else @@ -204,7 +204,7 @@ check_partition_sizes() # check if an existing HostVG exists on a device other than the target if [ "$OVIRT_ISCSI_ENABLED" != "y" ]; then devices="$(pvs -o pv_name,vg_name --noheadings | \ - grep "HostVG"|grep -v $HOSTVGDRIVE|awk '{ print $1 }')" + grep "HostVG"|grep -v "$HOSTVGDRIVE"|awk '{ print $1 }')" rc=0 if [ -n "$devices" ]; then print...
2010 Mar 23
0
[PATCH node] Fix uninstall to detect and cleanup correct partitions
...ice" + exit 2 + fi + if ! get_part_info $(findfs LABEL=${root2} 2>/dev/null) root2_dev root2_part; then + log "Can't find RootBackup/RootNew/RootUpdate device" + exit 3 + fi + if ! get_part_info $(pvs --noheadings -o pv_name,vg_name | grep HostVG | awk '{print $1}') pv_dev pv_part; then + log "Can't find HostVG device" + exit 4 + fi log "Removing volume group" wipe_volume_group "HostVG" - partition=$(readlink -f $(findfs LAB...
2020 Jan 10
8
[PATCH 0/7] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python bindings, leaving only an overly length line in setup.py. Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (7): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests: improve variable naming python: tests:
2016 Jul 26
8
[PATCH 0/5] Improve LVM handling in the appliance
Hi, this series improves the way LVM is used in the appliance: in particular, now lvmetad can eventually run at all, and with the correct configuration. Also improve the listing strategies. Thanks, Pino Toscano (5): daemon: lvm-filter: set also global_filter daemon: lvm-filter: start lvmetad better daemon: lvm: improve filter for LVs with activationskip flag set daemon: lvm: list
2020 Jan 10
9
[PATCH v2 0/8] Various Python pycodestyle fixes
Fixes all the pycodestyle issues in the Python bindings, overring one that does not make sense to change (and it's in setup.py, so almost irrelevant). Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (8): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests:
2010 Mar 23
1
[PATCH node][RFC] Fix uninstall to detect and cleanup correct partitions
...device" + exit 2 + fi + if ! get_part_info $(findfs LABEL=root2 2>/dev/null) root2_dev root2_part; then + log "Can't find RootBackup/RootNew/RootUpdate device" + exit 3 + fi + if ! get_part_info $(pvs --noheadings -o pv_name,vg_name | grep HostVG | awk '{print $1}') pv_dev pv_part; then + log "Can't find HostVG device" + exit 4 + fi log "Removing volume group" wipe_volume_group "HostVG" - partition=$(readlink -f $(findfs LAB...
2010 Mar 24
2
[PATCH node][REPOST 1/2] Fix uninstall to detect and cleanup correct partitions
...ice" + exit 2 + fi + if ! get_part_info $(findfs LABEL=${root2} 2>/dev/null) root2_dev root2_part; then + log "Can't find RootBackup/RootNew/RootUpdate device" + exit 3 + fi + if ! get_part_info $(pvs --noheadings -o pv_name,vg_name | grep HostVG | awk '{print $1}') pv_dev pv_part; then + log "Can't find HostVG device" + exit 4 + fi log "Removing volume group" wipe_volume_group "HostVG" - partition=$(readlink -f $(findfs LAB...
2016 Feb 22
3
[PATCH 1/3] python: tests: refactor to use unittest's discovery
...uot;, "4"]) - - self.assertRaises (RuntimeError, g.internal_test_rstringlisterr) - - - def test_rstruct (self): - g = guestfs.GuestFS () - - s = g.internal_test_rstruct ("unused") - self.assertIsInstance (s, dict) - self.assertEqual (s["pv_name"], "pv0") - - self.assertRaises (RuntimeError, g.internal_test_rstructerr) - - - def test_rstructlist (self): - g = guestfs.GuestFS () - - self.assertEqual (g.internal_test_rstructlist ("0"), []) - l = g.internal_test_rstructlist ("5&quot...