1825775 Members
2139 Online
109687 Solutions
New Discussion

Copying file systems

 
SOLVED
Go to solution
Joe Robinson_2
Super Advisor

Copying file systems

I've run out of disk in /var (because of upgrading an application); I'm out of disk space in that VG. I'm copying /var to another file system (using another VG) using the following syntax:

cd /var; find . | cpio -pdumv

I have enough room in the new FS, however I'm seeing the following error that concerns me:

Socket not backed up

How can I move those sockets?

Also, when doing the copy of /var, I have a daemon that apparantly has an open file...it gets to one of the "reply" files (/var/rbootd/C014227413a0.reply) that is open and hangs the copy. Will taking the system down to single-user, mounting the appropriate FS's and running the above command work then? Or can I just shut the daemon down?
5 REPLIES 5
Joe Robinson_2
Super Advisor

Re: Copying file systems

cd /var; find . | cpio -pdumv /var2

After I copy the file systems, I plan on just modifying my fstab to point at the correct fs and rebooting.
Geoff Wild
Honored Contributor

Re: Copying file systems

Try vxdump/vxrestore

vxdump -0 -f - -s 1000000 -b 16 /var | (cd /newvar ; vxrestore rf -)

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Copying file systems

There is no point is copying named sockets; they will be recreated when the daemon restarts. You are going to find it difficult to umount /var so your best bet will be to copy your /var to /newvar and then edit /etc/fstab changing /newvar to /var and commenting out the original /var entry. You then reboot and when the system comes up you can safely lvremove what was the original /var's LVOL.
If it ain't broke, I can fix that.
Joe Robinson_2
Super Advisor

Re: Copying file systems

Clay,

Thanks for the info on the sockets, that's what I thought but wanted clarification before moving on.

Geoff,

Thanks for the hint. I hadn't ever used that command but will keep it in my bag of tricks!
Joe Robinson_2
Super Advisor

Re: Copying file systems

See Clay's comments. Thanks everyone!