Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 268999
Collapse All | Expand All

(-)LVM2.2.02.49.orig/lib/locking/file_locking.c (-5 / +10 lines)
Lines 271-287 static int _file_lock_resource(struct cm Link Here
271
	return 1;
271
	return 1;
272
}
272
}
273
273
274
int init_file_locking(struct locking_type *locking, struct cmd_context *cmd)
274
int init_file_locking(struct locking_type *locking, struct cmd_context *cmd, const char *lock_dir)
275
{
275
{
276
	locking->lock_resource = _file_lock_resource;
276
	locking->lock_resource = _file_lock_resource;
277
	locking->reset_locking = _reset_file_locking;
277
	locking->reset_locking = _reset_file_locking;
278
	locking->fin_locking = _fin_file_locking;
278
	locking->fin_locking = _fin_file_locking;
279
	locking->flags = 0;
279
	locking->flags = 0;
280
280
281
	/* Get lockfile directory from config file */
281
	if(lock_dir) {
282
	strncpy(_lock_dir, find_config_tree_str(cmd, "global/locking_dir",
282
		/* Get lockfile directory from commandline */
283
						DEFAULT_LOCK_DIR),
283
		strncpy(_lock_dir, lock_dir, sizeof(_lock_dir));
284
		sizeof(_lock_dir));
284
	} else {
285
		/* Get lockfile directory from config file */
286
		strncpy(_lock_dir, find_config_tree_str(cmd, "global/locking_dir",
287
							DEFAULT_LOCK_DIR),
288
			sizeof(_lock_dir));
289
	}
285
290
286
	if (!dm_create_dir(_lock_dir))
291
	if (!dm_create_dir(_lock_dir))
287
		return 0;
292
		return 0;
(-)LVM2.2.02.49.orig/lib/locking/locking.c (-3 / +3 lines)
Lines 213-219 static void _update_vg_lock_count(const Link Here
213
 * Select a locking type
213
 * Select a locking type
214
 * type: locking type; if < 0, then read config tree value
214
 * type: locking type; if < 0, then read config tree value
215
 */
215
 */
216
int init_locking(int type, struct cmd_context *cmd)
216
int init_locking(int type, struct cmd_context *cmd, const char *lock_dir)
217
{
217
{
218
	if (type < 0)
218
	if (type < 0)
219
		type = find_config_tree_int(cmd, "global/locking_type", 1);
219
		type = find_config_tree_int(cmd, "global/locking_type", 1);
Lines 228-234 int init_locking(int type, struct cmd_co Link Here
228
228
229
	case 1:
229
	case 1:
230
		log_very_verbose("File-based locking selected.");
230
		log_very_verbose("File-based locking selected.");
231
		if (!init_file_locking(&_locking, cmd))
231
		if (!init_file_locking(&_locking, cmd, lock_dir))
232
			break;
232
			break;
233
		return 1;
233
		return 1;
234
234
Lines 268-274 int init_locking(int type, struct cmd_co Link Here
268
		log_warn("WARNING: Falling back to local file-based locking.");
268
		log_warn("WARNING: Falling back to local file-based locking.");
269
		log_warn("Volume Groups with the clustered attribute will "
269
		log_warn("Volume Groups with the clustered attribute will "
270
			  "be inaccessible.");
270
			  "be inaccessible.");
271
		if (init_file_locking(&_locking, cmd))
271
		if (init_file_locking(&_locking, cmd, lock_dir))
272
			return 1;
272
			return 1;
273
	}
273
	}
274
274
(-)LVM2.2.02.49.orig/lib/locking/locking.h (-1 / +1 lines)
Lines 19-25 Link Here
19
#include "uuid.h"
19
#include "uuid.h"
20
#include "config.h"
20
#include "config.h"
21
21
22
int init_locking(int type, struct cmd_context *cmd);
22
int init_locking(int type, struct cmd_context *cmd, const char *lock_dir);
23
void fin_locking(void);
23
void fin_locking(void);
24
void reset_locking(void);
24
void reset_locking(void);
25
int vg_write_lock_held(void);
25
int vg_write_lock_held(void);
(-)LVM2.2.02.49.orig/lib/locking/locking_types.h (-1 / +1 lines)
Lines 42-48 int init_no_locking(struct locking_type Link Here
42
42
43
int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd);
43
int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd);
44
44
45
int init_file_locking(struct locking_type *locking, struct cmd_context *cmd);
45
int init_file_locking(struct locking_type *locking, struct cmd_context *cmd, const char *lock_dir);
46
46
47
int init_external_locking(struct locking_type *locking, struct cmd_context *cmd);
47
int init_external_locking(struct locking_type *locking, struct cmd_context *cmd);
48
48
(-)LVM2.2.02.49.orig/liblvm/lvm_base.c (-1 / +1 lines)
Lines 39-45 lvm_t lvm_create(const char *system_dir) Link Here
39
39
40
	/* FIXME: locking_type config option needed? */
40
	/* FIXME: locking_type config option needed? */
41
	/* initialize locking */
41
	/* initialize locking */
42
	if (!init_locking(-1, cmd)) {
42
	if (!init_locking(-1, cmd, NULL)) {
43
		/* FIXME: use EAGAIN as error code here */
43
		/* FIXME: use EAGAIN as error code here */
44
		log_error("Locking initialisation failed.");
44
		log_error("Locking initialisation failed.");
45
		lvm_destroy((lvm_t) cmd);
45
		lvm_destroy((lvm_t) cmd);
(-)LVM2.2.02.49.orig/tools/args.h (+1 lines)
Lines 22-27 arg(version_ARG, '\0', "version", NULL, Link Here
22
arg(quiet_ARG, '\0', "quiet", NULL, 0)
22
arg(quiet_ARG, '\0', "quiet", NULL, 0)
23
arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", size_mb_arg, 0)
23
arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", size_mb_arg, 0)
24
arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", NULL, 0)
24
arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", NULL, 0)
25
arg(lock_dir_ARG, '\0', "lock-dir", string_arg, 0)
25
arg(nolocking_ARG, '\0', "nolocking", NULL, 0)
26
arg(nolocking_ARG, '\0', "nolocking", NULL, 0)
26
arg(metadatacopies_ARG, '\0', "metadatacopies", int_arg, 0)
27
arg(metadatacopies_ARG, '\0', "metadatacopies", int_arg, 0)
27
arg(metadatasize_ARG, '\0', "metadatasize", size_mb_arg, 0)
28
arg(metadatasize_ARG, '\0', "metadatasize", size_mb_arg, 0)
(-)LVM2.2.02.49.orig/tools/commands.h (-13 / +29 lines)
Lines 70-75 xx(lvchange, Link Here
70
   "\t[-f|--force]\n"
70
   "\t[-f|--force]\n"
71
   "\t[-h|--help]\n"
71
   "\t[-h|--help]\n"
72
   "\t[--ignorelockingfailure]\n"
72
   "\t[--ignorelockingfailure]\n"
73
   "\t[--lock-dir path]\n"
73
   "\t[--ignoremonitoring]\n"
74
   "\t[--ignoremonitoring]\n"
74
   "\t[--monitor {y|n}]\n"
75
   "\t[--monitor {y|n}]\n"
75
   "\t[-M|--persistent y|n] [--major major] [--minor minor]\n"
76
   "\t[-M|--persistent y|n] [--major major] [--minor minor]\n"
Lines 85-91 xx(lvchange, Link Here
85
   "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
86
   "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
86
87
87
   alloc_ARG, autobackup_ARG, available_ARG, contiguous_ARG, force_ARG,
88
   alloc_ARG, autobackup_ARG, available_ARG, contiguous_ARG, force_ARG,
88
   ignorelockingfailure_ARG, ignoremonitoring_ARG, major_ARG, minor_ARG,
89
   ignorelockingfailure_ARG, lock_dir_ARG, ignoremonitoring_ARG, major_ARG, minor_ARG,
89
   monitor_ARG, partial_ARG, permission_ARG, persistent_ARG, readahead_ARG,
90
   monitor_ARG, partial_ARG, permission_ARG, persistent_ARG, readahead_ARG,
90
   resync_ARG, refresh_ARG, addtag_ARG, deltag_ARG, test_ARG, yes_ARG)
91
   resync_ARG, refresh_ARG, addtag_ARG, deltag_ARG, test_ARG, yes_ARG)
91
92
Lines 185-190 xx(lvdisplay, Link Here
185
   "\t[-d|--debug]\n"
186
   "\t[-d|--debug]\n"
186
   "\t[-h|--help]\n"
187
   "\t[-h|--help]\n"
187
   "\t[--ignorelockingfailure]\n"
188
   "\t[--ignorelockingfailure]\n"
189
   "\t[--lock-dir path]\n"
188
   "\t[-m|--maps]\n"
190
   "\t[-m|--maps]\n"
189
   "\t[--nosuffix]\n"
191
   "\t[--nosuffix]\n"
190
   "\t[-P|--partial] " "\n"
192
   "\t[-P|--partial] " "\n"
Lines 199-204 xx(lvdisplay, Link Here
199
   "\t[-d|--debug]\n"
201
   "\t[-d|--debug]\n"
200
   "\t[-h|--help]\n"
202
   "\t[-h|--help]\n"
201
   "\t[--ignorelockingfailure]\n"
203
   "\t[--ignorelockingfailure]\n"
204
   "\t[--lock-dir path]\n"
202
   "\t[--noheadings]\n"
205
   "\t[--noheadings]\n"
203
   "\t[--nosuffix]\n"
206
   "\t[--nosuffix]\n"
204
   "\t[-o|--options [+]Field[,Field]]\n"
207
   "\t[-o|--options [+]Field[,Field]]\n"
Lines 213-219 xx(lvdisplay, Link Here
213
   "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
216
   "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
214
217
215
    aligned_ARG, all_ARG, colon_ARG, columns_ARG, disk_ARG,
218
    aligned_ARG, all_ARG, colon_ARG, columns_ARG, disk_ARG,
216
    ignorelockingfailure_ARG, maps_ARG, noheadings_ARG, nosuffix_ARG,
219
    ignorelockingfailure_ARG, lock_dir_ARG, maps_ARG, noheadings_ARG, nosuffix_ARG,
217
    options_ARG, sort_ARG, partial_ARG, segments_ARG, separator_ARG,
220
    options_ARG, sort_ARG, partial_ARG, segments_ARG, separator_ARG,
218
    unbuffered_ARG, units_ARG)
221
    unbuffered_ARG, units_ARG)
219
222
Lines 373-378 xx(lvs, Link Here
373
   "\t[-d|--debug]\n"
376
   "\t[-d|--debug]\n"
374
   "\t[-h|--help]\n"
377
   "\t[-h|--help]\n"
375
   "\t[--ignorelockingfailure]\n"
378
   "\t[--ignorelockingfailure]\n"
379
   "\t[--lock-dir path]\n"
376
   "\t[--nameprefixes]\n"
380
   "\t[--nameprefixes]\n"
377
   "\t[--noheadings]\n"
381
   "\t[--noheadings]\n"
378
   "\t[--nosuffix]\n"
382
   "\t[--nosuffix]\n"
Lines 390-396 xx(lvs, Link Here
390
   "\t[--version]" "\n"
394
   "\t[--version]" "\n"
391
   "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
395
   "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
392
396
393
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
397
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, lock_dir_ARG, nameprefixes_ARG,
394
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, 
398
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, 
395
   rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
399
   rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
396
   unbuffered_ARG, units_ARG, unquoted_ARG)
400
   unbuffered_ARG, units_ARG, unquoted_ARG)
Lines 404-414 xx(lvscan, Link Here
404
   "\t[-d|--debug] " "\n"
408
   "\t[-d|--debug] " "\n"
405
   "\t[-h|-?|--help] " "\n"
409
   "\t[-h|-?|--help] " "\n"
406
   "\t[--ignorelockingfailure]\n"
410
   "\t[--ignorelockingfailure]\n"
411
   "\t[--lock-dir path]\n"
407
   "\t[-P|--partial] " "\n"
412
   "\t[-P|--partial] " "\n"
408
   "\t[-v|--verbose] " "\n"
413
   "\t[-v|--verbose] " "\n"
409
   "\t[--version]\n",
414
   "\t[--version]\n",
410
415
411
   all_ARG, blockdevice_ARG, disk_ARG, ignorelockingfailure_ARG, partial_ARG)
416
   all_ARG, blockdevice_ARG, disk_ARG, ignorelockingfailure_ARG, lock_dir_ARG, partial_ARG)
412
417
413
xx(pvchange,
418
xx(pvchange,
414
   "Change attributes of physical volume(s)",
419
   "Change attributes of physical volume(s)",
Lines 510-515 xx(pvdisplay, Link Here
510
   "\t[-d|--debug]\n"
515
   "\t[-d|--debug]\n"
511
   "\t[-h|--help]\n"
516
   "\t[-h|--help]\n"
512
   "\t[--ignorelockingfailure]\n"
517
   "\t[--ignorelockingfailure]\n"
518
   "\t[--lock-dir path]\n"
513
   "\t[-m|--maps]\n"
519
   "\t[-m|--maps]\n"
514
   "\t[--nosuffix]\n"
520
   "\t[--nosuffix]\n"
515
   "\t[-s|--short]\n"
521
   "\t[-s|--short]\n"
Lines 524-529 xx(pvdisplay, Link Here
524
   "\t[-d|--debug]\n"
530
   "\t[-d|--debug]\n"
525
   "\t[-h|--help]\n"
531
   "\t[-h|--help]\n"
526
   "\t[--ignorelockingfailure]\n"
532
   "\t[--ignorelockingfailure]\n"
533
   "\t[--lock-dir path]\n"
527
   "\t[--noheadings]\n"
534
   "\t[--noheadings]\n"
528
   "\t[--nosuffix]\n"
535
   "\t[--nosuffix]\n"
529
   "\t[-o|--options [+]Field[,Field]]\n"
536
   "\t[-o|--options [+]Field[,Field]]\n"
Lines 535-541 xx(pvdisplay, Link Here
535
   "\t[--version]" "\n"
542
   "\t[--version]" "\n"
536
   "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n",
543
   "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n",
537
544
538
   aligned_ARG, all_ARG, colon_ARG, columns_ARG, ignorelockingfailure_ARG,
545
   aligned_ARG, all_ARG, colon_ARG, columns_ARG, ignorelockingfailure_ARG, lock_dir_ARG,
539
   maps_ARG, noheadings_ARG, nosuffix_ARG, options_ARG, separator_ARG,
546
   maps_ARG, noheadings_ARG, nosuffix_ARG, options_ARG, separator_ARG,
540
   short_ARG, sort_ARG, unbuffered_ARG, units_ARG)
547
   short_ARG, sort_ARG, unbuffered_ARG, units_ARG)
541
548
Lines 585-590 xx(pvs, Link Here
585
   "\t[-d|--debug]" "\n"
592
   "\t[-d|--debug]" "\n"
586
   "\t[-h|-?|--help] " "\n"
593
   "\t[-h|-?|--help] " "\n"
587
   "\t[--ignorelockingfailure]\n"
594
   "\t[--ignorelockingfailure]\n"
595
   "\t[--lock-dir path]\n"
588
   "\t[--nameprefixes]\n"
596
   "\t[--nameprefixes]\n"
589
   "\t[--noheadings]\n"
597
   "\t[--noheadings]\n"
590
   "\t[--nosuffix]\n"
598
   "\t[--nosuffix]\n"
Lines 602-608 xx(pvs, Link Here
602
   "\t[--version]\n"
610
   "\t[--version]\n"
603
   "\t[PhysicalVolume [PhysicalVolume...]]\n",
611
   "\t[PhysicalVolume [PhysicalVolume...]]\n",
604
612
605
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
613
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, lock_dir_ARG, nameprefixes_ARG,
606
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
614
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG,
607
   rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
615
   rows_ARG, segments_ARG, separator_ARG, sort_ARG, trustcache_ARG,
608
   unbuffered_ARG, units_ARG, unquoted_ARG)
616
   unbuffered_ARG, units_ARG, unquoted_ARG)
Lines 615-627 xx(pvscan, Link Here
615
   "\t{-e|--exported | -n|--novolumegroup} " "\n"
623
   "\t{-e|--exported | -n|--novolumegroup} " "\n"
616
   "\t[-h|-?|--help]" "\n"
624
   "\t[-h|-?|--help]" "\n"
617
   "\t[--ignorelockingfailure]\n"
625
   "\t[--ignorelockingfailure]\n"
626
   "\t[--lock-dir path]\n"
618
   "\t[-P|--partial] " "\n"
627
   "\t[-P|--partial] " "\n"
619
   "\t[-s|--short] " "\n"
628
   "\t[-s|--short] " "\n"
620
   "\t[-u|--uuid] " "\n"
629
   "\t[-u|--uuid] " "\n"
621
   "\t[-v|--verbose] " "\n"
630
   "\t[-v|--verbose] " "\n"
622
   "\t[--version]\n",
631
   "\t[--version]\n",
623
632
624
   exported_ARG, ignorelockingfailure_ARG, novolumegroup_ARG, partial_ARG,
633
   exported_ARG, ignorelockingfailure_ARG, lock_dir_ARG, novolumegroup_ARG, partial_ARG,
625
   short_ARG, uuid_ARG)
634
   short_ARG, uuid_ARG)
626
635
627
xx(segtypes,
636
xx(segtypes,
Lines 637-648 xx(vgcfgbackup, Link Here
637
   "\t[-f|--file filename] " "\n"
646
   "\t[-f|--file filename] " "\n"
638
   "\t[-h|-?|--help] " "\n"
647
   "\t[-h|-?|--help] " "\n"
639
   "\t[--ignorelockingfailure]\n"
648
   "\t[--ignorelockingfailure]\n"
649
   "\t[--lock-dir path]\n"
640
   "\t[-P|--partial] " "\n"
650
   "\t[-P|--partial] " "\n"
641
   "\t[-v|--verbose]" "\n"
651
   "\t[-v|--verbose]" "\n"
642
   "\t[--version] " "\n"
652
   "\t[--version] " "\n"
643
   "\t[VolumeGroupName...]\n",
653
   "\t[VolumeGroupName...]\n",
644
654
645
   file_ARG, ignorelockingfailure_ARG, partial_ARG)
655
   file_ARG, ignorelockingfailure_ARG, lock_dir_ARG, partial_ARG)
646
656
647
xx(vgcfgrestore,
657
xx(vgcfgrestore,
648
   "Restore volume group configuration",
658
   "Restore volume group configuration",
Lines 671-676 xx(vgchange, Link Here
671
   "\t[-d|--debug] " "\n"
681
   "\t[-d|--debug] " "\n"
672
   "\t[-h|--help] " "\n"
682
   "\t[-h|--help] " "\n"
673
   "\t[--ignorelockingfailure]\n"
683
   "\t[--ignorelockingfailure]\n"
684
   "\t[--lock-dir path]\n"
674
   "\t[--ignoremonitoring]\n"
685
   "\t[--ignoremonitoring]\n"
675
   "\t[--monitor {y|n}]\n"
686
   "\t[--monitor {y|n}]\n"
676
   "\t[--refresh]\n"
687
   "\t[--refresh]\n"
Lines 689-695 xx(vgchange, Link Here
689
   "\t[VolumeGroupName...]\n",
700
   "\t[VolumeGroupName...]\n",
690
701
691
   addtag_ARG, alloc_ARG, allocation_ARG, autobackup_ARG, available_ARG,
702
   addtag_ARG, alloc_ARG, allocation_ARG, autobackup_ARG, available_ARG,
692
   clustered_ARG, deltag_ARG, ignorelockingfailure_ARG, ignoremonitoring_ARG,
703
   clustered_ARG, deltag_ARG, ignorelockingfailure_ARG, lock_dir_ARG, ignoremonitoring_ARG,
693
   logicalvolume_ARG, maxphysicalvolumes_ARG, monitor_ARG, partial_ARG,
704
   logicalvolume_ARG, maxphysicalvolumes_ARG, monitor_ARG, partial_ARG,
694
   physicalextentsize_ARG, refresh_ARG, resizeable_ARG, resizable_ARG,
705
   physicalextentsize_ARG, refresh_ARG, resizeable_ARG, resizable_ARG,
695
   test_ARG, uuid_ARG)
706
   test_ARG, uuid_ARG)
Lines 752-757 xx(vgdisplay, Link Here
752
   "\t[-d|--debug] " "\n"
763
   "\t[-d|--debug] " "\n"
753
   "\t[-h|--help] " "\n"
764
   "\t[-h|--help] " "\n"
754
   "\t[--ignorelockingfailure]" "\n"
765
   "\t[--ignorelockingfailure]" "\n"
766
   "\t[--lock-dir path]\n"
755
   "\t[--nosuffix]\n"
767
   "\t[--nosuffix]\n"
756
   "\t[-P|--partial] " "\n"
768
   "\t[-P|--partial] " "\n"
757
   "\t[--units hsbkmgtHKMGT]\n"
769
   "\t[--units hsbkmgtHKMGT]\n"
Lines 764-769 xx(vgdisplay, Link Here
764
   "\t[-d|--debug] " "\n"
776
   "\t[-d|--debug] " "\n"
765
   "\t[-h|--help] " "\n"
777
   "\t[-h|--help] " "\n"
766
   "\t[--ignorelockingfailure]" "\n"
778
   "\t[--ignorelockingfailure]" "\n"
779
   "\t[--lock-dir path]\n"
767
   "\t[--noheadings]\n"
780
   "\t[--noheadings]\n"
768
   "\t[--nosuffix]\n"
781
   "\t[--nosuffix]\n"
769
   "\t[-o|--options [+]Field[,Field]]\n"
782
   "\t[-o|--options [+]Field[,Field]]\n"
Lines 777-783 xx(vgdisplay, Link Here
777
   "\t[VolumeGroupName [VolumeGroupName...]]\n",
790
   "\t[VolumeGroupName [VolumeGroupName...]]\n",
778
791
779
   activevolumegroups_ARG, aligned_ARG, colon_ARG, columns_ARG, disk_ARG,
792
   activevolumegroups_ARG, aligned_ARG, colon_ARG, columns_ARG, disk_ARG,
780
   ignorelockingfailure_ARG, noheadings_ARG, nosuffix_ARG, options_ARG,
793
   ignorelockingfailure_ARG, lock_dir_ARG, noheadings_ARG, nosuffix_ARG, options_ARG,
781
   partial_ARG, short_ARG, separator_ARG, sort_ARG, unbuffered_ARG, units_ARG)
794
   partial_ARG, short_ARG, separator_ARG, sort_ARG, unbuffered_ARG, units_ARG)
782
795
783
xx(vgexport,
796
xx(vgexport,
Lines 844-855 xx(vgmknodes, Link Here
844
   "\t[-d|--debug]\n"
857
   "\t[-d|--debug]\n"
845
   "\t[-h|--help]\n"
858
   "\t[-h|--help]\n"
846
   "\t[--ignorelockingfailure]\n"
859
   "\t[--ignorelockingfailure]\n"
860
   "\t[--lock-dir path]\n"
847
   "\t[--refresh]\n"
861
   "\t[--refresh]\n"
848
   "\t[-v|--verbose]\n"
862
   "\t[-v|--verbose]\n"
849
   "\t[--version]" "\n"
863
   "\t[--version]" "\n"
850
   "\t[VolumeGroupName...]\n",
864
   "\t[VolumeGroupName...]\n",
851
865
852
   ignorelockingfailure_ARG, refresh_ARG)
866
   ignorelockingfailure_ARG, lock_dir_ARG, refresh_ARG)
853
867
854
xx(vgreduce,
868
xx(vgreduce,
855
   "Remove physical volume(s) from a volume group",
869
   "Remove physical volume(s) from a volume group",
Lines 909-914 xx(vgs, Link Here
909
   "\t[-d|--debug]\n"
923
   "\t[-d|--debug]\n"
910
   "\t[-h|--help]\n"
924
   "\t[-h|--help]\n"
911
   "\t[--ignorelockingfailure]\n"
925
   "\t[--ignorelockingfailure]\n"
926
   "\t[--lock-dir path]\n"
912
   "\t[--nameprefixes]\n"
927
   "\t[--nameprefixes]\n"
913
   "\t[--noheadings]\n"
928
   "\t[--noheadings]\n"
914
   "\t[--nosuffix]\n"
929
   "\t[--nosuffix]\n"
Lines 925-931 xx(vgs, Link Here
925
   "\t[--version]\n"
940
   "\t[--version]\n"
926
   "\t[VolumeGroupName [VolumeGroupName...]]\n",
941
   "\t[VolumeGroupName [VolumeGroupName...]]\n",
927
942
928
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, nameprefixes_ARG,
943
   aligned_ARG, all_ARG, ignorelockingfailure_ARG, lock_dir_ARG, nameprefixes_ARG,
929
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, 
944
   noheadings_ARG, nolocking_ARG, nosuffix_ARG, options_ARG, partial_ARG, 
930
   rows_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG,
945
   rows_ARG, separator_ARG, sort_ARG, trustcache_ARG, unbuffered_ARG, units_ARG,
931
   unquoted_ARG)
946
   unquoted_ARG)
Lines 937-948 xx(vgscan, Link Here
937
   "\t[-d|--debug]\n"
952
   "\t[-d|--debug]\n"
938
   "\t[-h|--help]\n"
953
   "\t[-h|--help]\n"
939
   "\t[--ignorelockingfailure]\n"
954
   "\t[--ignorelockingfailure]\n"
955
   "\t[--lock-dir path]\n"
940
   "\t[--mknodes]\n"
956
   "\t[--mknodes]\n"
941
   "\t[-P|--partial] " "\n"
957
   "\t[-P|--partial] " "\n"
942
   "\t[-v|--verbose]\n"
958
   "\t[-v|--verbose]\n"
943
   "\t[--version]" "\n",
959
   "\t[--version]" "\n",
944
960
945
   ignorelockingfailure_ARG, mknodes_ARG, partial_ARG)
961
   ignorelockingfailure_ARG, lock_dir_ARG, mknodes_ARG, partial_ARG)
946
962
947
xx(vgsplit,
963
xx(vgsplit,
948
   "Move physical volumes into a new or existing volume group",
964
   "Move physical volumes into a new or existing volume group",
(-)LVM2.2.02.49.orig/tools/lvmcmdline.c (-1 / +7 lines)
Lines 964-969 int lvm_run_command(struct cmd_context * Link Here
964
{
964
{
965
	int ret = 0;
965
	int ret = 0;
966
	int locking_type;
966
	int locking_type;
967
	const char *lock_dir;
967
968
968
	init_error_message_produced(0);
969
	init_error_message_produced(0);
969
970
Lines 1015-1021 int lvm_run_command(struct cmd_context * Link Here
1015
	else
1016
	else
1016
		locking_type = -1;
1017
		locking_type = -1;
1017
1018
1018
	if (!init_locking(locking_type, cmd)) {
1019
	if(arg_count(cmd, lock_dir_ARG)) {
1020
		/* Get lockfile directory from commandline */
1021
		lock_dir = arg_str_value(cmd, lock_dir_ARG, "");
1022
	}
1023
1024
	if (!init_locking(locking_type, cmd, lock_dir)) {
1019
		log_error("Locking type %d initialisation failed.",
1025
		log_error("Locking type %d initialisation failed.",
1020
			  locking_type);
1026
			  locking_type);
1021
		ret = ECMD_FAILED;
1027
		ret = ECMD_FAILED;

Return to bug 268999