--- a/man/vgsplit.8 +++ b/man/vgsplit.8 @@ -8,6 +8,7 @@ vgsplit \- split a volume group into two .RB [ \-A | \-\-autobackup " {" y | n }] .RB [ \-c | \-\-clustered " {" y | n }] .RB [ \-d | \-\-debug ] +.RB [ \-f | \-\-force ] .RB [ \-h | \-\-help ] .RB [ \-l | \-\-maxlogicalvolumes .IR MaxLogicalVolumes ] @@ -18,12 +19,12 @@ vgsplit \- split a volume group into two .RB [ \-t | \-\-test ] .RB [ \-v | \-\-verbose ] SourceVolumeGroupName DestinationVolumeGroupName -PhysicalVolumePath [PhysicalVolumePath...] +{ PhysicalVolumePath | LogicalVolumeName } [ { PhysicalVolumePath | LogicalVolumeName } ...] .SH DESCRIPTION .B vgsplit -moves -.IR PhysicalVolumePath (s) -from +moves one or more { +.IR PhysicalVolumePath | LogicalVolumeName +} from .I SourceVolumeGroupName into .I DestinationVolumeGroupName\fP. @@ -46,9 +47,27 @@ before the physical volumes are moved. Specifying any of the above default volume group attributes with an existing destination volume group is an error, and no split will occur. -Logical Volumes cannot be split between Volume Groups. -Each existing Logical Volume must be entirely on the Physical Volumes forming -either the source or the destination Volume Group. +Logical Volumes cannot be split between Volume Groups. Each existing Logical +Volume must be entirely on the Physical Volumes forming either the source or +the destination Volume Group. \fBvgsplit\fP will attempt to locate related +Physical Volumes and Logical Volumes in cases where dependencies exist. If +a split would result in moving more Physical or Logical volumes than is +given on the command line, \fBvgsplit\fP will prompt the user before +continuing the split. The prompt may be overridden with \fB--force\fP. + +The following example illustrates when \fBvgsplit\fP results in more Volumes +moved than was originally specified. Suppose \fIvg1\fP contains \fIpv1\fP, +and \fIpv2\fP, \fIlv1\fP is a simple linear LV contained on \fIpv1\fP, +and \fIlv2\fP is a striped LV contained on \fIpv1\fP and \fIpv2\fP. +The following command: +.nf + \fBvgsplit\fP \fIvg1\fP \fIvg2\fP \fIlv1\fP +.fi +will result in Logical Volumes \fIlv1\fP and \fIlv2\fP being moved along with +Physical Volumes \fIpv1\fP and \fIpv2\fP. In this case the user will be +prompted to confirm the \fBvgsplit\fP since only \fIlv1\fP was specified on +the command line. + .SH OPTIONS See \fBlvm\fP for common options. .SH SEE ALSO diff --git a/test/lvm-utils.sh b/test/lvm-utils.sh index 0397b22..a7b6aed 100644 --