Hi Joao,
I currently have RAID1 on 2 disks, I plan to break RAID and use it as 2 seperate disks. Does below steps look OK to you? The goal is to have the data completely safe (they are family photos :-))
1. Filesystems->RAID->select second component -> fail
2. Disk->Utilities->Eject second disk
3. Shutdown the box and take second disk out
Note. I understand that I probably don't have to but taking out one disk is all precaution measure - just in case I blew things up then I still have an offline disk
4. Power back up
5. Filesystems->RAID->Stop array
6. Insert back second disk and mount it as another fs
Also do I need to "comonnet Operations->clear" against second disk before all above steps?
Box is running on 0.1RC2 on top of stock firmware 1.09
As always, thank you for this fine art of work and your time on this forum.
John
On Sunday, April 22, 2012 3:42:27 PM UTC+1, strongline wrote:Hi Joao,
I currently have RAID1 on 2 disks, I plan to break RAID and use it as 2 seperate disks. Does below steps look OK to you? The goal is to have the data completely safe (they are family photos :-))
On Sunday, April 22, 2012 6:18:52 PM UTC+1, Joao Cardoso wrote:
On Sunday, April 22, 2012 3:42:27 PM UTC+1, strongline wrote:Hi Joao,
I currently have RAID1 on 2 disks, I plan to break RAID and use it as 2 seperate disks. Does below steps look OK to you? The goal is to have the data completely safe (they are family photos :-))I've been wondering about your problem, and I might have found a solution without the need to flash Alt-F.
On Sunday, April 22, 2012 6:18:52 PM UTC+1, Joao Cardoso wrote:
On Sunday, April 22, 2012 3:42:27 PM UTC+1, strongline wrote:Hi Joao,
I currently have RAID1 on 2 disks, I plan to break RAID and use it as 2 seperate disks. Does below steps look OK to you? The goal is to have the data completely safe (they are family photos :-))I've been wondering about your problem, and I might have found a solution without the need to flash Alt-F.There are two main questions to answer. Will the D-Link firmware:1-try to automatically rebuild the degraded RAID if it finds a "free" and available disk
2-execute the fun_plug script if the RAID is degraded?
-To solve the first question, you have to boot into D-Link and, perhaps in the RAID advanced section, disable automatic RAID rebuild.I don't know if your version of the D-Link firmware has this option, but I remembered seeing it in one of the last versions I evaluated.-To have the response to the second question, you have to power the box down, remove one disk, reboot the box and see if Alt-F boots.To be absolutely sure, you should repeat the procedure twice, once for each disk (as the firmware might behave differently in the absence of the right or left disk.After doing the above, insert the two disks and boot int Alt-F. You will have to do the entire procedure without rebooting the box.1-RAID->fail one component (sda2, e.g.)2-RAID->remove failed component (sda2 will appear in red)
3-RAID->clear the removed component
4-Filesystem->Mount sda2
I have done this just now, without even stopping the array and I now have the data duplicated on both mount points:(I failed/removed/cleared sdb2, not sda2)
........
The beauty of the thing is that now the "alt-f" directory and the fun_plug file (and permissions) exists at both disks, so it does not matters if the D-Link firmware looks for and executes the fun_plug file at either the "standard" or the degraded RAID disk. You only have to take care to not remove them.Of course the RAID is now degraded, but it will continue working.After being sure that you data if fine in the "standard" (sda2 in the example) disk, and survive reboots, you can even RAID->clean (or Destroy) the degraded RAID component and mount sdb2 as you did with sda2. I did it and now I have sda2 and sdb2 mounted as "standard".Perhaps that is what you intended to do from the very beginning, as the topic says "... break RAID", apologies If I only confused you with my first post, but I'm getting slow as "time goes by" :-)As always, NO WARRANTY (but I did it, without reboots)
>>>> The above steps look promising to me. And yes it's exactly what I looked for: keep first component intact, only bring down 2nd disk then mount it back as a standalone fs.
>>>> By the way, what is the difference between "stop" and "damage" an array? Will either of them damage the data? Not that I need to keep disk#1 as you already pointed out, second disk will have identical content, just want to know what these two operations exactly do.
>>>>>Many Thanks!
...
> > There are two main questions to answer. Will the D-Link firmware:
> > 1-try to automatically rebuild the degraded RAID if it finds a "free"
> > and
> > available disk
> >
> >>>> I have disabled that option in stock firmware long time ago
OK then
> > 2-execute the fun_plug script if the RAID is degraded?
> >
> >>>> Yes it will as I've been running Alt-F in degraded mode for quite
> >>>> a
>
> while now and rebooted it several times. Though it was always done on right
> disk - left disk was never tried. I can test it tomorrow.
Using only a single disk is not going to modify its behaviour, it will work.
The problem is with two disks present. Where does the vendor's firmware will
look for the fun_plug file to execute?
-The first detected (right disk?),
-will it search in the second disk if not found in the first?
-will it assemble RAID as soon as it finds one of its components,
-or will it scan all disks and only then make the RAID available?
-and if during the scan a "standard" disk with a fun_plug is found, will it
use it, or will wait for the RAID?
As you are already running in degraded mode with only one disk, how do you
intend to "break" the RAID? plugging-in the second disk and resync the RAID?
...
> > 1-RAID->fail one component (sda2, e.g.)
> > 2-RAID->remove failed component (sda2 will appear in red)
> >
> >>>>> I believe you refered to "component->remove" here rather than
> physical remove based on step 3
Yes, no physical disk removal needed (or advised until all is finish)
"Component Operations"->Operation->Remove
> > 3-RAID->clear the removed component
> >
> >>>>> Interesting....so we can clear a component after it is removed?
"Remove" again means software, not physical removal.
And yes, in the "Component Operations", "Partition", all partitions with type
RAID or with RAID information on them will appear; this is done that way such
that you can add a new component (a spare, e.g., or a replacement for a failed
component) to the array.
> > 4-Filesystem->Mount sda2
...
> > >>>> The above steps look promising to me. And yes it's exactly
> > >>>> what I
> > looked for: keep first component intact, only bring down 2nd disk then
> > mount it back as a standalone fs.
> >
> > >>>> By the way, what is the difference between "stop" and "damage"
> > >>>> an array?
What is the "Damage" context? I don't remember talking about it or seeing such
an option in the RAID web page. Ah, you mean "RAID Operations", "Destroy"?
"Stop" the array will unmount its filesystem (its data will not be available)
and make the device disappears -- no "md0". To reverse, just "Start" it.
"Destroy" the array stops is first and then "clears" the RAID information on
its components. To reverse you have to "Create" the array from the beginning
using the same components -- I have done that with the breaked array from my
previous post, and now I have "md0" again with all its data intact (after a 20
minutes resync -- that's the advantage of having small disks for development)
> > Will either of them damage the data?
No. Of course it depends on what you do with the partitions/filesystems
aftwerwards.
The confirmation dialog of "Clear" and "Destroy" says that all data will be
lost. That is for the fainted-heart users :-)
In the "Disk Partitioner" I don't say that data will be lost, I say that it
will be inacessible -- the data is still there, the problem is how to access
it. The same happens in the RAID web page, it only manipulates RAID data, not
the filesystem (your) data.
Of course I know what Alt-F scripts do, but I make no idea what will D-Link
scripts do. That's the danger of running Alt-F "on top" of D-Link.
> > Not that I need to keep
> > disk#1
I don't know what disk disk#1 is.
I read from left to right, so #1 for me is the left disk; but for the kernel
disk#1 is the first disk it finds, and it uses to find the right disk first.
I remember that once a USB disk was found before the left disk, so it was
called "sdb", and the left disk was called "sdc".
That's why in the Status page I refer to left and right bay :-)
> > as you already pointed out, second disk will have identical
> > content,
Yes, but as you are running in degraded mode that is not true anymore. Only
after a lenghtly resync its contents will be identical. That's why I asked you
in the begining what do you intend to do in this respect.
Joao
Using only a single disk is not going to modify its behaviour, it will work.
The problem is with two disks present. Where does the vendor's firmware will
look for the fun_plug file to execute?
-The first detected (right disk?),
-will it search in the second disk if not found in the first?
-will it assemble RAID as soon as it finds one of its components,
-or will it scan all disks and only then make the RAID available?
-and if during the scan a "standard" disk with a fun_plug is found, will it
use it, or will wait for the RAID?
[John] This is the key question. I've thought that a RAID1 on one disk (degraded mode) can still be "broken". Is this not true? For RAID 1, why do we need two disks presented to break it if it can run in degraded mode on one disk? A degraded RAID 1 becomes a soft/logical concept that we should be able to "soft break" it.
And yes, in the "Component Operations", "Partition", all partitions with type
RAID or with RAID information on them will appear; this is done that way such
that you can add a new component (a spare, e.g., or a replacement for a failed
component) to the array.
> > 4-Filesystem->Mount sda2What is the "Damage" context? I don't remember talking about it or seeing such
an option in the RAID web page. Ah, you mean "RAID Operations", "Destroy"?
"Stop" the array will unmount its filesystem (its data will not be available)
and make the device disappears -- no "md0". To reverse, just "Start" it.
"Destroy" the array stops is first and then "clears" the RAID information on
its components. To reverse you have to "Create" the array from the beginning
using the same components -- I have done that with the breaked array from my
previous post, and now I have "md0" again with all its data intact (after a 20
minutes resync -- that's the advantage of having small disks for development)
> > Will either of them damage the data?
No. Of course it depends on what you do with the partitions/filesystems
aftwerwards.
The confirmation dialog of "Clear" and "Destroy" says that all data will be
lost. That is for the fainted-heart users :-)
In the "Disk Partitioner" I don't say that data will be lost, I say that it
will be inacessible -- the data is still there, the problem is how to access
it. The same happens in the RAID web page, it only manipulates RAID data, not
the filesystem (your) data.
Of course I know what Alt-F scripts do, but I make no idea what will D-Link
scripts do. That's the danger of running Alt-F "on top" of D-Link.
> > Not that I need to keep
> > disk#1
I don't know what disk disk#1 is.
I read from left to right, so #1 for me is the left disk; but for the kernel
disk#1 is the first disk it finds, and it uses to find the right disk first.
I remember that once a USB disk was found before the left disk, so it was
called "sdb", and the left disk was called "sdc".
That's why in the Status page I refer to left and right bay :-)
> > as you already pointed out, second disk will have identical
> > content,
Yes, but as you are running in degraded mode that is not true anymore. Only
after a lenghtly resync its contents will be identical. That's why I asked you
in the begining what do you intend to do in this respect.
Good it worked!
I had some comments, that I add for future reference:
step -1: stop all services first! You don't want disk access, either locally
or through the network, during the procedure.
...
> 5. shutdown, physically remove left disk (now we have an offline backup).
...
I would now test if the box boots from the backup before destroying the RAID
in step 7, i.e., I would remove the degraded RAID disk instead.
This will also test if the D-Link firmware works fine with a new "standard"
disk that it never used/saw before.
And if it does not you still have your RAID in degraded mode, as you have now.
> A few questions along the way:
> 1. after reboot I can browse folders in telnet/web GUI, but share is not
> available from Windows clients. (System error 58 has occurred.The specified
> server cannot
> perform the requested operation)
> 2. Every reboot will add a dupliate entry in Setup/Hosts
You discovered a bug!
Probably the file /etc/resolv.conf also has duplicates?
This is specific to the "run on top" mode.
> (it seems that
> remove this duplicate entry will fix share not available issue, or I
> just didn't wait long enough)
I think that you have not waited enough, a couple of minutes might be
necessary for MSW
> Thanks a lot for your insight and help Joao!
You now owe me a wiki: How to break a RAID1 into two "standard" disks without
loosing your data:-)
On Tuesday 24 April 2012 08:32:48 strongline wrote:
> I just did it as follow and everything worked beautifully! Alt-F's support
> for hot plug/unplug is amazing!
>
> - Component -> Remove Left
> - Component -> Clear Left
> - Left becomes a standard disk/fs and accessible
> - Eject Left
> - Physical remove (hot unpug) left
> - Destroy RAID
> - Right becomes a standard disk/fs and accessible
> - Reboot, still good
> - Plug back in Left, the ALT-F just recognizes it and mount it. Beautiful!Good it worked!
I had some comments, that I add for future reference:
step -1: stop all services first! You don't want disk access, either locally
or through the network, during the procedure.
...
> 5. shutdown, physically remove left disk (now we have an offline backup).
...
I would now test if the box boots from the backup before destroying the RAID
in step 7, i.e., I would remove the degraded RAID disk instead.
This will also test if the D-Link firmware works fine with a new "standard"
disk that it never used/saw before.
And if it does not you still have your RAID in degraded mode, as you have now.
I will test booting from backup disk, but there is no more RAID. It was destroyed on both disks.
> A few questions along the way:
> 1. after reboot I can browse folders in telnet/web GUI, but share is not
> available from Windows clients. (System error 58 has occurred.The specified
> server cannot
> perform the requested operation)
> 2. Every reboot will add a dupliate entry in Setup/HostsYou discovered a bug!
Probably the file /etc/resolv.conf also has duplicates?
This is specific to the "run on top" mode.> (it seems that
> remove this duplicate entry will fix share not available issue, or I
> just didn't wait long enough)I think that you have not waited enough, a couple of minutes might be
necessary for MSW
[That's not it. It's still a mystery. I encountered this problem twice and didn't know what I did to have it fixed! I was just fooling around. This is the third time, and I didn't get it work yet as of now - waited long enough.]
> Thanks a lot for your insight and help Joao!
You now owe me a wiki: How to break a RAID1 into two "standard" disks without
loosing your data:-)
That'd be my honor :-), once everything settle down.
I now find myself don't have enough space to save settings. I will raise a separate thread as that is not related.