Copying to new XFS formatted disk in IPMI console best practice.


8 posts in this topic Last Reply

Recommended Posts

I have an empty XFS formatted disk in my array. I like to transfer all contents from another disk to this disk then format it to XFS and repeat this until all disks in the array are changed to XFS.

 

What ist the best and safest and fastest way? Should I do it in a screen session in Putty? Or in the IPMI console?

 

Should I copy or move or use rsync?

 

Is there a command  that will copy all files and folders at once?

Can this be done in Midnight Commander?

 

Is this Set and Forget? Will the copying continue when I close Putty or the IPMI console?

 

 

Link to post

I have migrated all the disks in my 2 servers to XFS using the following command from a putty/shell:

 

rsync -av --progress --remove-source-files /mnt/diskX/ /mnt/diskY/

 

This will migrate the data, and remove the source files once each is successfully copied.  I like this method, because if it gets killed, you can easily restart and it picks up where it left off.

 

After the first run completes, I run it a few more time to catch any files that were created during the copy.  The target file is a hidden ".file" during the copy so from the share point of view there is only a single copy of the file existing during the copy.  After the copy, the source file is deleted and the target is renamed so the switch is barely noticeable to the user.

 

You can skip the remove option if you don't the overhead of the delete, but then you also have dups on the share until you are completed.

 

 

Link to post

Thanks.

 

You don't use screen or nohup so the command will keep on running whem putty is closed? Or is that a bad idea?

I did the same thing this past week.  I was transferring overnight with screen.  Then the next day stop the array, reformat the drive and run rsync on screen overnight again.
Link to post

I do use screen sometimes. I am on my workstation so much of the time, i just use an ssh sessions normally.    Probably with screen, is you can't easily scroll back, so unless you are logging to a file, it is hard to see the history.  Plus since you can restart with rsync so easily, it is not a big deal if it drops...

Link to post
  • 1 month later...
  • 3 months later...

To improve the copy speed, add -W (--whole-file), to avoid calculating deltas/diffs of the files. This is the default when both the source and destination are specified as local paths, since the real benefit of rsync's delta-transfer algorithm is reducing network usage.

Link to post
  • 2 years later...
On 10/2/2014 at 7:26 AM, jphipps said:

I have migrated all the disks in my 2 servers to XFS using the following command from a putty/shell:

 

rsync -av --progress --remove-source-files /mnt/diskX/ /mnt/diskY/

 

This will migrate the data, and remove the source files once each is successfully copied.  I like this method, because if it gets killed, you can easily restart and it picks up where it left off.

 

After the first run completes, I run it a few more time to catch any files that were created during the copy.  The target file is a hidden ".file" during the copy so from the share point of view there is only a single copy of the file existing during the copy.  After the copy, the source file is deleted and the target is renamed so the switch is barely noticeable to the user.

 

You can skip the remove option if you don't the overhead of the delete, but then you also have dups on the share until you are completed.

 

 

Thank you very much!

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.