summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* man lvmlockd: remove section about recovering lost locksDavid Teigland2015-06-231-46/+48
|
* lib lvmlockd: print a warning when overriding lockingDavid Teigland2015-06-231-19/+32
| | | | | In addition to requiring lvm.conf configuration to override lock modes, also print a warning if it is done.
* client lvmlockd: improve warnings during initDavid Teigland2015-06-231-7/+14
| | | | | Print one simple warning message if the command cannot properly use lvmlockd.
* lib lvmlockd: add comments about locking functionsDavid Teigland2015-06-231-3/+111
| | | | | Add explanations of when and why to use the basic lvmlockd locking functions.
* tools: add comments about the global lockDavid Teigland2015-06-2318-12/+53
| | | | | State the reason that the global lock is needed in each place it is taken.
* test: structure for lvmlockd testingDavid Teigland2015-06-2313-0/+334
| | | | | | | | | | | | | | | | | | | | | | | 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: option to allow waiting for lock startDavid Teigland2015-06-232-4/+18
| | | | | | | 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'
* lib lvmlockd: fix segfault in logging result flagsDavid Teigland2015-06-231-10/+8
|
* lvmlockd: clean up the use/connect/connected logicDavid Teigland2015-06-236-110/+105
| | | | | Get rid of the round about logic that was copied from lvmetad. Make it simple and clear.
* lvmlockd: fix dm checks of active lvs and add uuid checkDavid Teigland2015-06-231-8/+76
| | | | | | | The split names function wasn't used correct, it just accidentally worked before. Check for the LVM prefix on dm uuids.
* report: display lock_type and lock_argsDavid Teigland2015-06-237-0/+78
| | | | | -o locktype,lockargs can be used to display the lock_type and lock_args of VGs or LVs.
* lvmlock: drop old -c optionDavid Teigland2015-06-231-95/+3
| | | | was used for early testing, no purpose any more.
* lvmlockd: use libdevmapper to get active LVsDavid Teigland2015-06-232-50/+72
| | | | | | | rather than reading /dev dirs. This identifies LVs that need to have locks adopted if lvmlockd is restarted while in use.
* lvmlockd: include time.h and link with rtDavid Teigland2015-06-232-1/+2
|
* lvmlockd: rename socket variableDavid Teigland2015-06-231-2/+2
| | | | to avoid shadowing warning
* lvmlockd: fix setup_structsDavid Teigland2015-06-232-5/+47
| | | | | | | The alloc/free loop was not populating the list of unused structs. Also print the number of structs when reporting info from daemon.
* lvmlockd: apply consistent buffer strategy to clientDavid Teigland2015-06-232-2/+2
|
* lvmlockd: put GNU_SOURCE in source filesDavid Teigland2015-06-233-1/+3
|
* lvmlockd: use libsanlock_clientDavid Teigland2015-06-231-1/+1
| | | | instead of the full libsanlock which isn't needed
* lib: define constant for NO_LOCKD_RESULTDavid Teigland2015-06-231-4/+9
|
* lib: rename flags variablesDavid Teigland2015-06-231-59/+59
|
* lib: use static inline stubs for lockd functionsDavid Teigland2015-06-231-19/+100
| | | | when lvm is built without lvmlockd enabled.
* configure: use pc checks for lvmlockdDavid Teigland2015-06-231-0/+7
|
* lvconvert, pvmove, polldaemon: add locking for lvmlockdDavid Teigland2015-06-233-14/+205
|
* scripts: lvmlockd related service filesDavid Teigland2015-06-232-0/+43
|
* man: add lvmlockd man pageDavid Teigland2015-06-231-0/+794
|
* liblvm: new unused arg for vg_readDavid Teigland2015-06-231-1/+1
|
* tools: use locks from lvmlockdDavid Teigland2015-06-2322-60/+763
|
* tools: locking support for toolsDavid Teigland2015-06-234-16/+55
|
* lib: use locks from lvmlockdDavid Teigland2015-06-2311-29/+275
|
* lib: client side locking interface to lvmlockdDavid Teigland2015-06-232-0/+2425
|
* lvmlockd: add daemonDavid Teigland2015-06-237-0/+8960
|
* build: standard configure and Makefile for lvmlockdDavid Teigland2015-06-234-2/+55
|
* metadata: add lock_type and lock_argsDavid Teigland2015-06-234-1/+29
| | | | | | | | | 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.
* libdaemon: allow main processing function to be specifiedDavid Teigland2015-06-232-1/+8
|
* doc: mention new invalid states in lvmetad_designDavid Teigland2015-06-231-0/+11
|
* Reread global state the lvmetad copy is staleDavid Teigland2015-06-232-0/+298
| | | | | | | | | | | This is the client side handling of the global_invalid state added to lvmetad in commit c595b50cec8a6b95c6ac4988912d1412f3cc0237. The function added here: . checks if the global state in lvmetad is invalid . if so, scans disks to update the state in lvmetad . clears the global_invalid flag in lvmetad . updates the local udev db to reflect any changes
* Reread a VG if the lvmetad copy is staleDavid Teigland2015-06-231-0/+106
| | | | | | | and update the lvmetad copy after it is reread from disk. This is the client side handling of the vg_invalid state added to lvmetad in commit c595b50cec8a6b95c6ac4988912d1412f3cc0237.
* lvmetad: add invalidation methodDavid Teigland2015-06-231-1/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests: use vgscan after enable_devZdenek Kabelac2015-06-231-2/+6
| | | | | | | | | | Since our test environment runs also in non-real-udev world, it's using /etc/.cache file with scanned files. So in this case it is mandatory the user runs 'vgscan' after a device reappears in the system. This 'first' lvm2 command then fixes metadata (just like vgs did).
* tests: skip when snapshot does not workZdenek Kabelac2015-06-231-0/+2
| | | | | Some older kernel (i.e. 3.11.10 on fc20) do not work properly. Skip the test if snapshot does not meet 50%.
* tests: newer version needed for ext-origZdenek Kabelac2015-06-231-1/+3
|
* cleanup: avoid printing gcc warningZdenek Kabelac2015-06-232-3/+7
| | | | | Casting to (void) with gcc doesn't remove unused_result warning. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
* post-releaseAlasdair G Kergon2015-06-204-2/+8
|
* pre-releasev2_02_122Alasdair G Kergon2015-06-204-8/+11
|
* tests: external origin updatesZdenek Kabelac2015-06-192-3/+9
| | | | | Update test for recent updates to support unalligned sizes and extension of reduced volume.
* log: flush stdout before print to stderrZdenek Kabelac2015-06-191-0/+2
| | | | Keep logging readable and fflush stdout before printing to stderr.
* lvm: move hyphen mangling codeZdenek Kabelac2015-06-193-25/+25
| | | | | | | Relocate hyphen code from lvm main into lvm_run_command() so all command and library user will have it. Update WHATS_NEW with missing changes.
* display: drop allocation from display_lvnameZdenek Kabelac2015-06-183-2/+20
| | | | | | | | | | | | | Use of display_lvname() in plain log_debug() may accumulate memory in command context mempool. Use instead small ringbuffer which allows to store cuple (10 ATM) names so upto 10 full names can be used at one. We are not keeping full VG/LV names as it may eventually consume larger amount of RAM resouces if vgname is longer and lots of LVs are in use. Note: if there would be ever needed for displaing more names at once, the limit should be raised (e.g. log_debug() would need to print more then 10 LVs on a single line).
* thin: support unaligned size of external origin and thin poolZdenek Kabelac2015-06-184-8/+102
| | | | | | | | | With thin-pool kernel target module 1.13 it's now support usage of external origin with sizes which are not 'alligned' with chunk size of thin-pool. Enable lvm2 support for this and also fix reporting of data_percent usage for case sizes are not alligned.