def METHOD_NAME(self):
    '''
    Build Dbench
    Source:
    http://samba.org/ftp/tridge/dbench/dbench-3.04.tar.gz
    '''
    fstype = self.params.get('fs', default='')
    self.fs_create = False
    lv_needed = self.params.get('lv', default=False)
    self.lv_create = False
    raid_needed = self.params.get('raid', default=False)
    self.raid_create = False
    device = self.params.get('disk', default=None)
    self.md_name = self.params.get('raid_name', default='md127')
    self.dir = self.params.get('dir', default=None)
    if device is not None:
        self.disk = disk.get_absolute_disk_path(device)
        if self.disk not in disk.get_all_disk_paths():
            self.cancel("Missing disk %s in OS" % self.disk)
    else:
        self.cancel("Please Provide valid device name")
    if not self.dir:
        self.dir = self.workdir
    self.mountpoint = self.dir
    self.disk_obj = Partition(self.disk, mountpoint=self.mountpoint)
    self.pre_cleanup()
    self.clear_disk(self.disk_obj, self.disk)
    if not os.path.exists(self.mountpoint):
        os.mkdir(self.mountpoint)
    sm = SoftwareManager()
    pkgs = ["gcc", "patch"]
    if raid_needed:
        pkgs.append('mdadm')
    for pkg in pkgs:
        if not sm.check_installed(pkg) and not sm.install(pkg):
            self.error('%s is needed for the test to be run' % pkg)
    if fstype == 'btrfs':
        ver = int(distro.detect().version)
        rel = int(distro.detect().release)
        if distro.detect().name == 'rhel':
            if (ver == 7 and rel >= 4) or ver > 7:
                self.cancel("btrfs is not supported with \
                            RHEL 7.4 onwards")
        if distro.detect().name == 'Ubuntu':
            if not sm.check_installed("btrfs-tools") and not \
                    sm.install("btrfs-tools"):
                self.cancel('btrfs-tools is needed for the test to be run')
    self.results = []
    tarball = self.fetch_asset(
        'http://samba.org/ftp/tridge/dbench/dbench-3.04.tar.gz')
    archive.extract(tarball, self.teststmpdir)
    cb_version = os.path.basename(tarball.split('.tar.')[0])
    self.sourcedir = os.path.join(self.teststmpdir, cb_version)
    os.chdir(self.sourcedir)
    patch = self.params.get('patch', default='dbench_startup.patch')
    process.run('patch -p1 < %s' % self.get_data(patch), shell=True)
    process.run('./configure')
    build.make(self.sourcedir)
    if self.disk is not None:
        if self.disk in disk.get_all_disk_paths():
            if raid_needed:
                raid_name = '/dev/%s' % self.md_name
                self.create_raid(self.disk, raid_name)
                self.raid_create = True
                self.disk = raid_name
            if lv_needed:
                self.disk = self.create_lv(self.disk)
                self.lv_create = True
            if fstype:
                self.create_fs(self.disk, fstype)
                self.fs_create = True