• February 27, 2025, 02:26:23 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Copying data between 3 drives in the DNS-323  (Read 5838 times)

random404

  • Level 1 Member
  • *
  • Posts: 23
Copying data between 3 drives in the DNS-323
« on: September 04, 2010, 11:19:15 AM »

I have 2 drives in my DNS-323, which are formatted as STANDARD, and one drive in a SATA enclosure connected to the USB port of the DNS-323. All 3 drives are 1 TB.

Right now the 2 drives in the DNS-323 have no data - I began copying over nearly 1 TB of data from the USB SATA enclosure into Volume_2 using rsync, and it's taking a very long time. By my calculations this could be going on for several days - is this right, because it seems far too slow - or am I doing something wrong?

Once the data has been copied over to Volume_2, I'd like to copy it over to Volume_1 (I know I could have used RAID 1, but I ended up going with STANDARD and will keep them in sync using scripts, like what jamieburchell mentioned in my previous post). I could use rsync again, but I'm wondering if there's a faster way - such as using one of the other Linux commands, like dd, to copy /dev/sdb2 (Volume_2) over to /dev/sda2 (Volume_1)?

Would it be faster? What are the advantages and the risks? Will the data be accessible in Volume_1 by running the 'dd' command in this case, or is rsync the only way (in which case I have to wait for days for the transfer to complete again)?

Also, right now Volume_1 contains the ffp folder and packages - if I use dd to copy /dev/sdb2 to /dev/sda2, would everything explode - pardon my ignorance, but it seems like I'd be overwriting all the ffp stuff when commands like rsync or dd are being run through ffp.
Logged

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Copying data between 3 drives in the DNS-323
« Reply #1 on: September 04, 2010, 01:30:38 PM »

Rsync will be as slow as a normal file copy the first time round. The beauty of rsync will come in to play on subsequent runs. Only those files, or parts of files that have changed will be copied over and those files that no longer exist are removed. Of course this depends on the parameters fed to rsync.
I'd personally stick with that and see how fast your next sync will be.
Each month my rsync of 500GB of data takes only a few minutes, but of course this depends on how much has changed and how big the files are that rsync needs to update/copy.

As for the ffp folder, you could exclude that directory from the sync.

Be careful experimenting with "dd" you could easily overwrite your entire disk. In any case an entire partition copy would be much slower than an incremental rsync (and safer). I wouldn't feel happy altering partitions defined by the 323.
« Last Edit: September 04, 2010, 01:37:40 PM by jamieburchell »
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

random404

  • Level 1 Member
  • *
  • Posts: 23
Re: Copying data between 3 drives in the DNS-323
« Reply #2 on: September 05, 2010, 03:13:49 AM »

Certainly rsync is faster on subsequent backup runs, but I'm wondering if it's the fastest for the initial backup of data to the empty disk. Because 'dd' would use disk-to-disk transfers rather than going through the filesystem (not really a Linux guy so I may have misinterpreted), so I'd imagine it's much faster.

In terms of overwriting the data, as long as it's done from partition to partition /dev/sdb2 to /dev/sda2, I don't see what could go wrong in the writing. What I'm wondering though is would this written data be readable, or can it not be done this way (because there's still /dev/sda1 and /dev/sda4 to worry about - and those probably contain ext2 and DNS-323 specific things that maybe would need to have been updated somehow), or is simply making a copy of the data partitions enough?

Is it worth a shot because I have that data stored elsewhere? (I just really don't want to wait a half-week to have my data transfer over again.) In any case, after the initial data transfer I'll certainly use rsync for incremental syncs.
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: Copying data between 3 drives in the DNS-323
« Reply #3 on: September 05, 2010, 03:33:27 AM »

Rsync has a fair bit of overhead nad is not the fastest for initial copying. A straight 'cp' woul.d be better. It does do a good job of subsequent syncing though. I too use it on a regular basis. Some of my jobs run every 15 minutes, some every hour, some every day and some once a month, depending on what I am backing up and to where.
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

jamieburchell

  • Level 6 Member
  • *
  • Posts: 947
Re: Copying data between 3 drives in the DNS-323
« Reply #4 on: September 05, 2010, 07:06:11 AM »

Is it worth a shot because I have that data stored elsewhere? (I just really don't want to wait a half-week to have my data transfer over again.) In any case, after the initial data transfer I'll certainly use rsync for incremental syncs.

I have no experience of "dd". It's worth a shot if you have the time and inclination and don't mind rebuilding everything again if it doesn't work out. Would be interesting to know the results. I'd rather wait for the copy than risk hosing the paritions created by the DNS.
Logged
If your little 323 is not working right,
You've racked your brains and been up all night
Take a deep breath and wipe away the sweat,
Login as web admin and try a factory reset!

random404

  • Level 1 Member
  • *
  • Posts: 23
Re: Copying data between 3 drives in the DNS-323
« Reply #5 on: September 07, 2010, 03:02:05 PM »

I chickened out of using 'dd' and used cp for the initial transfer, only because I didn't know what would happen if all the ffp stuff would get overridden as the transfer was happening
Logged