search for: wipe_lvm_on_disk

Displaying 10 results from an estimated 10 matches for "wipe_lvm_on_disk".

2010 Apr 05
1
RESEND: [PATCH node 1/3] enables ability for a common shared root
...then local remaining_mb=$(( $ROOTDRIVESPACE - $SWAP_SIZE \ - $ROOT_SIZE * 2 - $CONFIG_SIZE - $LOGGING_SIZE )) test $remaining_mb -lt 0 && is_negative=1 @@ -557,7 +575,7 @@ check_existing_hostvg() # - remove LVM volumes and groups wipe_lvm_on_disk() { - local dev=${1-$HOSTVGDRIVE} + local dev=${1-"$HOSTVGDRIVE"} unmount_logging local part_delim="p" if [[ "$dev" =~ "/dev/sd" ]]; then @@ -604,8 +622,8 @@ perform_partitioning() unmount_config /etc/default/ovirt log "...
2010 Mar 18
1
[PATCH node] cleanup a couple small issues
...dev=/dev/$(multipath -ll $dev | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/') local mpath_device= - get_dm_device $dm_dev $mpath_device + get_dm_device $dm_dev mpath_device if [ -z "$mpath_device" ]; then mpath_device=$dev @@ -580,7 +580,7 @@ wipe_lvm_on_disk() reread_partitions() { local drive=$1 - if [[ $drive =~ "^/dev/mapper" ]]; then + if [[ $drive =~ "/dev/mapper" ]]; then kpartx -a -p p $drive else blockdev --rereadpt $drive -- 1.6.6.1
2011 Aug 31
1
[PATCH node] fix install when VG exists on disk
...ge -an " + vg_name_output) + wipe_volume_group(vg_name_output) return @@ -372,7 +378,9 @@ class Storage: log("Removing old LVM partitions") wipe_volume_group("HostVG") + log("Wiping LVM on HOSTVGDRIVE") self.wipe_lvm_on_disk(self.HOSTVGDRIVE) + log("Wiping LVM on ROOTDRIVE") self.wipe_lvm_on_disk(self.ROOTDRIVE) self.boot_size_si = self.BOOT_SIZE * (1024 * 1024) / (1000 * 1000) if OVIRT_VARS.has_key("OVIRT_ISCSI_ENABLED") and OVIRT_VARS["OVIRT_ISCSI_ENABLED&quo...
2010 Jul 21
0
[PATCH] RFC: Advanced Storage Configuration
...{install_dev}" | grep "HostVG" | cut -f1)" + egrep -v "${install_dev}" | grep "${vgname}" | cut -f1)" fi rc=1 if [ -n "$devices" ]; then @@ -531,15 +575,29 @@ check_existing_hostvg() # - remove LVM volumes and groups wipe_lvm_on_disk() { - local dev=${1-"$HOSTVGDRIVE"} + local devs=${1-"$HOSTVGDRIVE"} + local query1= + local query2= unmount_logging - local part_delim="p" - if [[ "$dev" =~ "/dev/sd" ]]; then - part_delim="" - fi - fo...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...for dev in $devs do printf "Removing HostVG on $dev will erase the drive and cannot be undone\n" if ask_yes_or_no "Do you want to remove HostVG from $dev (y/n)?"; then start_log - if ! wipe_lvm_on_disk $dev; then + if ! wipe_lvm_on_disk "$dev"; then stop_log return 1 fi @@ -379,7 +379,7 @@ do_configure() fi $skipped && printf "Installation cannot proceed with existin...
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 Mar 26
1
[PATCH node] Use vg uuid when detecting whether vg spans multiple disks
...com> --- scripts/ovirt-config-storage | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index 8d59a6b..9d8c482 100755 --- a/scripts/ovirt-config-storage +++ 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 "$...
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...SPACE = get_drive_size(ROOTDRIVE) + +# if the node is Fedora then use GPT, otherwise use MBR +if os.path.isfile("/etc/fedora-release"): + LABEL_TYPE="gpt" +else: + LABEL_TYPE="msdos" + + + +################################################################## + +def wipe_lvm_on_disk(dev): + unmount_logging + part_delim="p" + if "/dev/sd" in dev: + part_delim="" + vg_cmd = "pvs -o vg_uuid --noheadings %s \"%s%s[0-9]\"* 2>/dev/null|sort -u" % (dev, dev, part_delim) + vg = subprocess.Popen(vg_cmd, shell=T...
2009 Nov 04
1
[PATCH node] add ability to select separate disks for Root and HostVG in o-c-storage
...IVE) + Root Drive: $(get_drive_size $ROOTDRIVE) + HostVG Drive: $(get_drive_size $HOSTVGDRIVE) Swap partition size: $SWAP_SIZE MB Installation partition size: $ROOT_SIZE * 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 driv...
2009 Dec 10
0
[PATCH node] Enables stateless iscsi remote boot
...cat <<EOF + +The local disk will be repartitioned as follows: +================================================ + Boot Drive: $(get_drive_size $BOOTDRIVE) + Boot partition size: $BOOT_SIZE + +EOF + + fi } # cleanup lvms on selected disk @@ -348,14 +372,16 @@ wipe_lvm_on_disk() perform_partitioning() { - log "Partitioning drive: $ROOTDRIVE" - if [ -z "$HOSTVGDRIVE" ]; then + if [[ -z "$HOSTVGDRIVE" && "$OVIRT_ISCSI_ENABLED" != "y" ]]; then printf "\nNo storage device selected.\n"...