]> sourceware.org Git - lvm2.git/commitdiff
pre-release
authorAlasdair Kergon <agk@redhat.com>
Fri, 15 Jun 2007 20:46:04 +0000 (20:46 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 15 Jun 2007 20:46:04 +0000 (20:46 +0000)
lib/locking/locking.c
lib/locking/locking.h
man/vgcfgrestore.8
man/vgrename.8

index 0d6bd43435924ef6a68f65704f9bfb8de36df196..81cb992ca03833e86304b34c331ea65690302f22 100644 (file)
@@ -44,46 +44,50 @@ static void _catch_sigint(int unused __attribute__((unused)))
        _sigint_caught = 1;
 }
 
-int sigint_caught() {
+int sigint_caught(void) {
        return _sigint_caught;
 }
 
-void sigint_clear()
+void sigint_clear(void)
 {
        _sigint_caught = 0;
 }
 
-/* Temporarily allow keyboard interrupts to be intercepted and noted;
-   saves interrupt handler state for sigint_restore(). Users should
-   use the sigint_caught() predicate to check whether interrupt was
-   requested and act appropriately. Interrupt flags are never
-   automatically cleared by this code, but lvm_run_command() clears
-   the flag before running any command. All other places where the
-   flag needs to be cleared need to call sigint_clear(). */
+/*
+ * Temporarily allow keyboard interrupts to be intercepted and noted;
+ * saves interrupt handler state for sigint_restore().  Users should
+ * use the sigint_caught() predicate to check whether interrupt was
+ * requested and act appropriately.  Interrupt flags are never
+ * cleared automatically by this code, but the tools clear the flag
+ * before running each command in lvm_run_command().  All other places
+ * where the flag needs to be cleared need to call sigint_clear().
+ */
 
-void sigint_allow()
+void sigint_allow(void)
 {
        struct sigaction handler;
        sigset_t sigs;
 
-       /* do not overwrite the backed up handler data with our
-          override ones; we just increase nesting count */
+       /*
+        * Do not overwrite the backed-up handler data -
+        * just increase nesting count.
+        */
        if (_handler_installed) {
                _handler_installed++;
                return;
        }
 
-       /* grab old sigaction for SIGINT; shall not fail */
+       /* Grab old sigaction for SIGINT: shall not fail. */
        sigaction(SIGINT, NULL, &handler);
-       handler.sa_flags &= ~SA_RESTART; /* clear restart flag */
+       handler.sa_flags &= ~SA_RESTART; /* Clear restart flag */
        handler.sa_handler = _catch_sigint;
 
        _handler_installed = 1;
 
-       /* override the signal handler; shall not fail */
+       /* Override the signal handler: shall not fail. */
        sigaction(SIGINT, &handler, &_oldhandler);
 
-       /* unmask SIGINT, remember to mask it again on restore */
+       /* Unmask SIGINT.  Remember to mask it again on restore. */
        sigprocmask(0, NULL, &sigs);
        if ((_oldmasked = sigismember(&sigs, SIGINT))) {
                sigdelset(&sigs, SIGINT);
@@ -91,9 +95,8 @@ void sigint_allow()
        }
 }
 
-void sigint_restore()
+void sigint_restore(void)
 {
-       /* extra call, ignore */
        if (!_handler_installed)
                return;
 
@@ -102,7 +105,7 @@ void sigint_restore()
                return;
        }
 
-       /* nesting count went down to 0 */
+       /* Nesting count went down to 0. */
        _handler_installed = 0;
 
        if (_oldmasked) {
index 27ebfc4b0b2005f0e25378da443494a47ba07e7c..1687f1bce79488cb14aef3db4cf279541c0614c4 100644 (file)
@@ -115,11 +115,10 @@ int suspend_lvs(struct cmd_context *cmd, struct list *lvs);
 int resume_lvs(struct cmd_context *cmd, struct list *lvs);
 int activate_lvs_excl(struct cmd_context *cmd, struct list *lvs);
 
-/* interrupt handling */
-
-void sigint_clear();
-void sigint_allow();
-void sigint_restore();
-int sigint_caught();
+/* Interrupt handling */
+void sigint_clear(void);
+void sigint_allow(void);
+void sigint_restore(void);
+int sigint_caught(void);
 
 #endif
index 9955cb019febc5f8771a952066fb0c4c7b9ee8f9..84bd4c231d9ce0fc9e87aed7e736827d57cb750c 100644 (file)
@@ -14,10 +14,10 @@ vgcfgrestore \- restore volume group descriptor area
 .SH DESCRIPTION
 .B vgcfgrestore
 allows you to restore the metadata of \fIVolumeGroupName\fP from a text 
-backup file produced by \fBvgcfgbackup\fP.  You can specify a backup file to
-use with the \fP-f\fP option.  If no backup file is specified, the latest
-backup file is used.  A list of backup and archive files of 
-\fIVolumeGroupName\fP may be listed with the \fB-l\fP option.
+backup file produced by \fBvgcfgbackup\fP.  You can specify a backup file 
+with \fP--file\fP.  If no backup file is specified, the most recent
+one is used.  Use \fB--list\fP for a list of the available
+backup and archive files of \fIVolumeGroupName\fP.
 .SH OPTIONS
 .TP
 \fB-l | --list\fP \(em List files pertaining to \fIVolumeGroupName\fP
index a93a35807df4532399e65eb664c509623f5a8235..c56a9de9e1a051a0141ea93dbc50b0f3c1c56440 100644 (file)
@@ -25,7 +25,22 @@ volume group "vg02" to "my_volume_group".
 .TP
 "vgrename vg02 my_volume_group" does the same.
 .TP
-"vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp" renames a volume group with UUID Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to the volume group named "VolGroup00_tmp".  Using the UUID option to name a volume group may be useful in cases where one machine has two physical volumes, each with the same volume group name, but a separate volume group UUID (this situation will cause error messages with lvm commands).  One way duplicate volume group names occur is if an old disk with a root volume is moved to a new machine with its own root volume.  In this case, both volume groups may have the same name (for example, "VolGroup00"), but different UUIDs.
+"vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp"
+changes the name of the Volume Group with UUID
+Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to 
+"VolGroup00_tmp".
+
+All the Volume Groups visible to a system need to have different
+names.  Otherwise many LVM2 commands will refuse to run or give
+warning messages.
+
+This situation could arise when disks are moved between machines.  If
+a disk is connected and it contains a Volume Group with the same name
+as the Volume Group containing your root filesystem the machine might
+not even boot correctly.  However, the two Volume Groups should have
+different UUIDs (unless the disk was cloned) so you can rename
+one of the conflicting Volume Groups with
+\fBvgrename\fP.
 .TP
 .SH SEE ALSO
 .BR lvm (8), 
This page took 0.040859 seconds and 5 git commands to generate.