Hello, exist there an standard way to move an logical volume from one volume group to another one?
Thanks.
Frank Büttner wrote:
Hello, exist there an standard way to move an logical volume from one volume group to another one?
assuming this logical volume containss extfs, dump(8) it on one, restore(8) it on the other. this can be combined with a pipe, like....
# dump 0 -f - /dev/volgroup/logvol | (cd /dest; restore -rf - )
(this assumes the new logical volume has been created, has a virgin filesystem fresh from mkfs, and is mounted)
John R Pierce schrieb:
assuming this logical volume containss extfs, dump(8) it on one, restore(8) it on the other. this can be combined with a pipe, like.... # dump 0 -f - /dev/volgroup/logvol | (cd /dest; restore -rf - )
(this assumes the new logical volume has been created, has a virgin filesystem fresh from mkfs, and is mounted)
This will be possible. Exist there no way to do this without moving the data?
On Sun, 2008-06-29 at 10:33 +0200, Frank Büttner wrote:
John R Pierce schrieb:
assuming this logical volume containss extfs, dump(8) it on one, restore(8) it on the other. this can be combined with a pipe, like.... # dump 0 -f - /dev/volgroup/logvol | (cd /dest; restore -rf - )
(this assumes the new logical volume has been created, has a virgin filesystem fresh from mkfs, and is mounted)
This will be possible. Exist there no way to do this without moving the data?
I think there is not enough information. Your first post seemed to indicate a data move. Now it seem to indicate ... merge of 2? Rename of one? Reassignment of PV to a new group?
I usuallt don't reply when a query shows lack of forethought as to needs of folks to be able to help. But, it's Sunday.
<snip sig stuff>
Frank Büttner wrote:
John R Pierce schrieb:
assuming this logical volume containss extfs, dump(8) it on one, restore(8) it on the other. this can be combined with a pipe, like.... # dump 0 -f - /dev/volgroup/logvol | (cd /dest; restore -rf - )
(this assumes the new logical volume has been created, has a virgin filesystem fresh from mkfs, and is mounted)
This will be possible. Exist there no way to do this without moving the data?
a different volgroup implies different physical drives... how would you expect to move a logical volume from one volgroup to another without moving the data contained in said logvol?!?
On Sun, 2008-06-29 at 09:13 -0700, John R Pierce wrote:
Frank Büttner wrote:
John R Pierce schrieb:
assuming this logical volume containss extfs, dump(8) it on one, restore(8) it on the other. this can be combined with a pipe, like.... # dump 0 -f - /dev/volgroup/logvol | (cd /dest; restore -rf - )
(this assumes the new logical volume has been created, has a virgin filesystem fresh from mkfs, and is mounted)
This will be possible. Exist there no way to do this without moving the data?
a different volgroup implies different physical drives... how would you expect to move a logical volume from one volgroup to another without moving the data contained in said logvol?!?
Since the OP still hasn't clarified his objective, nor provided more detail about original config, I am free to imagine the most permissive situation.
Answering your Q, "man vgmerge".
Will it do what he wants? No way to tell. But if he has only one lv in the source vg, ...
<snip>
William L. Maltby schrieb:
Since the OP still hasn't clarified his objective, nor provided more detail about original config, I am free to imagine the most permissive situation.
Answering your Q, "man vgmerge".
Will it do what he wants? No way to tell. But if he has only one lv in the source vg, ...
<snip>
Yes vgmerge, can do the job. Thanks.
Frank
On Mon, 2008-06-30 at 08:16 +0200, Frank Büttner wrote:
William L. Maltby schrieb:
<snip>
Yes vgmerge, can do the job. Thanks.
NP. Just as an FYI, at command line, do lvm. Then type help. That gives a nice little "index" to available commands. Then, at command line, a "man <an LVM cmd>" gives more detail.
As a side note, if one did need to physically copy the data, pvmove might be useful. It has checkpoint restart, so providing a relatively secure way of doing that job. Of course, backups are always advisable because all hardware, in my experience, has an undocumented "FLOP" (Fail at Least Opportune Point) feature. =:-O
Frank
<snip sig stuff>
On Sun, 2008-06-29 at 09:13 -0700, John R Pierce wrote:
Frank Büttner wrote:
Exist there no way to do this without moving the data?
a different volgroup implies different physical drives...
Not necessarily true.
But to answer the original question, no, LVM was not designed to swap LVs between VGs.