1824831 Members
3537 Online
109674 Solutions
New Discussion

Re: migration

 
Prashanth Waugh
Esteemed Contributor

migration

Hi,

I am going to transfer filesystem which is currently residing on storage to internal part of server.So pls provide me the steps That will helpful to carryout this activity

Thanks!!!!!!
For success, attitude is equally as important as ability
1 REPLY 1
James R. Ferguson
Acclaimed Contributor

Re: migration

Hi:

Create your new filesystem on your internal volume group (not vg00, I hope). Create a mountpoint for it, for example, '/dstdir'. This will be changed later.

Now copy your original filesystem data (from 'srcdir') to the new mountpoint (dstdir'). Make sure that the original filesystem isn't in use by anything. You may wish to unmount and remount it to make sure that you have stopped all activity to it before you begin to copy data.

You can copy the data in various ways. Using 'cpio', 'tar', 'cp' or 'fbackup' are all ways to perform this. With 'fbackup' you can handle largefiles and easily preserve permissions together with modification and lastaccess timestamps. It it one method I particularly like:

# cd srcdir && fbackup -i . -f - | ( cd dstdir && frecover -Xrf - )

If you elect to use 'cp', make sure that your destination is empty when you begin.

When you are done, unmount the original filesystem ('srcdir') as well as the newly copied one ('dstdir'). Rename the original filesystem mountpoint (with 'mv') to anything you like. Rename the 'dstdir' directory to that of the original filesystem. Modify your '/etc/fstab' to reflect the new device file location of your copied filesystem and mount it.

When you are satisfied with everything, you can 'lvremove' your old filesystem and its old, renamed mountpoint.

Regards!

...JRF...