[opensuse] raid1, ignore one HD when reading
Hi, I have a raid1 with 2 HDs. Is it possible somehow to let him use only one of them for reading? cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 05 June 2013, Ruediger Meier wrote:
Hi,
I have a raid1 with 2 HDs. Is it possible somehow to let him use only one of them for reading?
Just found it echo writemostly > /sys/devices/virtual/block/md2/md/dev-sda2/state hope this works as expected. cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-06-05 11:39, Ruediger Meier wrote:
Hi,
I have a raid1 with 2 HDs. Is it possible somehow to let him use only one of them for reading?
It should run faster reading from two, because it can read two blocks simultaneously. - -- Cheers / Saludos, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGvHVAACgkQIvFNjefEBxqa5ACfb74Lx5z7oVseENqpzvse2dKd 7oAAoIVStW5tOD1dPBZrbko/lwdS3kJl =OJRZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 05 June 2013, Carlos E. R. wrote:
On 2013-06-05 11:39, Ruediger Meier wrote:
Hi,
I have a raid1 with 2 HDs. Is it possible somehow to let him use only one of them for reading?
It should run faster reading from two, because it can read two blocks simultaneously.
I'd benchmarked it and it's not faster for me. The advantage is that in case of inconsistencies you will get always the same data from one particular mirror. Generally using both could be even slower if you have one fast and one slow HD. Anyway in my case I've noticed raid inconsistencies (without seeing any other problem) and I wanted to make two backups (one per mirror) without taking the raid offline. Now I have such backups and I can diff and infestivate them further. $ md5sum /backup/kvm.0/* 03fb631ab6810e28bc23a4b700b36598 vm02_root_sda 51519c14d5dfed591fa5cd9dd4789b2f vm02_root_sdb 620e31b4bbf852e41413565f834a9a74 vm05_root_sda cd45de09ca60a2c058bb3a6fdc8cf5cc vm05_root_sdb 2592485256d561b2274b9525d63bbcb7 vm06_root_sda 5e5e04cbe82fb1971e8baa54c3485fe2 vm06_root_sdb 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sda 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sdb Without using "writemostly" I always got a non-deterministic random mix of both mirrors. cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ruediger Meier wrote:
I'd benchmarked it and it's not faster for me. The advantage is that in case of inconsistencies you will get always the same data from one particular mirror.
I'd say that's a fairly unusual and worrying case.
Generally using both could be even slower if you have one fast and one slow HD.
Whilst true, I'd say that was also unusual and something to be avoided.
Anyway in my case I've noticed raid inconsistencies (without seeing any other problem) and I wanted to make two backups (one per mirror) without taking the raid offline.
Would it not be simpler just to copy from the underlying block devices?
Now I have such backups and I can diff and infestivate them further. $ md5sum /backup/kvm.0/* 03fb631ab6810e28bc23a4b700b36598 vm02_root_sda 51519c14d5dfed591fa5cd9dd4789b2f vm02_root_sdb 620e31b4bbf852e41413565f834a9a74 vm05_root_sda cd45de09ca60a2c058bb3a6fdc8cf5cc vm05_root_sdb 2592485256d561b2274b9525d63bbcb7 vm06_root_sda 5e5e04cbe82fb1971e8baa54c3485fe2 vm06_root_sdb 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sda 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sdb
There's something seriously wrong there. I wouldn't worry about taking the raid offline, because it looks like there's a major corruption problem so the data on it is extremely suspect! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 05 June 2013, Dave Howorth wrote:
Ruediger Meier wrote:
I'd benchmarked it and it's not faster for me. The advantage is that in case of inconsistencies you will get always the same data from one particular mirror.
I'd say that's a fairly unusual and worrying case.
Yes, but the probability to run into this case really high. That's why some people think that raid is completely useless at all.
Generally using both could be even slower if you have one fast and one slow HD.
Whilst true, I'd say that was also unusual and something to be avoided.
Anyway in my case I've noticed raid inconsistencies (without seeing any other problem) and I wanted to make two backups (one per mirror) without taking the raid offline.
Would it not be simpler just to copy from the underlying block devices?
I guess it would be a pain to get the lvm volumes running from /dev/sda and /dev/sdb instead of /dev/md2. And after doing this the raid mirrors would be even more inconsistent and moreover a pain to restore my current setup. How could it be simpler than this?: echo writemostly > /sys/devices/virtual/block/md2/md/dev-sda2/state dd if=/dev/system/vm06_root of=/tmp/vm06_root_sdb echo -writemostly > /sys/devices/virtual/block/md2/md/dev-sda2/state echo writemostly > /sys/devices/virtual/block/md2/md/dev-sdb2/state dd if=/dev/system/vm06_root of=/tmp/vm06_root_sda
Now I have such backups and I can diff and infestivate them further. $ md5sum /backup/kvm.0/* 03fb631ab6810e28bc23a4b700b36598 vm02_root_sda 51519c14d5dfed591fa5cd9dd4789b2f vm02_root_sdb 620e31b4bbf852e41413565f834a9a74 vm05_root_sda cd45de09ca60a2c058bb3a6fdc8cf5cc vm05_root_sdb 2592485256d561b2274b9525d63bbcb7 vm06_root_sda 5e5e04cbe82fb1971e8baa54c3485fe2 vm06_root_sdb 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sda 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sdb
There's something seriously wrong there. I wouldn't worry about taking the raid offline, because it looks like there's a major corruption problem so the data on it is extremely suspect!
Now I have everything to determine _exactly_ whether it's safe to repair it or not. For now it looks like I have luck. The inconsistencies came from a power failure some weeks ago and I can make it consistent again without serious problems and further downtime. cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, Jun 5, 2013 at 10:22 AM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
Now I have such backups and I can diff and infestivate them further. $ md5sum /backup/kvm.0/* 03fb631ab6810e28bc23a4b700b36598 vm02_root_sda 51519c14d5dfed591fa5cd9dd4789b2f vm02_root_sdb 620e31b4bbf852e41413565f834a9a74 vm05_root_sda cd45de09ca60a2c058bb3a6fdc8cf5cc vm05_root_sdb 2592485256d561b2274b9525d63bbcb7 vm06_root_sda 5e5e04cbe82fb1971e8baa54c3485fe2 vm06_root_sdb 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sda 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sdb
There's something seriously wrong there. I wouldn't worry about taking the raid offline, because it looks like there's a major corruption problem so the data on it is extremely suspect!
Now I have everything to determine _exactly_ whether it's safe to repair it or not. For now it looks like I have luck. The inconsistencies came from a power failure some weeks ago and I can make it consistent again without serious problems and further downtime.
RAID 1 has that problem. 3ware raid cards always degrade the mirror in the event of an uncontrolled shutdown. The first drive of the pair is made the online drive, and the second drive is resync'ed to it. I don't know how mdraid handles it. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 5 Jun 2013 11:31:59 -0400 Greg Freemyer <greg.freemyer@gmail.com> пишет:
On Wed, Jun 5, 2013 at 10:22 AM, Ruediger Meier <sweet_f_a@gmx.de> wrote:
Now I have such backups and I can diff and infestivate them further. $ md5sum /backup/kvm.0/* 03fb631ab6810e28bc23a4b700b36598 vm02_root_sda 51519c14d5dfed591fa5cd9dd4789b2f vm02_root_sdb 620e31b4bbf852e41413565f834a9a74 vm05_root_sda cd45de09ca60a2c058bb3a6fdc8cf5cc vm05_root_sdb 2592485256d561b2274b9525d63bbcb7 vm06_root_sda 5e5e04cbe82fb1971e8baa54c3485fe2 vm06_root_sdb 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sda 53f2dfdff8af2492006a97cbfeb1fc44 vm09_root_sdb
There's something seriously wrong there. I wouldn't worry about taking the raid offline, because it looks like there's a major corruption problem so the data on it is extremely suspect!
Now I have everything to determine _exactly_ whether it's safe to repair it or not. For now it looks like I have luck. The inconsistencies came from a power failure some weeks ago and I can make it consistent again without serious problems and further downtime.
RAID 1 has that problem.
3ware raid cards always degrade the mirror in the event of an uncontrolled shutdown.
The first drive of the pair is made the online drive, and the second drive is resync'ed to it.
I don't know how mdraid handles it.
Should do the same unless you use intent log, in which case it needs to resync only small part. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 05 June 2013, Dave Howorth wrote:
Ruediger Meier wrote:
I'd benchmarked it and it's not faster for me. The advantage is that in case of inconsistencies you will get always the same data from one particular mirror.
I'd say that's a fairly unusual and worrying case.
Generally using both could be even slower if you have one fast and one slow HD.
Whilst true, I'd say that was also unusual and something to be avoided.
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md: "This allows for a RAID1 with WRITE-BEHIND to be used to mirror data over a slow link to a remote computer (providing the link isn't too slow). The extra latency of the remote link will not slow down normal operations, but the remote system will still have a reasonably up-to-date copy of all data." cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O I thought those things used something else than raid... -- Cheers / Saludos, Carlos E. R. (from oS 12.3 "Dartmouth" GM (rescate 1)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O
I thought those things used something else than raid...
Running RAID on top of a SAN (iscsi) device is certainly possible. Almost certainly also on top of DRBD devices. -- Per Jessen, Zürich (19.4°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-06-06 11:38, Per Jessen wrote:
Carlos E. R. wrote:
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O
I thought those things used something else than raid...
Running RAID on top of a SAN (iscsi) device is certainly possible. Almost certainly also on top of DRBD devices.
I meant one element local disk, another over the network. -- Cheers / Saludos, Carlos E. R. (from oS 12.3 "Dartmouth" GM (rescate 1)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thursday 06 June 2013, Carlos E. R. wrote:
On 2013-06-06 11:38, Per Jessen wrote:
Carlos E. R. wrote:
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O
I thought those things used something else than raid...
Running RAID on top of a SAN (iscsi) device is certainly possible. Almost certainly also on top of DRBD devices.
I meant one element local disk, another over the network.
Yep the rich people would use a really fast network for this and the poor people would use write-behind and write-mostly :) cu, Rudi -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-06-06 11:59, Ruediger Meier wrote:
On Thursday 06 June 2013, Carlos E. R. wrote:
I meant one element local disk, another over the network.
Yep the rich people would use a really fast network for this and the poor people would use write-behind and write-mostly :)
X-') -- Cheers / Saludos, Carlos E. R. (from oS 12.3 "Dartmouth" GM (rescate 1)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
On 2013-06-06 11:38, Per Jessen wrote:
Carlos E. R. wrote:
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O
I thought those things used something else than raid...
Running RAID on top of a SAN (iscsi) device is certainly possible. Almost certainly also on top of DRBD devices.
I meant one element local disk, another over the network.
Yes, that is typically how DRBD works. -- Per Jessen, Zürich (20.1°C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Jun 6, 2013 at 5:44 AM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2013-06-06 11:38, Per Jessen wrote:
Carlos E. R. wrote:
On 2013-06-06 10:36, Ruediger Meier wrote:
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
That can be done? :-O
I thought those things used something else than raid...
Running RAID on top of a SAN (iscsi) device is certainly possible. Almost certainly also on top of DRBD devices.
I meant one element local disk, another over the network.
I guess you don't know what iscsi or drbd are. iscsi is a network accessed disk so it would directly allow mdraid to talk to a remote disk for half the mirror. drbd - distributed replicated block device, is kernel subsystem whose only functionality is to provide split mirrors in a more sophisticated way than mdraid over iscsi. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2013-06-06 23:44, Greg Freemyer wrote:
I guess you don't know what iscsi or drbd are. iscsi is a network accessed disk so it would directly allow mdraid to talk to a remote disk for half the mirror. drbd - distributed replicated block device, is kernel subsystem whose only functionality is to provide split mirrors in a more sophisticated way than mdraid over iscsi.
Oh. I have read of this previously, but having never used it personally, it is a thing I forget. It is very interesting to know, but one can not remember everything that is interesting... -- Cheers / Saludos, Carlos E. R. (from oS 12.3 "Dartmouth" GM (rescate 1)) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Ruediger Meier wrote:
On Wednesday 05 June 2013, Dave Howorth wrote:
Ruediger Meier wrote:
I'd benchmarked it and it's not faster for me. The advantage is that in case of inconsistencies you will get always the same data from one particular mirror. I'd say that's a fairly unusual and worrying case.
Generally using both could be even slower if you have one fast and one slow HD.
Whilst true, I'd say that was also unusual and something to be avoided.
BTW it's a valid use case to safely place one of the mirrors far away connected via network or SAN. That's why you can set write-mostly and write-behind, see man md:
"This allows for a RAID1 with WRITE-BEHIND to be used to mirror data over a slow link to a remote computer (providing the link isn't too slow). The extra latency of the remote link will not slow down normal operations, but the remote system will still have a reasonably up-to-date copy of all data."
cu, Rudi
Thanks very much for that explanation, Rudi. I've used md raid for years and never knew that. Come to it, I've never read the md man page before and that is a very useful summary of the concepts! It sounds a useful capability to have a remote mirror using those facilities. What I'm not clear about yet is how that fits in with the stuff on top (i.e. LVM and the filesystems). I'm supposing that the RAID has no idea about consistency of filesystem metadata for example, so whilst the data on the mirror might be fairly recent, I don't see how there can be any expectation that it is consistent? But I expect I need to do some more reading. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Andrey Borzenkov
-
Carlos E. R.
-
Dave Howorth
-
Greg Freemyer
-
Per Jessen
-
Ruediger Meier