Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to move file system /data in rootvg to other vg

57 views
Skip to first unread message

David Arts

unread,
Sep 19, 2001, 5:45:30 AM9/19/01
to
Hello,

How can i move a file system /data from rootvg to another vg.
I have free space on another vg

thanks

David


BPW

unread,
Sep 19, 2001, 7:41:23 AM9/19/01
to
Hi,

this may not be an elegant solution and I think there'll have to be
something easier, but you might try the following:

Create a new filesystem on the other vg (e.g. /data2), then move all the
data to that filesystem (you might use mv command or a tar with relative
pathname using ./ so you can restore the data to an exact spot in the
new filesystem) then erase the old filesystem and rename the /data2 to
/data)

This is only an idea, I'm not sure wheter this is going to work or not
...

You might also try to do a tar of all contents of /data to a tape, then
verify the tape, erase /data and create a new /data on the other vg ....

Hope I could be of help....

Regards
Thomas

Arne Sodal

unread,
Sep 19, 2001, 8:42:19 AM9/19/01
to
smit lv - Copy a Logical Volume

Luterin

unread,
Sep 19, 2001, 11:05:24 AM9/19/01
to
- create new fs (e.g. /data2) on other VG
- make sure there is no activity on /data (e.g. database files open)
cd /data
find . -depth -print |cpio -pdm /data2
umount /data
- rename /data2 to /data

-Lute.


Holger van Koll

unread,
Sep 24, 2001, 9:54:15 AM9/24/01
to
David Arts schrieb:

Hi David,

I had to do this a few times and so wrote a script.
It copies lv-based and so avoids problems with pipes, sockets, devices
etc.


#!/bin/sh
echo "filesystem?"
read myfs
lsfs $myfs
echo "lv von $myfs (ohne dev)?"
read mylv
lsvg -o
echo "neue vg?"
read newvg
lsvg -l $newvg |grep -i jfslog
echo "jfslog von $newvg?"
read jfslog

echo "ok, umounting + fsck"
umount $myfs && fsck -p $myfs
echo "return to continue or ctrl-c to exit"
read bla

echo "ok, copying $mylv"
chlv -n aabbccdefguherf $mylv && cplv -v $newvg -y $mylv aabbccdefguherf
&& chfs -a log=/dev/$jfslog -a dev=/dev/$mylv $myfs && echo ok || (echo
ERROR... return oder ctrl-c ; read bla)

echo "mounting + fsck"
mount $myfs && umount $myfs && fsck -p $myfs && mount $myfs && echo ok
mount |grep $myfs

echo "rmlv aabbccdefguherf if you want..."

Philippe.BABLOT

unread,
Sep 24, 2001, 8:50:15 PM9/24/01
to
The simplest way is :
- to rename the filesystem /data in /dataold ( smitty jfs )
- to create the filesystem /data in the other vg
- to copy the data by : cd /dataold ; find . -print | cpio -dumpv /data
- to delete /dataold : umount /dataold ; rmfs -r /dataold


David Arts <david...@belgacom.net> a écrit dans le message :
3ba86944$0$12222$4d4e...@news.be.uu.net...

0 new messages