@error.context_aware
def lv_remove(vg_name, lv_name):
 error.context(('Removing volume /dev/%s/%s' % (vg_name, lv_name)), logging.info)
 if (not vg_check(vg_name)):
  raise error.TestError('Volume group could not be found')
 if (not lv_check(vg_name, lv_name)):
  raise error.TestError('Logical volume could not be found')
 cmd = ('lvremove -f %s/%s' % (vg_name, lv_name))
 result = utils.run(cmd)
 logging.info(result.stdout.rstrip())

@ error . context_aware def lv_remove ( vg_name , lv_name ) : error . context ( ( 'Removing volume /dev/%s/%s' % ( vg_name , lv_name ) ) , logging . info ) if ( not vg_check ( vg_name ) ) : raise error . TestError ( 'Volume group could not be found' ) if ( not lv_check ( vg_name , lv_name ) ) : raise error . TestError ( 'Logical volume could not be found' ) cmd = ( 'lvremove -f %s/%s' % ( vg_name , lv_name ) ) result = utils . run ( cmd ) logging . info ( result . stdout . rstrip ( ) )
remove a logical volume .