| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Use standard syslog level names as option args to
specify the level at which to send to syslog.
|
|
|
|
|
|
|
| |
By default, vgcreate and vgchange --lock-start will
wait for the lockspace to start. Adding --lock-opt nowait
will cause them not to wait. The waiting can always
be canceled by Ctrl-C without any harm.
|
|
|
|
|
|
|
|
|
|
|
| |
By default retry lock operations that return EAGAIN
because the lock is held by another host.
These retries occur at the client/command level, and
can be adjusted using global/lock_retries.
lvmlockd already has some automatic retries to handle
most incidental lock conflicts.
|
| |
|
|
|
|
|
| |
In addition to requiring lvm.conf configuration to override
lock modes, also print a warning if it is done.
|
|
|
|
|
| |
Print one simple warning message if the command cannot
properly use lvmlockd.
|
|
|
|
|
| |
Add explanations of when and why to use the basic lvmlockd
locking functions.
|
|
|
|
|
| |
State the reason that the global lock is
needed in each place it is taken.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make check_lvmlockd_sanlock T=shell/sanlock-hello-world.sh
will run:
shell/sanlock-prepare.sh to prepare sanlock and lvmlockd on the system
shell/sanlock-hello-work.sh to test using lvmlockd and sanlock
shell/sanlock-remove.sh to undo the things from sanlock-prepare.sh
TODO:
- use alias vgcreate="vgcreate --lock-type sanlock" in sanlock-prepare
so that existing shell tests can just call vgcreate can be used to
create and test sanlock vgs.
- when using existing shell tests with sanlock, we need
prepare_devs/prepare_pvs to create adequately large devs.
See the necessity of sanlock-hello-world of specifying
a large device size. This is needed for all the ondisk
leases that are created by vgcreate.
- get check_lvmlockd_dlm working
|
|
|
|
|
|
|
| |
vgcreate with '--lock-opt wait' will cause the command
to wait for the lock start to complete before returning,
the same as when starting explicitly with
'vgchange --lock-start --lock-opt wait'
|
| |
|
|
|
|
|
| |
Get rid of the round about logic that was copied
from lvmetad. Make it simple and clear.
|
|
|
|
|
|
|
| |
The split names function wasn't used correct, it just
accidentally worked before.
Check for the LVM prefix on dm uuids.
|
|
|
|
|
| |
-o locktype,lockargs can be used to display
the lock_type and lock_args of VGs or LVs.
|
|
|
|
| |
was used for early testing, no purpose any more.
|
|
|
|
|
|
|
| |
rather than reading /dev dirs.
This identifies LVs that need to have locks
adopted if lvmlockd is restarted while in use.
|
|
|
|
| |
and add the clearer macros to xlate.h
|
| |
|
|
|
|
| |
to avoid shadowing warning
|
|
|
|
|
|
|
| |
The alloc/free loop was not populating the
list of unused structs.
Also print the number of structs when reporting info from daemon.
|
| |
|
| |
|
|
|
|
| |
instead of the full libsanlock which isn't needed
|
| |
|
| |
|
|
|
|
| |
when lvm is built without lvmlockd enabled.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Structs and metadata for VG and LV each have
a lock_type string and a lock_args string.
The VG lock_type is inherited by its LVs,
but special LVs that are not locked will
have no lock_type set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and update the lvmetad copy after it is reread from disk.
To test this:
- Create VG foo that is visible to two hosts and usable by both.
- On both run 'lvmeta vg_lookup_name foo' to see the cached copy of
foo and its seqno. Say the seqno is 8.
- On host1 run 'lvcreate -n lv1 -L1G foo'.
- On host1 run 'lvmeta vg_lookup_name foo' to see the new version
of foo in lvmetad. It should have seqno 9.
- On host2 run 'lvmeta vg_lookup_name foo' to see the old cached
version of foo. It should have seqno 8.
- On host2 run 'lvmeta set_vg_version <uuid of foo> 9'.
- On host2 run 'lvmeta vg_lookup_name foo' to see that the vg_invalid
config node is reported along with the old cached version of foo.
- On host2 run 'lvs foo'. It should reread foo from disk and display lv1.
- On host2 run 'lvmeta vg_lookup_name foo' to see that the cached version
of foo is now updated to seqno 9, and the vg_invalid node is not reported.
|
|
|
|
|
| |
Will be used in later patches to check and update the
local lvmetad global cache when needed.
|
|
|
|
| |
This is useful for testing and debugging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the ability to invalidate global or individual VG metadata.
The invalid state is returned to lvm commands along with the metadata.
This allows lvm commands to detect stale metadata from the cache and
reread the latest metadata from disk (in a subsequent patch.)
These changes do not change the protocol or compatibility between
lvm commands and lvmetad.
Global information
------------------
Global information refers to metadata that is not isolated
to a single VG , e.g. the list of vg names, or the list of pvs.
When an external system, e.g. a locking system, detects that global
information has been changed from another host (e.g. a new vg has been
created) it sends lvmetad the message: set_global_info: global_invalid=1.
lvmetad sets the global invalid flag to indicate that its cached data is
stale.
When lvm commands request information from lvmetad, lvmetad returns the
cached information, along with an additional top-level config node called
"global_invalid". This new info tells the lvm command that the cached
information is stale.
When an lvm command sees global_invalid from lvmated, it knows it should
rescan devices and update lvmetad with the latest information. When this
is complete, it sends lvmetad the message: set_global_info:
global_invalid=0, and lvmetad clears the global invalid flag. Further lvm
commands will use the lvmetad cache until it is invalidated again.
The most common commands that cause global invalidation are vgcreate and
vgextend. These are uncommon compared to commands that report global
information, e.g. vgs. So, the percentage of lvmetad replies containing
global_invalid should be very small.
VG information
--------------
VG information refers to metadata that is isolated to a single VG,
e.g. an LV or the size of an LV.
When an external system determines that VG information has been changed
from another host (e.g. an lvcreate or lvresize), it sends lvmetad the
message: set_vg_info: uuid=X version=N. X is the VG uuid, and N is the
latest VG seqno that was written. lvmetad checks the seqno of its cached
VG, and if the version from the message is newer, it sets an invalid flag
for the cached VG. The invalid flag, along with the newer seqno are saved
in a new vg_info struct.
When lvm commands request VG metadata from lvmetad, lvmetad includes the
invalid flag along with the VG metadata. The lvm command checks for this
flag, and rereads the VG from disk if set. The VG read from disk is sent
to lvmetad. lvmetad sees that the seqno in the new version matches the
seqno from the last set_vg_info message, and clears the vg invalid flag.
Further lvm commands will use the VG metadata from lvmetad until it is
next invalidated.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
currently in wait_for_single_lv() fn trying to poll missing pvmove LV
is considered success. It may have been already finished by another
instance of polldaemon. either by another forked off polldaemon
or by lvmpolld.
Let's try to handle the mirror conversion and snapshot merge the same
way.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
These wrappers have been replaced by direct calls
to vg_read() and find_lv() in previous commits.
This commit should have no functional impact since
all bits were already unreachable.
|
| |
|