mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository
https://sourceware.org/lvm2/
7a8b7b4add
Alongside the existed locking schemes of DLM and sanlock, this patch is to introduce new locking scheme: In-Drive-Mutex (IDM). With the IDM support in the drive, the locks are resident in the drive, thus, the locking lease is maintained in a central place: the drive firmware. We can consider this is a typical client-server model, every host (or node) in the server cluster launches the request for leasing mutex to a drive firmware, the drive firmware works as an arbitrator to grant the mutex to a requester and it can reject other applicants if the mutex has been acquired. To satisfy the LVM activation for different modes, IDM supports two locking modes: exclusive and shareable. Every IDM is identified with two IDs, one is the host ID and another is the resource ID. The resource ID is a unique identifier for what the resource it's protected, in the integration with lvmlockd, the resource ID is combined with VG's UUID and LV's UUID; for the global locking, the bytes in resource ID are all zeros, and for the VG locking, the LV's UUID is set as zero. Every host can generate a random UUID and use it as the host ID for the SCSI command, this ID is used to clarify the ownership for mutex. For easily invoking the IDM commands to drive, like other locking scheme (e.g. sanlock), a daemon program named IDM lock manager is created, so the detailed IDM SCSI commands are encapsulated in the daemon, and lvmlockd uses the wrapper APIs to communicate with the daemon program. This patch introduces the IDM locking wrapper layer, it forwards the locking requests from lvmlockd to the IDM lock manager, and returns the result from drives' responding. One thing should be mentioned is the IDM's LVB. IDM supports LVB to max 7 bytes when stores into the drive, the most significant byte of 8 bytes is reserved for control bits. For this reason, the patch maps the timestamp in macrosecond unit with its cached LVB, essentially, if any timestamp was updated by other nodes, that means the local LVB is invalidate. When the timestamp is stored into drive's LVB, it's possbile to cause time-going-backwards issue, which is introduced by the time precision or missing synchronization acrossing over multiple nodes. So the IDM wrapper fixes up the timestamp by increment 1 to the latest value and write back into drive. Currently LVB is used to track VG changes and its purpose is to notify lvmetad cache invalidation when detects any metadata has been altered; but lvmetad is not used anymore for caching metadata, LVB doesn't really work. It's possible that the LVB functionality could be useful again in the future, so let's enable it for IDM in the first place. Signed-off-by: Leo Yan <leo.yan@linaro.org> |
||
---|---|---|
autoconf | ||
base | ||
conf | ||
coverity | ||
daemons | ||
device_mapper | ||
doc | ||
include | ||
lib | ||
libdaemon | ||
libdm | ||
man | ||
nix | ||
po | ||
scripts | ||
spec | ||
test | ||
tools | ||
udev | ||
.gitignore | ||
acinclude.m4 | ||
aclocal.m4 | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.BSD | ||
COPYING.LIB | ||
INSTALL | ||
make.tmpl.in | ||
Makefile.in | ||
README | ||
TESTING | ||
VERSION | ||
VERSION_DM | ||
WHATS_NEW | ||
WHATS_NEW_DM |
This tree contains the LVM2 and device-mapper tools and libraries. This is development branch, for stable 2.02 release see stable-2.02 branch. For more information about LVM2 read the changelog in the WHATS_NEW file. Installation instructions are in INSTALL. There is no warranty - see COPYING and COPYING.LIB. Tarballs are available from: ftp://sourceware.org/pub/lvm2/ https://github.com/lvmteam/lvm2/releases The source code is stored in git: https://sourceware.org/git/?p=lvm2.git git clone git://sourceware.org/git/lvm2.git mirrored to: https://github.com/lvmteam/lvm2 git clone https://github.com/lvmteam/lvm2.git git clone git@github.com:lvmteam/lvm2.git Mailing list for general discussion related to LVM2: linux-lvm@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm Mailing lists for LVM2 development, patches and commits: lvm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel lvm2-commits@lists.fedorahosted.org (Read-only archive of commits) Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits Mailing list for device-mapper development, including kernel patches and multipath-tools: dm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel Website: https://sourceware.org/lvm2/ Report upstream bugs at: https://bugzilla.redhat.com/enter_bug.cgi?product=LVM%20and%20device-mapper or open issues at: https://github.com/lvmteam/lvm2/issues The source code repository used until 7th June 2012 is accessible using CVS: cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 login cvs cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 checkout LVM2 The password is cvs.