Skip to content

Commit

Permalink
Version 8.3.0.71
Browse files Browse the repository at this point in the history
- Removed obsolete utilities.
- Fixed version numbering.
- Updated project documentation.

Signed-off-by: Matthew Sakai <[email protected]>
  • Loading branch information
lorelei-sakai committed Jun 3, 2024
1 parent 59ad798 commit bfd434b
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 1,342 deletions.
117 changes: 49 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,50 @@ block storage.

## Background

VDO (which includes [kvdo](https://github.com/dm-vdo/kvdo) and
[vdo](https://github.com/dm-vdo/vdo)) is software that provides inline
block-level deduplication, compression, and thin provisioning capabilities for
primary storage. VDO installs within the Linux device mapper framework, where
it takes ownership of existing physical block devices and remaps these to new,
higher-level block devices with data-efficiency capabilities.
VDO is a device-mapper target that provides inline block-level deduplication,
compression, and thin provisioning capabilities for primary storage. VDO
is managed through LVM and can be integrated into any existing storage stack.

Deduplication is a technique for reducing the consumption of storage resources
by eliminating multiple copies of duplicate blocks. Compression takes the
individual unique blocks and shrinks them with coding algorithms; these reduced
blocks are then efficiently packed together into physical blocks. Thin
provisioning manages the mapping from LBAs presented by VDO to where the data
has actually been stored, and also eliminates any blocks of all zeroes.
provisioning manages the mapping from logical block addresses presented by VDO
to where the data has actually been stored, and also eliminates any blocks of
all zeroes.

With deduplication, instead of writing the same data more than once each
duplicate block is detected and recorded as a reference to the original
block. VDO maintains a mapping from logical block addresses (used by the
storage layer above VDO) to physical block addresses (used by the storage layer
under VDO). After deduplication, multiple logical block addresses may be mapped
block. VDO maintains a mapping from logical block addresses (presented to the
storage layer above VDO) to physical block addresses on the storage layer
under VDO. After deduplication, multiple logical block addresses may be mapped
to the same physical block address; these are called shared blocks and are
reference-counted by the software.

With VDO's compression, multiple blocks (or shared blocks) are compressed with
the fast LZ4 algorithm, and binned together where possible so that multiple
compressed blocks fit within a 4 KB block on the underlying storage. Mapping
from LBA is to a physical block address and index within it for the desired
compressed data. All compressed blocks are individually reference counted for
With VDO's compression, blocks are compressed with the fast LZ4 algorithm, and
collected together where possible so that multiple compressed blocks fit within
a single 4 KB block on the underlying storage. Each logical block address is
mapped to a physical block address and an index within it for the desired
compressed data. All compressed blocks are individually reference-counted for
correctness.

Block sharing and block compression are invisible to applications using the
storage, which read and write blocks as they would if VDO were not
present. When a shared block is overwritten, a new physical block is allocated
for storing the new block data to ensure that other logical block addresses
that are mapped to the shared physical block are not modified.

This public source release of VDO includes two kernel modules, and a set of
userspace tools for managing them. The "kvdo" module implements fine-grained
storage virtualization, thin provisioning, block sharing, and compression; the
"uds" module provides memory-efficient duplicate identification. The userspace
tools include a pair of python scripts, "vdo" for creating and managing VDO
volumes, and "vdostats" for extracting statistics from those volumes.
storage, which read and write blocks as they would if VDO were not present.
When a shared block is overwritten, a new physical block is allocated for
storing the new block data to ensure that other logical block addresses that
are mapped to the shared physical block are not modified.

This repository contains a set of userspace tools for managing VDO volumes.
These include "vdoformat" for creating new volumes, "vdostats" for extracting
statistics from those volumes, and a variety of support and debugging tools
which should not be necessary during ordinary operation.

## History

VDO was originally developed by Permabit Technology Corp. as a proprietary set
of kernel modules and userspace tools. This software and technology has been
acquired by Red Hat and relicensed under the GPL (v2 or later). The kernel
module has been merged into the upstream Linux kernel as dm-vdo.

## Documentation

Expand All @@ -56,40 +59,26 @@ volumes, and "vdostats" for extracting statistics from those volumes.

## Releases

Each branch on this project is intended to work with a specific release of
Enterprise Linux (Red Hat Enterprise Linux, CentOS, etc.). We try to maintain
compatibility with active Fedora releases, but some modifications may be
required and if they become too extensive we may stop providing these updates at
any point for a particular branch.
The master branch of this repository is intended to be compatible with the most
recent version of the Linux kernel. These packages are available in active
Fedora releases with matching kernel versions.

Version | Intended Enterprise Linux Release | Supported With Modifications
------- | --------------------------------- | -------------------------------
6.1.x.x | EL7 (3.10.0-*.el7) |
6.2.x.x | EL8 (4.18.0-*.el8) | Supported Fedora Releases and Rawhide
8.x.x.x | EL9 (5.14.0-*.el9) | Supported Fedora Releases and Rawhide
Version | Oldest Supported Linux Kernel Version
------- | --------------------------------------
8.3.x.x | 6.9.0

* Pre-built versions with the required modifications for the referenced Fedora
releases can be found
[here](https://copr.fedorainfracloud.org/coprs/rhawalsh/dm-vdo) and can be
used by running `dnf copr enable rhawalsh/dm-vdo`.
Each older branch of this repository is intended to work with a specific
release of Enterprise Linux (Red Hat Enterprise Linux, CentOS, etc.).

**The [unstable](https://github.com/dm-vdo/vdo/tree/unstable) branch provides a
snapshot of our most up to date internal code that is targeting the mainline
kernel and is currently under test. There are no guarantees of stability from
this branch.**
Version | Intended Enterprise Linux Release
------- | ---------------------------------
6.1.x.x | EL7 (3.10.0-*.el7)
6.2.x.x | EL8 (4.18.0-*.el8)
8.2.x.x | EL9 (5.14.0-*.el9)

## Status

VDO was originally developed by Permabit Technology Corp. as a proprietary set
of kernel modules and userspace tools. This software and technology has been
acquired by Red Hat, has been relicensed under the GPL (v2 or later), and this
repository begins the process of preparing for integration with the upstream
kernel.

While this software has been relicensed there are a number of issues that must
still be addressed to be ready for inclusion into the upstream kernel. To see
the progress of this effort, visit the [Unstable
branch](https://github.com/dm-vdo/vdo/tree/unstable) of this project.
* Pre-built versions with the required modifications for older Fedora releases
can be found [here](https://copr.fedorainfracloud.org/coprs/rhawalsh/dm-vdo)
and can be used by running `dnf copr enable rhawalsh/dm-vdo`.

## Building

Expand All @@ -104,19 +93,11 @@ of this tree, as the root user:

make install

## Communication channels
## Communication Channels and Contributions

Community feedback, participation and patches are welcome to the
[email protected] mailing list -- subscribe
[here](https://www.redhat.com/mailman/listinfo/vdo-devel).

## Contributing

This project is currently a stepping stone towards integration with the Linux
kernel. As such, contributions are welcome via a process similar to that for
Linux kernel development. Patches should be submitted to the
[email protected] mailing list, where they will be considered for
inclusion. This project does not accept pull requests.
[vdo-devel](https://github.com/dm-vdo/vdo-devel) repository, which is the
parent of this one. This repository does not accept pull requests.

## Licensing

Expand Down
2 changes: 1 addition & 1 deletion utils/uds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 02110-1301, USA.
#

BUILD_VERSION = 8.4.0.0
BUILD_VERSION = 8.3.0.71

DEPDIR = .deps

Expand Down
4 changes: 4 additions & 0 deletions utils/uds/asm/unaligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
#define min(x, y) COMPARE(x, y, <)
#define max(x, y) COMPARE(x, y, >)

/* Defined in linux/minmax.h */
#define swap(a, b) \
do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)

/* Defined in linux/math.h */
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))

Expand Down
5 changes: 1 addition & 4 deletions utils/uds/index.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,12 @@ static int finish_previous_chapter(struct uds_index *index, u64 current_chapter_
static int swap_open_chapter(struct index_zone *zone)
{
int result;
struct open_chapter_zone *temporary_chapter;

result = finish_previous_chapter(zone->index, zone->newest_virtual_chapter);
if (result != UDS_SUCCESS)
return result;

temporary_chapter = zone->open_chapter;
zone->open_chapter = zone->writing_chapter;
zone->writing_chapter = temporary_chapter;
swap(zone->open_chapter, zone->writing_chapter);
return UDS_SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion utils/uds/io-factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void uds_put_io_factory(struct io_factory *factory)

size_t uds_get_writable_size(struct io_factory *factory)
{
return i_size_read(factory->bdev->bd_inode);
return bdev_nr_bytes(factory->bdev);
}

/* Create a struct dm_bufio_client for an index region starting at offset. */
Expand Down
15 changes: 5 additions & 10 deletions utils/uds/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#define format_dev_t(buffer, dev) \
sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev))

/* Defined in linux/fs.h but hacked for vdo unit testing */
struct inode {
loff_t size;
};

/* Defined in linux/blk_types.h */
typedef unsigned int blk_opf_t;
typedef uint32_t blk_status_t;
Expand All @@ -39,8 +34,8 @@ struct block_device {
int fd;
dev_t bd_dev;

/* This is only here for i_size_read(). */
struct inode *bd_inode;
/* This is only here for bdev_nr_bytes(). */
loff_t size;
};

/**********************************************************************/
Expand All @@ -58,10 +53,10 @@ static inline blk_status_t errno_to_blk_status(int error)
/**********************************************************************/
blk_qc_t submit_bio_noacct(struct bio *bio);

/* Defined in linux/fs.h, but it's convenient to implement here. */
static inline loff_t i_size_read(const struct inode *inode)
/**********************************************************************/
static inline loff_t bdev_nr_bytes(struct block_device *bdev)
{
return (inode == NULL) ? (loff_t) SIZE_MAX : inode->size;
return bdev->size;
}

#endif // LINUX_BLKDEV_H
27 changes: 9 additions & 18 deletions utils/vdo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 02110-1301, USA.
#

VDO_VERSION = 8.4.0.0
VDO_VERSION = 8.3.0.71

UDS_DIR = ../uds

Expand Down Expand Up @@ -79,18 +79,14 @@ LDPRFLAGS = -ldl -pthread -lz -lrt -lm -luuid
DEPLIBS = $(UDS_DIR)/libuds.a
LIBFLAGS = -pthread -lrt

PROGS = vdoaudit \
vdodebugmetadata \
vdodmeventd \
vdodumpblockmap \
vdodumpconfig \
vdodumpmetadata \
vdoforcerebuild \
vdoformat \
vdolistmetadata \
vdoreadonly \
vdoregenerategeometry \
vdosetuuid \
PROGS = vdoaudit \
vdodebugmetadata \
vdodumpblockmap \
vdodumpmetadata \
vdoforcerebuild \
vdoformat \
vdolistmetadata \
vdoreadonly \
vdostats

COMPLETIONS=vdostats
Expand All @@ -101,8 +97,6 @@ PROG_SOURCES := $(PROGS:%=%.c)
C_FILES := $(filter-out $(PROG_SOURCES),$(wildcard *.c))
LIB_OBJECTS := $(C_FILES:%.c=%.o)

DMEVENT_LIB = libdevmapper-event-lvm2vdo.so

.PHONY: all
all: libvdo.a $(PROGS)

Expand Down Expand Up @@ -148,8 +142,6 @@ install:
$(MV) $(DEPDIR)/$*.d.new $(DEPDIR)/$*.d ; \
fi

vdodmeventd.o: CFLAGS += "-DPLUGIN_NAME=\"$(DMEVENT_LIB)\""

$(DEPDIR)/%.d: %.c
@mkdir -p $(DEPDIR)
$(CC) $(CFLAGS) -MM -MF $@ -MP -MT $*.o $<
Expand All @@ -160,7 +152,6 @@ $(PROGS): [email protected] libvdo.a $(DEPLIBS)
$(CC) $(LDFLAGS) $^ $(LDPRFLAGS) -o $@

vdoformat: LDPRFLAGS += "-lblkid"
vdodmeventd: LDPRFLAGS += "-ldevmapper-event"

ifneq ($(MAKECMDGOALS),clean)
DEPSOURCES = $(wildcard *.c)
Expand Down
26 changes: 11 additions & 15 deletions utils/vdo/man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@
#

INSTALLFILES= \
adaptlvm.8 \
vdoaudit.8 \
vdodebugmetadata.8 \
vdodmeventd.8 \
vdodumpblockmap.8 \
vdodumpconfig.8 \
vdodumpmetadata.8 \
vdoforcerebuild.8 \
vdoformat.8 \
vdolistmetadata.8 \
vdoreadonly.8 \
vdorecover.8 \
vdoregenerategeometry.8 \
vdosetuuid.8 \
vdostats.8
adaptlvm.8 \
vdoaudit.8 \
vdodebugmetadata.8 \
vdodumpblockmap.8 \
vdodumpmetadata.8 \
vdoforcerebuild.8 \
vdoformat.8 \
vdolistmetadata.8 \
vdoreadonly.8 \
vdorecover.8 \
vdostats.8

INSTALL = install
INSTALLOWNER ?= -o root -g root
Expand Down
37 changes: 0 additions & 37 deletions utils/vdo/man/vdodmeventd.8

This file was deleted.

25 changes: 0 additions & 25 deletions utils/vdo/man/vdodumpconfig.8

This file was deleted.

Loading

0 comments on commit bfd434b

Please sign in to comment.