How can i move a file system /data from rootvg to another vg.
I have free space on another vg
thanks
David
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
-Lute.
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..."
David Arts <david...@belgacom.net> a écrit dans le message :
3ba86944$0$12222$4d4e...@news.be.uu.net...