Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

Faster way: SAN hd to SAN hd copying

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Faster way: SAN hd to SAN hd copying

hi! i got a rhel 6.3 host that already have an xfs filesystem mounted from a SAN (let's call it SAN-1) whose size is 9TB.

i will be receiving another SAN (let's call it SAN-2) storage of 15TB size. this new addition is physically on another SAN storage. SAN-1 is on a Pillar storage while the new one is on a Dell SAN storage.

i supposed brand does not matter here. my initial reaction to move the directories and files from SAN-1 to SAN-2 is either using "tar" or "dd". in both cases, i need to do it online as there is continuous data being duplicated from SAN-1 to tape storage.

is using "tar" or "dd" the only online option? are there better ways?
# 2  
Why not cp (if you're trying to make copies of the files on the old SAN so they also appear on the new SAN) or mv (if you're trying to move files from one SAN to the other SAN)?
# 3  
coz i want to keep the links, permissions, owners, etc.

old school way. so i was wondering if nowadays there are better ways specially if a SAN storage is involved (as opposed to physical hd to hd).
# 4  
Don't you think it would have been a good idea to tell us
Note that cp -Rp source destination can be used to copy filesystems maintaining dates, permissions, and ownership (but may lose links) as long as you're running with the appropriate privileges.

You can use cpio, pax, or tar to maintain links, owners, and permissions as long as you're running with the appropriate privileges.

If you use dd to copy individual files, you will lose links, owners, and permissions.

If you use dd to copy an entire filesystem, you can't change the filesystem type or size with the copy and you will destroy any files that were on the SAN you are overwriting with the dd. And, the filesystem cannot be active (i.e., should not be mounted (or, if it is mounted, mount it read-only)) during the dd. After you copy the filesystem, depending on the filesystem type, you may be able to grow the filesystem in the new SAN to occupy the additional space available there depending on the tools available on the new SAN to do such things. Note that some SAN vendors use proprietary filesystem and/or RAID designs that might not work on another SAN vendor's hardware. Be very sure that you know what you're doing before trying to use dd to replace one SAN filesystem with another SAN filesystem.
# 5  
I don't know if the cpio command is available on Linux but that is what I use in the Solaris world... AFAIK the faster'ish way to copy whole file systems. Read a bit here:

Copying Directories Between File Systems (cpio Command) - Oracle Solaris Administration: Devices and File Systems
# 6  
When you say 'a faster way', are you trying to move the data from one SAN to another, so that you can detach the original and you need to make the offline time as short as possible?

If your disk is LVM, then you might be better to proceed like this:-
  • Get the new LUN assigned and re-scan to pick it up if necessary
  • Make the whole new LUN into an LVM Physical Volume with pvcreate
  • Add the PV into the volume group containing the data you want to move
  • Alter the logical volume holding your filesystem/data to have two copies, specifying the new PV as the target. This will take a long time, but the applications remain available because the data is still accessible.
  • Verify that the logical volume has no errors reported.
  • Alter the logical volume to have just a single copy, specifying the old SAN device to be removed
  • Repeat the mirror/drop for as many logical volumes as you need to move to completely free the old PV
  • Remove the old PV from the volume group
  • Detach the old LUN from the OS
  • Detach the old LUN from the SAN side

Using the tools in the OS rather than trying to do the work yourself should be a lot neater. The logical volume is moved, but the filesystem has no idea about it, so all the files remain exactly as they were and your applications, backups or whatever can happily carry on.

I prefer to add a mirror to the new device rather than just execute a move for large logical volumes just in case there are any issues in the process. You don't destroy the original so you can always drop the new copy and start again.

Have I missed the point and waffled on about something irrelevant? My apologies if I have, but I hope that this helps. If you are looking to make another copy to be used separately, then we might be able to use LVM to do that too, but that would be a copy at a fixed point in time that would then go out of date with respect to the original as either is changed (you suggest that there are many concurrent processes working on it)

Anyway, I hope that this helps. Please feel free to correct me if I'm way off target.

Kind regards,
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. AIX

SAN Migration

Hi all, We are migrating our SAN storage from HSV360 to 3PAR. The system runs aix 6.1 version with HACMP. Please let me know what are requirements from OS side and how are the data copied to the new disks. (10 Replies)
Discussion started by: ElizabethPJ
10 Replies

2. AIX

IBM SAN TO SAN Mirroring

Has anyone tried SAN to SAN mirroring on IBM DS SAN Storage. DS5020 mentions Enhanced Remote Mirror to multi-LUN applications I wonder if Oracle High availibility can be setup using Remote Mirror option of SAN ? (1 Reply)
Discussion started by: filosophizer
1 Replies

3. UNIX for Dummies Questions & Answers

Booting off of a SAN

Hello, I'm posting this in the "Unix for Dummies" forum, since it is more of a theoretical question than an exact problem/fix I'm inquiring about. I have a SunFire T2000 server with 4 internal hard drives, running Solaris 10. (So far so good :) The company just purchased a large EMC SAN. ... (5 Replies)
Discussion started by: FredSmith
5 Replies

4. AIX

san lv showing old fs

Hi All, I have been working with two AIX with san and this is the first I got this minor problem on my third AIX. The san/hdisk was recreated so many times because of this problem. When I created a new vg and fs. The fs will be mounted/unmounted properly but if I query the fs on a vg with... (2 Replies)
Discussion started by: itik
2 Replies

5. AIX

paging on san

Hi All, Is there's a problem if I put the paging on a san external storage? Thanks in advance, itik (1 Reply)
Discussion started by: itik
1 Replies

6. AIX

SAN error

Dera all I have error repeating for two day, when I checked the error log by errpt command: ------------------------------------------------------------------------ LABEL: SC_DISK_ERR2 IDENTIFIER: 79B0DF89 Date/Time: Wed Oct 31 02:41:36 SAUS Sequence Number: 9000... (1 Reply)
Discussion started by: magasem
1 Replies

7. Solaris

Thoughts/experiences of SAN attaching V880 to EMC SAN

Hi everyone, I wonder if I can canvas any opinions or thoughts (good or bad) on SAN attaching a SUN V880/490 to an EMC Clarion SAN? At the moment the 880 is using 12 internal FC-AL disks as a db server and seems to be doing a pretty good job. It is not I/O, CPU or Memory constrained and the... (2 Replies)
Discussion started by: si_linux
2 Replies

8. HP-UX

SAN migration

Hi, I'm going to be involved in a migration of SAN islands to one big SAN. I've not worked with SANs before and I'm not sure how to approach this. I suspect the disk devices on the HP servers are going to change, when the EVA's and servers are plugged into this new Cisco 9509 switch. Any... (0 Replies)
Discussion started by: Hils
0 Replies

9. AIX


hi We have 2 AIX nodes running with HACMP and all of them connected to SAN, Our shared storage is shark; I need to create shared volume group and I need the HACMP take a ware of it. Regards (1 Reply)
Discussion started by: h2aix
1 Replies

10. UNIX for Dummies Questions & Answers

what is SAN

Hello all, I have looked at the entire posting that have SAN in it and Iím still fuzzy on how SAN works. I understand that every disk array can be access from any server that needs it, but is there software that is install or NFS mount type situation. One post stated that if your format command... (7 Replies)
Discussion started by: larry
7 Replies

Featured Tech Videos