summaryrefslogtreecommitdiffstats
path: root/tools/lvcreate.c
Commit message (Collapse)AuthorAgeFilesLines
* config: add silent modeAlasdair G Kergon2012-08-251-3/+3
| | | | | | | | | | | | | | | | Accept -q as the short form of --quiet. Suppress non-essential standard output if -q is given twice. Treat log/silent in lvm.conf as equivalent to -qq. Review all log_print messages and change some to log_print_unless_silent. When silent, the following commands still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs. [Needs checking.] Non-essential messages are shifted from log level 4 to log level 5 for syslog and lvm2_log_fn purposes.
* RAID: Add support for RAID10Jonathan Brassow2012-08-241-1/+27
| | | | | | This patch adds support for RAID10. It is not the default at this stage. The user needs to specify '--type raid10' if they would like RAID10 instead of stacked mirror over stripe.
* thin: discardZdenek Kabelac2012-08-231-2/+2
|
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-1/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* thin: lvcreate --discardsZdenek Kabelac2012-08-091-0/+7
|
* RAID: Improve RAID argument handling.Jonathan Brassow2012-08-081-0/+21
| | | | | Disallow '-m' for RAID types that have no mirror component and disallow '-i' argument for RAID types that have no stripe component.
* args: increase major:minor limit to 4095:1048575Peter Rajnoha2012-08-061-2/+5
| | | | | | | | | 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).
* lvcreate: add --activate ay (autoactivate)Peter Rajnoha2012-06-281-0/+6
| | | | | | | | | | One can use "lvcreate --aay" to have the newly created volume activated or not activated based on the activation/auto_activation_volume_list this way. Note: -Z/--zero is not compatible with -aay, zeroing is not used in this case! When using lvcreate -aay, a default warning message is also issued that zeroing is not done.
* args: add --activate synonym for --available argPeter Rajnoha2012-06-281-2/+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).
* Support rounding downward for lvcreate and %Zdenek Kabelac2012-04-111-0/+14
| | | | | If specifying size with % and we are reaching number of free extents - round downward with stripes.
* Fix warn message and update man pageZdenek Kabelac2012-03-061-3/+5
| | | | | | | | | | Fix regression in man page. The chunk size is in kilobyte units on command line input though in the source code we work with sector size unit so make it clear in the man page. Update chunksize for thin pool in man page - it's max value is 1024M == 1G. Fix warning range message to show proper max value.
* Switch pvscan --cache major:minor to --major --minor.Alasdair Kergon2012-03-061-0/+10
|
* Fit thin pool metadata into 128MBZdenek Kabelac2012-03-051-1/+17
| | | | | | | | | If the lvcreate may decide some automagical values for a user, try to keep the pool metadata size into 128MB range for optimal perfomance (as suggested by Joe). So if the pool metadata size and chunk_size were not specified, try to select such values they would fit into 128MB size.
* Merge metadata size checkingZdenek Kabelac2012-03-021-38/+24
| | | | | | Move the code for poolmetadatasize operation into one place. Report override for minimum and maximum size. Drop _read_thin_params function its error reporting is handled elsewhere.
* Fix estimation of pool metadata device sizeZdenek Kabelac2012-03-021-2/+2
| | | | | | | If no size was give the later added minimal size check efectively disable this code. Also the argument for size now must be kept in sector_size, so adding division by SECTOR_SIZE (moved into a const expression)
* Check for alloc errorZdenek Kabelac2012-03-011-2/+5
| | | | Simplify segtype_str usage and check for NULL segtype.
* Using enum types for enumsZdenek Kabelac2012-02-281-9/+10
| | | | alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
* Always check result of _set_vg_name()Zdenek Kabelac2012-02-271-4/+6
|
* Require number of stripes to be greater than parity devices in higher RAID.Jonathan Earl Brassow2012-02-231-3/+4
| | | | | Also, add some comments to code that I recently added that may be unclear otherwise.
* Initialize dmeventd monitoring for every commandZdenek Kabelac2012-02-151-4/+0
| | | | | | | | | | Read lvm.conf setting for monitoring for each command. So we should not activate monitoring if the default compilation is set to monitor during lvconvert commnads. Patch also removes check for clustered VG and allows to disable monitoring for clustered VG with the assumption, the problem with monitoring and dmeventd flag passing for INGNORE is already fixed.
* lp.pool may be (null) tooAlasdair Kergon2012-02-011-1/+2
|
* Support rounding of percentage upwardZdenek Kabelac2012-01-051-5/+5
| | | | | | | | | | | | | | | We want to keep this logic - when LV is extend - extend the LV by at least given amount, when LV is reduced - reduce the LV by at most given amount. So for this the rounding needs to be used. Current logic which seems to satisfy give rule is to round up all extent values for LV resize upward except for values with '-' sign that are round downward. This patch also fixes the problem when lvextend --use-polices tried to extend LV the by i.e. 20% - but the resulting 20% were smaller the extent size thus before this patch no extension happened.
* Thin rename internal thin pool segmentZdenek Kabelac2011-12-211-1/+1
| | | | | Use matching name as kernel target - useful when function like _percent is using this for validation.
* Small comment and indent updatesZdenek Kabelac2011-11-101-2/+3
|
* Thin move _read_activation_params checkZdenek Kabelac2011-11-101-3/+9
| | | | | | Since we finaly recognize thin creation only after _determine_snapshot_type() - move _read_activation_params() after it - so we can support lvcreate -an thin snapshot.
* Thin create normal (old) snapshot when size is specifiedZdenek Kabelac2011-11-101-6/+6
|
* Thin supports snapshotsZdenek Kabelac2011-11-071-7/+0
| | | | | | | Full support for thin snapshots. Create and remove is supported. TODO: lvconvert support is not yes available.
* Add missing default LVM_VG_NAMEZdenek Kabelac2011-11-071-1/+7
| | | | | Add support for exported shell variable LVM_VG_NAME also for thins and snapshots.
* Thin supports poolmetadatasize settingZdenek Kabelac2011-11-041-1/+57
| | | | | Add option to set pool metadatasize. For passing size parameter reuse region_size.
* Thin pool now support chunk size as wellZdenek Kabelac2011-10-211-7/+19
| | | | | Use chunksize option to specify data_block_size for thin pool target. Drop low_water_mark to zero.
* better -m0 error message, but there's an internal logic error to fix insteadAlasdair Kergon2011-09-271-1/+4
|
* Disallow the creation of mirrors (mirror or raid1 segtype) with only one leg.Jonathan Earl Brassow2011-09-221-1/+6
| | | | | | | | If you specify the segment type (e.g. --type mirror) and the mirrors argument as zero, it would result in a mirrored LV with only one image. While the device may be valid in theory, it should not be allowed in practice. It also makes it difficult on the conversion tools, since they react badly to single-image mirrors.
* Fix possible overflow of size if %FREE or %VG is used.Milan Broz2011-09-151-5/+5
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=737087
* lvcreate/remove thin_pool and thin volumes (--driverloaded n only)Alasdair Kergon2011-09-081-0/+5
|
* Check if lp.origin existsZdenek Kabelac2011-09-071-1/+1
| | | | Currently needed for _determine_snapshot_type().
* pool attach fns & more field renamingAlasdair Kergon2011-09-061-2/+1
|
* add thin_manip.c like the other manip filesAlasdair Kergon2011-09-061-5/+3
| | | | | move basic lv_is_* to macros data_lv -> pool_lv - we decided to call it 'pool' everywhere now
* only thin volumes need convertingAlasdair Kergon2011-09-061-1/+1
|
* lvcreate parsing for thin provisioning.Alasdair Kergon2011-09-061-131/+457
| | | | The rest is incomplete so this isn't usable yet.
* more pre-release fixesAlasdair Kergon2011-08-121-1/+1
|
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-2/+2
| | | | | | | | Move the free_vg() to vg.c and replace free_vg with release_vg and make the _free_vg internal. Patch is needed for sharing VG in vginfo cache so the release_vg function name is a better fit here.
* Add basic RAID segment type(s) support.Jonathan Earl Brassow2011-08-021-7/+54
| | | | | | | | | | | | | Implementation described in doc/lvm2-raid.txt. Basic support includes: - ability to create RAID 1/4/5/6 arrays - ability to delete RAID arrays - ability to display RAID arrays Notable missing features (not included in this patch): - ability to clean-up/repair failures - ability to convert RAID segment types - ability to monitor RAID segment types
* Permit --available with lvcreate so non-snapshot LVs need not be activated.Alasdair Kergon2011-06-011-0/+9
|
* cosmetic change - swapping one macro for anotherJonathan Earl Brassow2011-03-251-1/+1
| | | | | | | When I see 'seg_is_mirrored', I expect the argument to be an lv_segment. In this case, it is lvcreate_params. Both structures, have a 'segtype' entry which the macro dereferences. However, it just seems easier to understand if we do 'segtype_is_mirrored' instead.
* Const fixingZdenek Kabelac2011-02-181-1/+1
| | | | | | | | | | | | | | | | Fixing some const warnings - with API change in: int vg_extend(struct volume_group *vg, int pv_count, const char *const *pv_names, Change is needed - as lvm2api expects const behaviour here. So vg_extend() is doing local strdup for unescaping. skip_dev_dir return const char* from const char* vg_name. Rest of the patch is cleanup of related warnings. Also using dm_report_filed_string() API change to simplify casting in _string_disp and _lvname_disp.
* Add disk to mirrored log type conversion.Jonathan Earl Brassow2011-01-111-2/+0
|
* Rename vg_release to free_vg.Alasdair Kergon2010-12-081-2/+2
|
* Refactor the percent (mirror sync, snapshot usage) handling code to usePetr Rockai2010-11-301-1/+1
| | | | fixed-point values instead of a combination of a float value and an enum.
* Support repetition of --addtag and --deltag arguments.Alasdair Kergon2010-11-111-1/+17
| | | | | Add infrastructure for specific cmdline arguments to be repeated in groups. Split the_args cmdline arguments and values into arg_props and arg_values.
* Ensure we always have origin definedZdenek Kabelac2010-10-251-0/+4
| | | | | | Reported by clang as: Logic error Dereference of null pointer Make sure the code path could not use NULL origin because of some internal code error.