Displaying 11 results from an estimated 11 matches for "wipe_volume_group".
2011 Aug 31
1
[PATCH node] fix install when VG exists on disk
...log("The volume group \"%s\" spans multiple disks.") % vg
log("This operation cannot complete. Please manually")
log("cleanup the storage using standard disk tools.")
sys.exit(1)
- wipe_volume_group(vg)
+ vg_name_cmd = "vgs -o vg_name,vg_uuid --noheadings 2>/dev/null | grep -w \"" + vg + "\" | awk '{print $1}'"
+ vg_name = subprocess.Popen(vg_name_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ vg_name_output = vg_name.st...
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 Oct 27
0
[PATCH node] add uninstall module
...stdout=PIPE, stderr=STDOUT)
+ pv_device = pv_lookup.stdout.read()
+ if pv_device is None:
+ log("Can't find HostVG device")
+ sys.exit(4)
+ pv_dev, pv_part = get_part_info(pv_device)
+
+ log("Removing volume group")
+ wipe_volume_group("HostVG")
+ log("Removing partitions")
+ os.system("parted -s " + root_dev + "\"rm " + root_part + "\"")
+ os.system("pvremove " + vg_dev)
+ os.system("parted -s " + root2_dev + "\"...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...# ... unless overridden by ovirt_firstboot parameter
if is_firstboot || [ $existingHostVG -ne 0 ]; then
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index d8aa008..edf6267 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -148,7 +148,7 @@ EOF
#
wipe_volume_group()
{
- vg=$1
+ vg="$1"
for d in $(grep $vg /proc/mounts|awk '{print $2}'); do
log "Unmounting $d"
@@ -156,10 +156,10 @@ wipe_volume_group()
done
for d in $(grep $vg /proc/swaps|awk '{print $1}'); do
log "Turning off $d...
2010 Mar 23
0
[PATCH node] Fix uninstall to detect and cleanup correct partitions
...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 LABEL=Root))
- if [ -n "$partition" ]; then
- log "Removing partitions"
- eval $(echo $partition | awk ' {
- print "drive=" substr($0,1,length($1)-1);
-...
2010 Mar 23
1
[PATCH node][RFC] Fix uninstall to detect and cleanup correct partitions
...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 LABEL=Root))
- if [ -n "$partition" ]; then
- log "Removing partitions"
- eval $(echo $partition | awk ' {
- print "drive=" substr($0,1,length($1)-1);
-...
2010 Mar 24
2
[PATCH node][REPOST 1/2] Fix uninstall to detect and cleanup correct partitions
...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 LABEL=Root))
- if [ -n "$partition" ]; then
- log "Removing partitions"
- eval $(echo $partition | awk ' {
- print "drive=" substr($0,1,length($1)-1);
-...
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...ot;, "0")
+ firstboot.set("/files/etc/defaults/ovirt/OVIRT_INIT", '""')
+ firstboot.set("/files/etc/defaults/OVIRT_UPGRADE", "0")
+ firstboot.save()
+
+# Destroys a particular volume group and its logical volumes.
+
+def wipe_volume_group(vg):
+ files_cmd = "grep %s /proc/mounts|awk '{print $2}'|sort -r" % vg
+ files = subprocess.Popen(files_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ files_output = files.stdout.read()
+ for file in files_output.split():
+ umount_cmd = "umount %s" %...
2009 Oct 22
0
[PATCH node] merge Root and /boot partitions
...s/ovirt-config-uninstall
index 22633a0..820eead 100755
--- a/scripts/ovirt-config-uninstall
+++ b/scripts/ovirt-config-uninstall
@@ -34,16 +34,13 @@ if ask_yes_or_no "Do you wish to continue and uninstall this node ([Y]es/[N]o)?"
unmount_logging
log "Removing volume group"
wipe_volume_group "HostVG"
- partition=$(findfs LABEL=BOOT)
+ partition=$(findfs LABEL=Root)
if [ -n "$partition" ]; then
- log "Unmounting boot partition"
- umount $partition
log "Removing partitions"
drive=$(echo $partition | awk '{ print substr($0,...
2009 Nov 04
1
[PATCH node] add ability to select separate disks for Root and HostVG in o-c-storage
...2 MB
Configuration partition size: $CONFIG_SIZE MB
@@ -299,21 +324,21 @@ EOF
wipe_lvm_on_disk()
{
unmount_logging
- for vg in $(pvs -o vg_name --noheadings $DRIVE* 2>/dev/null|sort -u); do
+ for vg in $(pvs -o vg_name --noheadings $HOSTVGDRIVE* 2>/dev/null|sort -u); do
wipe_volume_group $vg
done
}
perform_partitioning()
{
- log "Partitioning drive: $DRIVE"
- if [ -z "$DRIVE" ]; then
+ log "Partitioning drive: $ROOTDRIVE"
+ if [ -z "$HOSTVGDRIVE" ]; then
printf "\nNo storage device selected.\n"...
2009 Sep 26
10
Adding handling for Multipath storage devices
The following patches introduce support for multipath and cciss devices to the ovirt-node and node-image. Comments are appreciated.
These patches assume that the 3 patches (2 node, 1 node-image) from Joey are all incorporated.
Mike