# this is the lvm partition, if it exists on that device
lvm_partition= InstallPartitionDisks.get_partition_path_from_device( device, vars, log )
cmd = "pvdisplay %s | grep -q 'planetlab'" % lvm_partition
- already_added= utils.sysexec_noerr(cmd, log)
+ already_added = utils.sysexec_noerr(cmd, log, shell=True)
if already_added:
log.write( "It appears %s is part of the volume group, continuing.\n" %
# just to be extra paranoid, ignore the device if it already has
# an lvm partition on it (new disks won't have this, and that is
# what this code is for, so it should be ok).
- cmd = "sfdisk -l %s | grep -q 'Linux LVM'" % device
+ cmd = "parted --script --list %s | grep -q lvm$" % device
has_lvm= utils.sysexec_noerr(cmd, log)
if has_lvm:
log.write( "It appears %s has lvm already setup on it.\n" % device)