def _get_device_size(device):
    size_file = FilePath('/sys/block/{}/size'.format(device))
    return int(size_file.getContent()) * 512
Helper function to fetch the size of given block device.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/ebs.py/_get_device_size