Syncing 1 old (ex raid1) drive with 2 new drives (raid1)

106 views
Skip to first unread message

mcp77c

unread,
Apr 24, 2012, 2:23:50 AM4/24/12
to al...@googlegroups.com

Your assistance would be appreciated.
 
My story goes like so.
 
ORIGINAL
Dlink FW1.09 Raid 1 with 2x1.5Tb in Ext2
1 Drive Failed. 1 Drive OK and containing all files.
 
Purchase 2 New 1.5Tb drives.
 
Flash alt-f RC2 (latest)
Setup 2 New Drives in Raid 1, Ext4
 
Now i need to transfer files from 1 old drive to 2 new drives in RAID1.
 
Thanks in advance.
 
 
 

Joao Cardoso

unread,
Apr 24, 2012, 2:40:42 PM4/24/12
to al...@googlegroups.com
-If you have an external USB enclosure, you can put the old disk there and plug it into the DNS, where it will be assembled as a degraded RAID and mounted ready for use.  
Then copy its contents to the new RAID. Copying is faster if you use the "Folders Browse" web page instead of copying using the network.

-If you don't have an external USB enclosure, you have to use one of the internal bays for the old disk, and for that you have to remove one of the new disks from the box.
You have to Fail and then Remove one of the new disks from the RAID, then eject and physically remove that drive from the DNS; insert the old disk in DNS where it will be assembled as a degraded RAID and mounted ready for use. Copy the data to the new RAID, then stop the old RAID, eject and physically remove its disk, re-insert the disk from the NEW RAID, add it to the array and wait for a RAID resync.

The second option in more detail:

You will be using the right bay for swapping disks and will not turn power down.

0-System->Utilities->Services->StopAll
1-Disk->Utilities->Eject right bay. This will turn the new RAID into degraded state, but usable
2-Physically remove the right disk without turning power down -- this is hot-plugging
3-With the power still on insert the good disk from the old RAID in the right bay. It should be assembled in degraded mode and ready for use
4-Setup->Folders to examine the contents and copy the data from the old to new RAID. This is going to take a while, possibly hours. Your session will probably expire, keep waiting until there is no disk led activity for a while (this is an issue of the Folders copy/move operation when the operation take a very long time to accomplish)
5-Disk->Utilities->Eject right bay
5-Physically remove the right disk and re-insert the new one
6-Go to the RAID page and "Component Operations", "Partition", select the new disk partition, then "Component Operations", "Operation", "Add". A lengthily resync will start, but you can start using the RAID

Partial example, device names will NOT be the same as yours:

-Status page:

Disk Section:
Bay Dev. 
right sda...
left sdb...

-RAID web page with the new, good RAID

md0 47.0 GB raid1 sda2 sdb2

"md0" is my RAID device name, yours might be "md1"; "sda2" and "sdb2" are the RAID components, "sda" is generally the right disk while "sdb" is the left -- confirm in the status page the "Bay" and "Dev." names

-after Disk-Utilities->eject right, the RAID page shows

md0 47.0 GB raid1 sdb2

"raid1" should be in red, meaning that the RAID is in degraded mode; notice also that "sda2" disappeared, the RAID now only has one component, "sdb2"
At step 6 you will have to re-add "sda2" to the RAID again. Hopefully at step 6 the right disk will be called again "sda", but check the Status page for its name, if it is called "sdd" then add "sdd2" instead of "sda2". Anyway only the available components to add will appear in the drop-down menu.

-After inserting the old disk a new RAID should appear, with a new name, "md1" e.g., also in red and also with only one component, perhaps

md1 57.0 GB raid1 sdc2

-At step 4 you will select /mnt/md1, hit the CopyContents button, select  /mnt/md0 and hit the Paste button. Wait. And wait. And wait until the disk leds stop flashing.

You might want to read the RAID page online help.


mcp77c

unread,
Apr 25, 2012, 1:34:30 AM4/25/12
to al...@googlegroups.com
Step 4 is a challenging one as i cannot see a SETUP - FOLDERS option.
I have Host, Time, Mail, Proxy, Hosts, Users, Debian and Directory. I am on version 0.1RC2.
 
Cheers.

Joao Cardoso

unread,
Apr 25, 2012, 11:39:06 AM4/25/12
to al...@googlegroups.com


On Wednesday, April 25, 2012 6:34:30 AM UTC+1, mcp77c wrote:
Step 4 is a challenging one as i cannot see a SETUP - FOLDERS option.
I have Host, Time, Mail, Proxy, Hosts, Users, Debian and Directory. I am on version 0.1RC2.
 
Cheers.

Folder == Directory 

mcp77c

unread,
Apr 26, 2012, 8:02:16 AM4/26/12
to al...@googlegroups.com
OK, so i looked at the second option and struggled to be honest.
 
So I collected some change from the washing machine and bought a 3.5sata EXT2 to usb enclosure; and plugged the old good drive in.
 
After plugging in the Ext2 FS, the HDD shows up as sdc4 and is marked dirty. The 2 new drives in raid 1 show up as md0 (no surprise there). There is no mention of degraded raid on the old drive.
 
I went into Setup - Directory...... i clicked on /mnt/sdc4 and clicked 'CopyDirContent'. I then selected the folder I created previously on md0 (/mnt/md0/Users/xxxxxxxx/Volume1) and hit the 'PasteDir' button. The confirmation box came up and I hit 'OK' and then nothing happens. The files were not copied to md0.
 
To see what was happening, i loaded the old drive into my laptop and checked out the contents. The DNS had created a new EXT4 partition containing a couple of folders namely (lost+found & systemfile). The orig EXT2 partition was still there also containing all my files.
 
So stuck again......your thoughts / suggestions?
 
Also , what is the lost+found folder and why does it get created automatically in any folder i create. Is there a way to stop these folders from being created?
 
Thanks again.
MC

Joao Cardoso

unread,
Apr 26, 2012, 10:34:42 AM4/26/12
to al...@googlegroups.com


On Thursday, April 26, 2012 1:02:16 PM UTC+1, mcp77c wrote:
OK, so i looked at the second option and struggled to be honest.
 
So I collected some change from the washing machine and bought a 3.5sata EXT2 to usb enclosure; and plugged the old good drive in.
 
After plugging in the Ext2 FS, the HDD shows up as sdc4 and is marked dirty.

I think that you have not waited long enough.
Did you noticed that the power led was blinking with a earth-beat rhythm? Probably you didn't.

The main fault with the vendor's firmware is that no clean shutdown is done and no filesystem check is done at boot time. This means that the filesystems are marked as "dirty" (not necessarily meaning they have errors).
At boot time Alt-F checks all filesystems, and if some needs it a filesystem check one is performed. While it does the check, the blue power led blinks with an earth-rhythm pace. On small filesystems, this is fast, but on bigger ones it can take hours.

Now: the vendor's firmware uses to partition disks with a partition for user data, generally partition 2 (sdx2), and a partition for its own (vendor) usage, partition 4, (sdx4) which has generally 500MB.

The partition you tried to copy to your RAID was the small and mostly empty vendor's partition (sdx4) (which, if I remember correctly, only contains "hidden" files); so, the copy has almost instantaneous...

 
The 2 new drives in raid 1 show up as md0 (no surprise there). There is no mention of degraded raid on the old drive.

Now, that is odd...

I went into Setup - Directory...... i clicked on /mnt/sdc4 and clicked 'CopyDirContent'. I then selected the folder I created previously on md0 (/mnt/md0/Users/xxxxxxxx/Volume1) and hit the 'PasteDir' button. The confirmation box came up and I hit 'OK' and then nothing happens. The files were not copied to md0.
 
To see what was happening, i loaded the old drive into my laptop

With what OS? Linux? windows? Mac?
 
and checked out the contents. The DNS had created a new EXT4 partition

ext4? sure about that?
Alt-F does not create filesystems by its own initiative, and the vendor's firmware don't know nothing about ext4. You have to have done something by yourself. 
 
containing a couple of folders namely (lost+found & systemfile). The orig EXT2 partition was still there also containing all my files.

Good. 

So stuck again......your thoughts / suggestions?

Repeat the procedure and look at the blue power led.
When the led stops blinking your data should appear at "sdc2". And in the Folders/Directory Browser web page, when you select /mnt/sda2 your should see your old disk folders (the same as if you select /mnt/md0 you will see your RAID folders).
 
Also , what is the lost+found folder and why does it get created automatically in any folder i create. Is there a way to stop these folders from being created?

It Is the outcome of the filesystem check. All linux filesystems have such a folder, and if 'lost' files or folders are 'found' they are put there -- you have to learn to live with it.

Joao

PS-As for the degraded RAID not appearing, I've no clue... neither in the Status nor in the Disk->RAID web page?
Reply all
Reply to author
Forward
0 new messages