'Resize EBS volume
vol - boto volume object
size - new volume size
dest_zone - zone to create the new resized volume in. this must be
within the original volume\'s region otherwise a manual copy (rsync)
is required. this is currently not implemented.'

@print_timing('Resizing    volume')
def resize(self, vol, size, dest_zone=None):

    try:
        self._validate_device(self._aws_block_device)
        self._validate_resize(vol, size)
        zone = vol.zone
        if dest_zone:
            self._validate_zone(dest_zone)
            zone = dest_zone
        host = self._request_instance(zone)
        resizefs_exe = self._resizefs_cmd.split()[0]
        required = [resizefs_exe]
        if (resizefs_exe == 'resize2fs'):
            required.append('e2fsck')
        self._validate_required_progs(required)
        self._determine_device()
        snap = self._create_snapshot(vol)
        new_vol = self._create_volume(size, zone, snap.id)
        self._attach_volume(new_vol, host.id, self._aws_block_device)
        device = self._get_volume_device()
        devs = filter((lambda x: x.startswith(device)), host.ssh.ls('/dev'))
        if (len(devs) == 1):
            log.info('No    partitions    found,    resizing    entire    device')
        elif (len(devs) == 2):
            log.info('One    partition    found,    resizing    partition...')
            self._repartition_volume()
            device += '1'
        else:
            raise exception.InvalidOperation(('EBS    volume    %s    has    more    than    1    partition.    You    must    resize    this    volume    manually' % vol.id))
        if (resizefs_exe == 'resize2fs'):
            log.info('Running    e2fsck    on    new    volume')
            host.ssh.execute(('e2fsck    -y    -f    %s' % device))
        log.info(('Running    %s    on    new    volume' % self._resizefs_cmd))
        host.ssh.execute('    '.join([self._resizefs_cmd, device]))
        self.shutdown()
        return new_vol.id
    except Exception:
        log.error(('Failed    to    resize    volume    %s' % vol.id))
        self._delete_new_volume()
        raise
    finally:
        snap = self._snapshot
        if snap:
            log_func = (log.info if self._volume else log.error)
            log_func(('Deleting    snapshot    %s' % snap.id))
            snap.delete()
        self._warn_about_volume_hosts()
