summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vgchange: fix uint32 parsing of logicalvolume argdev-dct-cmd-defs75David Teigland2017-02-062-14/+5
|
* commands: recognize raid variationsDavid Teigland2017-02-062-11/+7
|
* commands: move command def parsing into lvm binaryDavid Teigland2017-02-0612-3468/+2751
|
* lvconvert: remove unused codeDavid Teigland2017-02-061-39/+7
| | | | For "split" which is not an alias for splitmirrors.
* args: split is a synonym for splitcacheDavid Teigland2017-02-063-33/+31
| | | | also tidy the other synonyms
* man: add vgsplit notesDavid Teigland2017-02-061-0/+18
| | | | from previous man page
* man: add vgimportclone notesDavid Teigland2017-02-061-0/+9
| | | | from previous man page
* man: add vgimport notesDavid Teigland2017-02-061-0/+9
| | | | from previous man page
* man: add vgexport notesDavid Teigland2017-02-061-0/+14
| | | | from previous man page
* man: add pvscan notesDavid Teigland2017-02-061-0/+103
| | | | from previous man page
* man: add pvmove notesDavid Teigland2017-02-061-0/+47
| | | | Copied from the previous man page.
* man: lvmlockd/clvmd notes about activationDavid Teigland2017-02-062-15/+53
| | | | | | activation details about lvmlockd and clvmd that were previously in the generic lvchange -a section are now moved to these man pages.
* generate man pagesDavid Teigland2017-02-0653-6663/+122
|
* man: lvmthin updatesDavid Teigland2017-02-061-12/+9
| | | | | Some minor changes to some of the command syntaxes to use more standard forms.
* ccmd: split into multiple filesDavid Teigland2017-02-066-3171/+3209
|
* command struct: remove command name refsDavid Teigland2017-02-068-30/+26
| | | | | | | Change run time access to the command_name struct cmd->cname instead of indirectly through cmd->command->cname. This removes the two run time fields from struct command.
* command.h comment tidyingDavid Teigland2017-02-061-8/+6
|
* lvm shell: clear argv for each commandDavid Teigland2017-02-061-1/+4
|
* help: accept positional argsDavid Teigland2017-02-061-0/+1
| | | | lvm help <commandname> ...
* fix lvmcmdline warningDavid Teigland2017-02-061-20/+20
| | | | declaration of ‘usage’ shadows a globa
* Makefile: clean up create-command partsDavid Teigland2017-02-061-5/+31
|
* man lvm: remove optionsDavid Teigland2017-02-061-255/+3
| | | | all options are now included in commands
* args: add man page descriptionsDavid Teigland2017-02-064-268/+1611
|
* args: use uint32 arg for maxphysicalvolumesDavid Teigland2017-02-064-4/+6
|
* lvconvert: remove unused codeDavid Teigland2017-02-061-1731/+325
|
* lvconvert: use command defs for raid/mirror typesDavid Teigland2017-02-064-797/+323
| | | | | | | | | | All lvconvert functionality has been moved out of the previous monolithic lvconvert code, except conversions related to raid/mirror/striped/linear. This switches that remaining code to be based on command defs, and standard process_each_lv arg processing. This final switch results in quite a bit of dead code that is also removed.
* tests: use swapmetadataDavid Teigland2017-02-065-33/+33
| | | | and some other pool/cache/thin related changes
* lvconvert: use command defs for mergemirrorsDavid Teigland2017-02-065-40/+111
| | | | | and route the generic --merge to one of the specific merge functions
* toollib: find VG name in option values when neededDavid Teigland2017-02-064-2/+162
|
* lvconvert: use command defs for thin/cache/pool creationDavid Teigland2017-02-0610-74/+1394
| | | | Everything related to thin and cache.
* lvconvert: add startpoll command using command defDavid Teigland2017-02-066-18/+86
| | | | | | This is a new explicit version of 'lvconvert LV' which has been an obscure way of triggering polling to be restarted on an LV that was previously converted.
* lvconvert: snapshot: use command definitionsDavid Teigland2017-02-0610-140/+277
| | | | | | | Lift all the snapshot utilities (merge, split, combine) out of the monolithic lvconvert implementation, using the command definitions. The old code associated with these commands is now unused and will be removed separately.
* lvconvert: remove unused calls for repair and replaceDavid Teigland2017-02-061-227/+10
| | | | | repair and replace are no longer called from the monolithic lvconvert code, so remove the unused code.
* lvconvert: repair and replace: use command definitionsDavid Teigland2017-02-064-18/+330
| | | | | | | This lifts the lvconvert --repair and --replace commands out of the monolithic lvconvert implementation. The previous calls into repair/replace can no longer be reached and will be removed in a separate commit.
* lvchange: make use of command definitionsDavid Teigland2017-02-064-452/+430
| | | | | | Reorganize the lvchange code to take advantage of the command definition, and remove the validation that is done by the command definintion rules.
* process_each_lv: add check_single_lv functionDavid Teigland2017-02-0611-15/+38
| | | | | | | | | | | | | | | | | The new check_single_lv() function is called prior to the existing process_single_lv(). If the check function returns 0, the LV will not be processed. The check_single_lv function is meant to be a standard method to validate the combination of specific command + specific LV, and decide if the combination is allowed. The check_single function can be used by anything that calls process_each_lv. As commands are migrated to take advantage of command definitions, each command definition gets its own entry point which calls process_each for itself, passing a pair of check_single/process_single functions which can be specific to the narrowly defined command def.
* commands: new method for defining commandsDavid Teigland2017-02-0628-1836/+7312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . Define a prototype for every lvm command. . Match every user command with one definition. . Generate help text and man pages from them. The new file command-lines.in defines a prototype for every unique lvm command. A unique lvm command is a unique combination of: command name + required option args + required positional args. Each of these prototypes also includes the optional option args and optional positional args that the command will accept, a description, and a unique string ID for the definition. Any valid command will match one of the prototypes. Here's an example of the lvresize command definitions from command-lines.in, there are three unique lvresize commands: lvresize --size SizeMB LV OO: --alloc Alloc, --autobackup Bool, --force, --nofsck, --nosync, --noudevsync, --reportformat String, --resizefs, --stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB OP: PV ... ID: lvresize_by_size DESC: Resize an LV by a specified size. lvresize LV PV ... OO: --alloc Alloc, --autobackup Bool, --force, --nofsck, --nosync, --noudevsync, --reportformat String, --resizefs, --stripes Number, --stripesize SizeKB ID: lvresize_by_pv DESC: Resize an LV by specified PV extents. FLAGS: SECONDARY_SYNTAX lvresize --poolmetadatasize SizeMB LV_thinpool OO: --alloc Alloc, --autobackup Bool, --force, --nofsck, --nosync, --noudevsync, --reportformat String, --stripes Number, --stripesize SizeKB OP: PV ... ID: lvresize_pool_metadata_by_size DESC: Resize a pool metadata SubLV by a specified size. The three commands have separate definitions because they have different required parameters. Required parameters are specified on the first line of the definition. Optional options are listed after OO, and optional positional args are listed after OP. This data is used to generate corresponding command definition structures for lvm in command-lines.h. usage/help output is also auto generated, so it is always in sync with the definitions. Every user-entered command is compared against the set of command structures, and matched with one. An error is reported if an entered command does not have the required parameters for any definition. The closest match is printed as a suggestion, and running lvresize --help will display the usage for each possible lvresize command. The prototype syntax used for help/man output includes required --option and positional args on the first line, and optional --option and positional args enclosed in [ ] on subsequent lines. command_name <required_opt_args> <required_pos_args> [ <optional_opt_args> ] [ <optional_pos_args> ] Command definitions that are not to be advertised/suggested have the flag SECONDARY_SYNTAX. These commands will not be printed in the normal help output. Man page prototypes are also generated from the same original command definitions, and are always in sync with the code and help text. Very early in command execution, a matching command definition is found. lvm then knows the operation being done, and that the provided args conform to the definition. This will allow lots of ad hoc checking/validation to be removed throughout the code. Each command definition can also be routed to a specific function to implement it. The function is associated with an enum value for the command definition (generated from the ID string.) These per-command-definition implementation functions have not yet been created, so all commands currently fall back to the existing per-command-name implementation functions. Using per-command-definition functions will allow lots of code to be removed which tries to figure out what the command is meant to do. This is currently based on ad hoc and complicated option analysis. When using the new functions, what the command is doing is already known from the associated command definition.
* lvmlockd: test mode doesn't workDavid Teigland2017-02-061-0/+5
| | | | | | The --test option is not yet compatible with shared VGs because changes are made in lvmlockd that cannot be reversed or faked.
* tests: drop zeroingZdenek Kabelac2017-02-061-11/+11
| | | | | | | Well waiting for zeroing may take enough time to finish 'raid' sync. So make the test running faster without zeroing and better avoid race to have chance to happen (i.e. lvcreate is finished after array gets already in sync).
* tests: drop /tmp polutionZdenek Kabelac2017-02-061-2/+0
| | | | Drop forgotten extra metadata debug.
* cleanup: hide gcc warningZdenek Kabelac2017-02-061-2/+2
| | | | | Gcc is not clever enough to see these vars are actually initialize in given code path so let's just make sure it has a value.
* debug: add space before uuidZdenek Kabelac2017-02-051-5/+5
| | | | | | With commit 88534625282e8d533ae439ed308a285da10e3ef0 we added uuid right after device name. Add space between them. (Also fix some indenting)
* comment: updateZdenek Kabelac2017-02-051-1/+1
| | | | Fix can -> cannot.
* cleanup: rename to use track_ prefixZdenek Kabelac2017-02-051-9/+10
| | | | | | Since we use 'track_' prefix for other deps tracking, convert skip_external_lv to use same logical meaning. (just converts 1->0 0->1)
* clvmd: add mutex protection for cpg_ callZdenek Kabelac2017-02-052-0/+5
| | | | | The library for corosync multicasting is not supporting multithread usage - add local mutex to avoid parallel call of cpg_mcast_joined().
* lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from itHeinz Mauelshagen2017-02-056-225/+248
| | | | | | | | | | | | Add: - support for segment types raid6_{ls,rs,la,ra}_6 (striped raid with dedicated last Q-Syndrome SubLVs) - conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6 - setting convenient segtypes on conversions from/to raid4/5/6 - related tests to lvconvert-raid-takeover.sh factoring out _lvcreate,_lvconvert funxtions Related: rhbz1366296
* WHATS_NEW: New segment type raid6_n_6Heinz Mauelshagen2017-02-041-0/+1
|
* lvconvert: add segtype raid6_n_6 and conversions to/from itHeinz Mauelshagen2017-02-044-21/+140
| | | | | | | | | Add: - support for segment type raid6_n_6 (striped raid with dedicated last parity/Q-Syndrome SubLVs) - conversion support from striped/raid0/raid0_meta/raid4 to/from raid6_n_6 - related tests to lvconvert-raid-takeover.sh Related: rhbz1366296
* WHATS_NEW: New segment type raid5_nHeinz Mauelshagen2017-02-031-0/+1
|
* lvconvert: add segtype raid5_n and conversions to/from itHeinz Mauelshagen2017-02-031-11/+2
| | | | | | | | Change: - missed a return_0 - use lvseg_name() rather than my own function Related: rhbz1366296