dynamox

updated

16 years ago

D

dynamox

11 Legend

20419 Posts

87439 Points

0

3976

October 30th, 2006 11:00

How to copy data from one fs to another

Hello,

i need to migrate 2TB of data from one filesystem to another within the same Celerra box and on the same data mover. Is there a way to copy data internally to the box? Right now i have to connect to both shares from my WindowsXP workstation and initiate the copy process. I have CFS-14 , code 5.4.21.400.

Thanks
  • ironman4

    14 Posts

    1151

    0

    Posted October 30th, 2006 13:00

    This is a reply from a Celerra expert at EMC:

    They simply need to make a ckpt of the FS they want to copy, create another FS the same size as the one they want to copy using the samesize option, then run an fs_copy from the ckpt to the new FS.

    This will give them a point in time copy that they can also update by running differential copies, they could even replicate it internally ( loopback replication )

    This method should be quicker than any host based copy, and depending on harward & how busy the DM and or the backend is and on if they are using ATA or Fibre, typical speeds achievable should be anywhere from 100 to 300 GB per hour.
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    1154

    0

    Posted October 30th, 2006 13:00

    Ironman:

    great suggestion, can i use fs_copy if my file systems are different size, my target filesystem is bigger than my source fs. I just looked at fs_copy man pages and it says that "fs_copy creates a complete or differential copy of a file system on the specified Celerra Network Server" . It sounds like it create a chkpt on its own? or do i need to use an existing chkpt ? What is loopback replication ? Since it's on the same Celerra box i dont' need to specify my source and destination ip address.

    Thank you
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    1154

    0

    Posted October 30th, 2006 14:00

    so I take it its a block level copy vs file level ?

    thank you
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    1154

    0

    Posted October 30th, 2006 16:00

    Thank you very much for giving me this sugguestion ..i will use it in the near future.
  • sscss0

    15 Posts

    1154

    0

    Posted November 10th, 2006 09:00

    If the filesystems are not the same size, you can use the server_archive command to copy from one FS to another in the same datamover.
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    1154

    0

    Posted November 10th, 2006 10:00

    Chris,

    what would the syntax be?

    something like:

    server_archive server_3 -r -w /source_fs /destination_fs

    Will it preserve NTFS/Quota settings?

    Thanks
  • sscss0

    15 Posts

    598

    0

    Posted November 13th, 2006 11:00

    That is the correct syntax. man server_archive is good also.

    It will not preserve NTFS/CIFS permissions. You will have to reset all the permissions once you are done copying. Its just a quick and dirty way to copy data internally.

    Good luck
  • DanLah

    6 Posts

    598

    1

    Posted December 22nd, 2006 22:00

    If you like to live life on the edge, here's a script to use server_archive to copy from one file system into a new file system of a smaller size. In essence you shrink the file system.


    Syntax is-----> shrink_fs oldfs 500M

    this would "shrink" a file system named oldfs to 500M from the previous
    size.

    Here's the code - just paste into vi and save as shrink_fs

    ### command line argument - shrink_fs name Size $1= name $2=new size in
    M - for example 50M

    ####Create New file system
    nas_fs -name fsprod_new -type uxfs -create size=$2 pool=id=12
    storage=SINGLE worm=off -option slice=y,mover=server_2
    server_mountpoint server_2 -create /fsprod_new
    server_mount server_2 -option rw fsprod_new /fsprod_new


    ##Execute copy command - takes time to copy data
    server_archive server_2 -r -w /$1 /fsprod_new

    ##### Pause here ##### this starts the swap

    ##unmount file systems - takes seconds
    server_umount server_2 -perm $1
    server_umount server_2 -perm fsprod_new

    ###rename new fs to old - takes seconds
    nas_fs -rename $1 fsprod_old
    nas_fs -rename fsprod_new $1

    ##mount file system to dm
    server_mount server_2 $1 /$1


    #######Pause here ##### check data before deleting the old data

    ###Delete Old File system
    nas_fs -delete fsprod_old

    ###Delete fsprod_new mountpoint
    server_mountpoint server_2 -delete /fsprod_new
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    601

    0

    Posted December 26th, 2006 07:00

    Dan,

    thank you for sharing the script, now i just need to figure out how to help my Admin preserve/restore NTFS permissions after the migration. Looks like i am going to have to reset quotas but that's not a big deal.
  • dynamox

    11 Legend

    20419 Posts

    87439 Points

    601

    0

    Posted January 8th, 2007 11:00

    so if anybody cares ..i have done a few sample fs_copy copies and it works pretty good. The syntax is very simple:

    fs_copy -start fs46 fs44

    where fs46 is my source and fs44 is my target file systems. Both had to be mounted in read only mode and fs44 had to be a rawfs type file system. I copied 18G worth of data from ATA to FC and from FC to ATA file systems (CX600) resulting in the same number. It took 10min to do a full copy ..so that's around 28MB/s. But what i liked that most was that it retained NTFS and Tree Quota settings. That was the biggest thing as tree quotas can not be applied to an existing folder structure.

    Thank you for great recommendation guys