Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move /opt to another disk

Status
Not open for further replies.
Aug 10, 2001
21
US
How do I move /opt filesystem from one disk to another disk?
 
First tar /opt in a tarfile on your other disk
ex : cd /opt
tar cf - . | (cd /newdisk; tar xpvf -)
compare the size of the two file systems, if they are equal
unmount /newdisk
unmount /opt
then modify /etc/vfstab to reflect the change for /opt
mount /opt.

Hope this helps
 
How about this?

mkdir /a
mount /dev/dsk/c0t1d0s4 /a
account for vfstab
Can you make the change to vfstab first before you unmount the filesystem?
unmount /newdisk
unmount /opt
then modify /etc/vfstab to reflect the change for /opt
mount /opt.
 
With the mount procedure you are not moving the filesystem
off one disk to another. the data is still on the original disk - you are just changing where it appears to be by changing the mount point.

"cp" or the "find" command works well for moving data. With the find command use -print and pipe it to cpio. Check the man pages on cpio for options (I use -pdlumv).

After the copy , compare records - I use "du -k".

Still make your vfstab changes as above.

Hope this helps
Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top