Re: move a lv / fs to another vg
From: Dale Talcott (aeh_at_quest.cc.purdue.edu)
Date: 04/02/04
- Next message: Gary R. Hook: "Re: 6 Multiple Choice questions"
- Previous message: d jO'nZ': "Re: Good resources for new AIX sys admin, coming from Tru64"
- In reply to: Bert Moos: "move a lv / fs to another vg"
- Next in thread: Andy: "Re: move a lv / fs to another vg"
- Reply: Andy: "Re: move a lv / fs to another vg"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Apr 04 09:16:51 EST
"Bert Moos" <bert.moos@hotmail.com> writes:
>within an existing vg (uservg1) i have a lv (/dev/lv01) which contains only
>one filesystem (/data/app/zone1). i'd like to move this lv (/dev/lv01) with
>its filesystem (/data/app/zone1) to a new vg (uservg2). this new vg already
>exists and is empty. how can i move the lv with the filesystems and its data
>to the new vg.
You can unmount the file system, use cplv to copy its logical volume (lv01)
to a new LV inside uservg2, edit /etc/filesystems to refer to the new
LV, and remount the file system.
Double check with the man pages, but I think the steps would be:
umount /data/app/zone1
cplv -v uservg2 -y newlv01 lv01
vi /etc/filesystems # change /dev/lv01 to /dev/newlv01
There is no jfslog for the new copy of the file system. So, you need
to create a jfslog LV within uservg2. The poweruser way is to run mklv
and logform. But, I'm lazy, so I usually just use smit to create a
dummy file system in the new VG and let smit create the jfslog LV for
me (smitty crfs). Then, use lsvg -l uservg2 to see what name was given
to the jfslog (probably something like loglv01).
Now, change the file system to use that new log.
chfs -a log=/dev/loglv01 # whichever jfslog is in uservg2
mount /data/app/zone1
Once you are sure the new copy is okay, remove the old LV.
rmlv lv01
If you used smit to create a dummy file system, you can also remove
the dummy FS now (smitty rmfs).
Also, a tiny wording change. You say "i have a lv (/dev/lv01) which
contains only one filesystem (/data/app/zone1)". An LV can be used
either to hold a file system or not. You cannot hold multiple FSs within
a single LV. So, the "only one" part in the quote should be just "a".
-- Dale Talcott, IT Research Computing Services, Purdue University aeh@quest.cc.purdue.edu http://quest.cc.purdue.edu/~aeh/
- Next message: Gary R. Hook: "Re: 6 Multiple Choice questions"
- Previous message: d jO'nZ': "Re: Good resources for new AIX sys admin, coming from Tru64"
- In reply to: Bert Moos: "move a lv / fs to another vg"
- Next in thread: Andy: "Re: move a lv / fs to another vg"
- Reply: Andy: "Re: move a lv / fs to another vg"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|