summaryrefslogtreecommitdiffstats
path: root/tools/args.h
Commit message (Collapse)AuthorAgeFilesLines
* thin: use discards as plural rather than singularAlasdair G Kergon2012-08-071-1/+1
| | | | Global change from --discard to --discards, as that feels more natural.
* args: increase major:minor limit to 4095:1048575Peter Rajnoha2012-08-061-2/+2
| | | | | | | | | Remove the limit for major and minor number arguments used while specifying persistent numbers via -My --major <major> --minor <minor> option which was set to 255 before. Follow the kernel limit instead which is 12 bits for major and 20 bits for minor number (kernel >= 2.6 and LVM formats that does not have FMT_RESTRICTED_LVIDS - so still keep the old limit of 255 for lvm1 format).
* thin: add discard support for thin poolZdenek Kabelac2012-07-181-0/+1
| | | | | | | | Add arg support for discard. Add discard ignore, nopassdown, passdown (=default) support. Flags could be set per pool. lvcreate [--discard {ignore|no_passdown|passdown}] vg/thinlv
* args: add --activate synonym for --available argPeter Rajnoha2012-06-281-1/+2
| | | | | | | | We're refererring to 'activation' all over the code and we're talking about 'LVs being activated' all the time so let's use 'activation/activate' everywhere for clarity and consistency (still providing the old 'available' keyword as a synonym for backward compatibility with existing environments).
* Switch pvscan --cache major:minor to --major --minor.Alasdair Kergon2012-03-061-2/+2
|
* Change pvscan --lvmetad to pvscan --cache.Alasdair Kergon2012-03-021-1/+1
|
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+1
| | | | lvm.conf *and* lvmetad is running.
* Support the ability to replace specific devices in a RAID array.Jonathan Earl Brassow2011-11-301-0/+1
| | | | | | | | | | | | | | | | | RAID is not like traditional LVM mirroring. LVM mirroring required failed devices to be removed or the logical volume would simply hang. RAID arrays can keep on running with failed devices. In fact, for RAID types other than RAID1, removing a device would mean substituting an error target or converting to a lower level RAID (e.g. RAID6 -> RAID5, or RAID4/5 to RAID0). Therefore, rather than removing a failed device unconditionally and potentially allocating a replacement, RAID allows the user to "replace" a device with a new one. This approach is a 1-step solution vs the current 2-step solution. example> lvconvert --replace <dev_to_remove> vg/lv [possible_replacement_PVs] '--replace' can be specified more than once. example> lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lv
* Thin supports poolmetadatasize settingZdenek Kabelac2011-11-041-0/+1
| | | | | Add option to set pool metadatasize. For passing size parameter reuse region_size.
* lvcreate parsing for thin provisioning.Alasdair Kergon2011-09-061-0/+2
| | | | The rest is incomplete so this isn't usable yet.
* Add the ability to split an image from the mirror and track changes.Jonathan Earl Brassow2011-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ~> lvconvert --splitmirrors 1 --trackchanges vg/lv The '--trackchanges' option allows a user the ability to use an image of a RAID1 array for the purposes of temporary read-only access. The image can be merged back into the array at a later time and only the blocks that have changed in the array since the split will be resync'ed. This operation can be thought of as a partial split. The image is never completely extracted from the array, in that the array reserves the position the device occupied and tracks the differences between the array and the split image via a bitmap. The image itself is rendered read-only and the name (<LV>_rimage_*) cannot be changed. The user can complete the split (permanently splitting the image from the array) by re-issuing the 'lvconvert' command without the '--trackchanges' argument and specifying the '--name' argument. ~> lvconvert --splitmirrors 1 --name my_split vg/lv Merging the tracked image back into the array is done with the '--merge' option (included in a follow-on patch). ~> lvconvert --merge vg/lv_rimage_<n> The internal mechanics of this are relatively simple. The 'raid' device- mapper target allows for the specification of an empty slot in an array via '- -'. This is what will be used if a partial activation of an array is ever required. (It would also be possible to use 'error' targets in place of the '- -'.) If a RAID image is found to be both read-only and visible, then it is considered separate from the array and '- -' is used to hold it's position in the array. So, all that needs to be done to temporarily split an image from the array /and/ cause the kernel target's bitmap to track (aka "mark") changes made is to make the specified image visible and read-only. To merge the device back into the array, the image needs to be returned to the read/write state of the top-level LV and made invisible.
* Add -V as short form of --virtualsize in lvcreate.Alasdair Kergon2011-08-171-1/+1
|
* Support repetition of --addtag and --deltag arguments.Alasdair Kergon2010-11-111-5/+5
| | | | | Add infrastructure for specific cmdline arguments to be repeated in groups. Split the_args cmdline arguments and values into arg_props and arg_values.
* Implement vgextend --restoremissing (BZ 537913), which makes it possible toPetr Rockai2010-10-131-0/+1
| | | | | | | | re-add a physical volume that has gone missing previously, due to a transient device failure, without re-initialising it. Signed-off-by: Petr Rockai <prockai@redhat.com> Reviewed-by: Alasdair Kergon <agk@redhat.com>
* Require --restorefile when using pvcreate --uuid.Mike Snitzer2010-08-121-0/+1
| | | | | | | | | Introduce --norestorefile to allow user to override the new requirement. This can also be overridden with "devices/require_restorefile_with_uuid" in lvm.conf -- however the default is 1. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Fix --[vg]metadatacopies arg processingAlasdair Kergon2010-06-301-2/+2
|
* Allow 'all' and 'unmanaged' values for --vgmetadatacopies.Dave Wysochanski2010-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allowing an 'all' and 'unmanaged' value is more intuitive, and provides a simple way for users to get back to original LVM behavior of metadata written to all PVs in the volume group. If the user requests "--vgmetadatacopies unmanaged", this instructs LVM not to manage the ignore bits to achieve a specific number of metadata copies in the volume group. The user is free to use "pvchange --metadataignore" to control the mdas on a per-PV basis. If the user requests "--vgmetadatacopies all", this instructs LVM to do 2 things: 1) clear all ignore bits, and 2) set the "unmanaged" policy going forward. Internally, we use the special MAX_UINT32 value to indicate 'all'. This 'just' works since it's the largest value possible for the field and so all 'ignore' bits on all mdas in the VG will get cleared inside _vg_metadata_balance(). However, after we've called the _vg_metadata_balance function, we check for the special 'all' value, and if set, we write the "unmanaged" value into the metadata. As such, the 'all' value is never written to disk. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Update vgchange tool to accept --vgmetadatacopies.Dave Wysochanski2010-06-281-0/+1
| | | | | | | | | | Update logic in vgchange to handle --vgmetadatacopies, allow --metadatacopies as a synonym to --vgmetadatacopies, and add these parameters to args.h and commands.h Forbit both --vgmetadatacopies and --metadatacopies as only one allowed. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Add --metadataignore to pvchange, allowing for ignoring of metadata areas.Dave Wysochanski2010-06-281-0/+1
| | | | | | | | | This patch just modifies pvchange to call the underlying ignore functions for mdas. Ensure special cases do not reflect changes in metadata (PVs with 0 mdas, setting ignored when already ignored, clearing ignored when not ignored). Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Add new --sysinit option for vgchange and lvchange.Peter Rajnoha2010-05-061-0/+1
| | | | | | A shortcut for --ignorelockingfailure, --ignoremonitoring, --poll n options and LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable used all at once in initialisation scripts (e.g. rc.sysinit or initrd).
* Add --stripes to lvconvert too.Alasdair Kergon2010-04-131-3/+3
|
* Add --merge support to lvconvert to start merging a snapshot into itsMike Snitzer2010-01-131-0/+1
| | | | origin, example usage: lvconvert --merge vg/snaplv
* This patch adds the capability to split off a mirror legs.Jonathan Earl Brassow2010-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is pretty much the same as reducing the number of mirror legs, but we just don't delete them afterwards. The following command line interface is enforced: prompt> lvconvert --splitmirror <n> -n <name> <VG>/<LV> where 'n' is the number of images to split off, and where 'name' is the name of the newly split off logical volume. If more than one leg is split off, a new mirror will be the result. The newly split off mirror will have a 'core' log. Example: [root@bp-01 LVM2]# !lvs lvs -a -o name,copy_percent,devices LV Copy% Devices lv 100.00 lv_mimage_0(0),lv_mimage_1(0),lv_mimage_2(0),lv_mimage_3(0) [lv_mimage_0] /dev/sdb1(0) [lv_mimage_1] /dev/sdc1(0) [lv_mimage_2] /dev/sdd1(0) [lv_mimage_3] /dev/sde1(0) [lv_mlog] /dev/sdi1(0) [root@bp-01 LVM2]# lvconvert --splitmirrors 2 --name split vg/lv /dev/sd[ce]1 Logical volume lv converted. [root@bp-01 LVM2]# !lvs lvs -a -o name,copy_percent,devices LV Copy% Devices lv 100.00 lv_mimage_0(0),lv_mimage_2(0) [lv_mimage_0] /dev/sdb1(0) [lv_mimage_2] /dev/sdd1(0) [lv_mlog] /dev/sdi1(0) split 100.00 split_mimage_0(0),split_mimage_1(0) [split_mimage_0] /dev/sde1(0) [split_mimage_1] /dev/sdc1(0) It can be seen that '--splitmirror <n>' is exactly the same as '--mirrors -<n>' (note the minus sign), except there is the additional notion to keep the image being detached from the mirror instead of just throwing it away. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
* Add a [--poll {y|n}] flag to vgchange and lvchange to control whetherMike Snitzer2010-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | the background polldaemon is allowed to start. It can be used standalone or in conjunction with --refresh or --available y. Control over when the background polldaemon starts will be particularly important for snapshot-merge of a root filesystem. Dracut will be updated to activate all LVs with: --poll n The lvm2-monitor initscript will start polling with: --poll y NOTE: Because we currently have no way of knowing if a background polldaemon is active for a given LV the following limitations exist and have been deemed acceptable: 1) it is not possible to stop an active polldaemon; so the lvm2-monitor initscript doesn't stop running polldaemon(s) 2) redundant polldaemon instances will be started for all specified LVs if vgchange or lvchange are repeatedly used with '--poll y' Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Document --all option in man pages, cleanup {pv|vg|lv}{s|display} man pages.Dave Wysochanski2009-10-261-1/+0
| | | | | | | Option --all is only partially documented currently, so document in all commands. Also make {pv|vg|lv}{display|s} man pages consistent with help output. Remove ununsed 'disk_ARG' parameter. Leave --trustcache out of the man page output. Update --units argument to show all possible units.
* Add --pvmetadatacopies as a synonym for --metadatacopies in various commands.Dave Wysochanski2009-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Going forward, we would like to allow users to specify the total number of metadatacopies in a VG rather than on a per-PV basis. In order to facilitate that, introduce --pvmetadatacopes to replace --metadatacopies everywhere. We still allow --metadatacopies for pv commands, but require --pvmetadatacopies for vg commands. Eventually we will introduce --vgmetadatacopies. Once we do that, we should either deprecate --metadatacopies or make it a synonym based on the command (pvmetadatacopies for pv commands, and vgmetadatacopies for vg commands). The latter option would likely just require a simple 'strncpy' check against cmd->command->name to qualify the merge_synonym call. Update nightly tests to cover the pvmetadatacopies synonym. Note that this patch is the result of an eariler review comment for the implicit pvcreate patches. Should apply cleanly on top of the implicit pvcreate patches (I applied after patch 10/10 in that series). NOTE: This patch will require --pvmetadatacopies for vgconvert as --metadatacopies is no longer accepted.
* Add --noudevsync option for relevant LVM tools.Peter Rajnoha2009-08-041-0/+1
|
* Add --dataalignmentoffset to pvcreate to shift start of aligned data areaMike Snitzer2009-07-301-0/+1
| | | | | | | | Adds pe_align_offset to 'struct physical_volume'; is initialized with set_pe_align_offset(). After pe_start is established pe_align_offset is added to it. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Use lvconvert --repair instead of vgreduce in mirror dmeventd DSO (mornfall)Milan Broz2009-06-041-0/+1
| | | | Introduce lvconvert --use_policies (mornfall)
* Make --snapshot optional with lvcreate --virtualsize.Alasdair Kergon2009-05-271-0/+1
| | | | Generalise --virtualoriginsize to --virtualsize.
* Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).Alasdair Kergon2009-04-251-0/+1
| | | | | | | | Add lvs origin_size field. Fix linux configure --enable-debug to exclude -O2. Still a few rough edges, but hopefully usable now: lvcreate -s vg1 -L 100M --virtualoriginsize 1T
* Implement, test and document (first iteration of) lvconvert --repair.Petr Rockai2009-04-231-0/+1
|
* Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)Alasdair Kergon2009-02-221-0/+1
| | | | | | | | | | | | | | | | | | This patch is not fully tested and leaves some related bugs unfixed. Intended behaviour of the code now: pe_start in the lvm2 format PV label header is set only by pvcreate (or vgconvert -M2) and then preserved in *all* operations thereafter. In some specialist cases, after the PV is added to a VG, the pe_start field in the VG metadata may hold a different value and if so, it overrides the other one for as long as the PV is in such a VG. Currently, the field storing the size of the data area in the PV label header always holds 0. As it only has meaning in the context of a volume group, it is calculated whenever the PV is added to a VG (and can be derived from extent_size and pe_count in the VG metadata).
* Add --rows to reports.Alasdair Kergon2008-06-241-0/+1
|
* Add --unquoted to reporting tools.Alasdair Kergon2008-06-241-0/+1
|
* post-releaseAlasdair Kergon2008-06-061-1/+1
|
* Add --prefixes to reporting tools for field name prefix output format.Alasdair Kergon2008-04-201-0/+1
| | | | | | E.g. lvs --prefixes --noheadings --unbuffered --units m --nosuffix (Used '--prefixes' for now, but I'm looking for a better name.)
* Enhance the management of readahead settings.Alasdair Kergon2007-11-091-1/+1
|
* Fix (C) !Alasdair Kergon2007-08-211-2/+2
|
* Clean up mirrorlog argument processing.Alasdair Kergon2007-08-211-104/+104
| | | | Only permit --force, --verbose and --debug arguments to be repeated.
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* - change new log_ARG variable to more explicit mirrorlog_ARG.Jonathan Earl Brassow2007-08-091-1/+1
|
* This patch changes the arguments that specify the mirrorJonathan Earl Brassow2007-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | log type. Previously, we had a '--corelog' argument that would change the default type from 'disk' to 'core'. I think that creates too much confusion - especially when doing conversions on mirrors. The new argument '--log' takes either "disk" or "core" as a parameter. This could be expanded in the future for additional logging types as well. Examples: # Creating a 2-way mirror $> lvcreate -m1 ... # implicitly use default disk logging $> lvcreate -m1 --log disk ... # explicit disk logging $> lvcreate -m1 --log core ... # specify core logging $> lvcreate -m1 --corelog ... # old way still works # Conversion examples $> lvconvert --log core ... # convert to core logging $> lvconvert --log disk ... # convert to disk logging $> lvconvert -mX --corelog ... # old way still works $> lvconvert -mX ... # old way of converting to disk logging still works Changes are reflected in the man pages.
* Add --ignoremonitoring to disable all dmeventd interaction.Alasdair Kergon2007-06-181-0/+1
|
* try forcesync -> resyncAlasdair Kergon2006-10-241-1/+1
|
* Add lvchange --forcesync.Alasdair Kergon2006-10-231-0/+1
|
* Add %VG, %LV and %FREE suffices to lvcreate/lvresize --extents arg.Alasdair Kergon2006-09-261-1/+1
| | | | | | e.g. lvcreate -l 100%FREE to create an LV using all available space. lvextend -l 50%LV to increase an LV by 50% of its existing size. lvcreate -l 20%VG to create an LV using 20% of the total VG size.
* Add --trustcache option to reporting commands in preparation for supportingAlasdair Kergon2006-08-011-0/+1
| | | | | | event-driven model. Without changes to the way the cache gets updated, the option is currently unreliable without a global lock to prevent any lvm2 commands from running concurrently.
* Fix lvcreate corelog validation.Alasdair Kergon2006-05-161-0/+1
| | | | | | | | | Add --config for overriding most config file settings from cmdline. Quote arguments when printing command line. Remove linefeed from 'initialising logging' message. Add 'Completed' debug message. Don't attempt library exit after reloading config files. Always compile with libdevmapper, even if device-mapper is disabled.
* Add --monitor to vgcreate and lvcreate to control dmeventd registration.Alasdair Kergon2006-05-121-0/+1
| | | | | Propagate --monitor around cluster. Filter LCK_NONBLOCK in clvmd lock_vg.