Respected Sir,
Sir, I would like to check if my data is
actually being written on the RAID disks of RAID0
array. I tried to check by doing the following
steps...
I mounted my /dev/md1 on /mnt/raid. and then wrote a
file on it. Then I tried to mount the raid disks
/dev/hda10 on some other mount point and checked that
mount point. But there was nothing in that mount
point. Please could you please help me with this.
Sir I tried the same steps with a RAID1 array
and showed the files which I wrote on the md mount
point.
Hoping for your reply.Thanking you in
anticipation.
Regards,
Poonam
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From: Peter T. Breuer <hidden> Date: 2005-01-19 20:19:54
Poonam Dalya [off-list ref] wrote:
I mounted my /dev/md1 on /mnt/raid. and then wrote a
file on it. Then I tried to mount the raid disks
/dev/hda10 on some other mount point and checked that
mount point. But there was nothing in that mount
point. Please could you please help me with this.
Don't do that then. Do you have any reason to suppose that buffers were
already written to the top level system yet, or that mounting the same
device twice will caus eanything but pain and confusion and much
wailing and gnashing of teeth?
Sir I tried the same steps with a RAID1 array
Don't.
Hoping for your reply.Thanking you in
Try a test that has actually got some sense to it and will not destroy
your data! Such as faulting one device out of the raid. Then you have
to be reading from the other one, no?
Peter
You need to go to RAID school! :)
No problem, so did everyone else at one time.
RAID0 does not create a backup copy of your data. It just uses 2 or more
disks, giving you 2 or more times the space of a single disk. If any 1 disk
were to fail in a RAID0 array, your data would be virtually gone. RAID0
tends to also improve read and write performance.
RAID1 makes copies of your data on each disk. Normally 2 disks are used,
both would have a full copy of your data. The usable space would be the
same as a single disk regardless of the number of disks used. But each
would have a full copy. RAID1 tends to also improve read performance in a
multi tasking environment. But write performance stays about the same,
unless you have a data bottleneck somewhere.
With RAID0, mounting a single disk is useless. Don't waste your time.
With RAID1, you should not attempt to mount a disk directly, unless you are
recovering from an abnormal failure. Doing so could cause your array to be
out of sync, and md would not know it has occurred. A normal failure would
allow you to have normal access to your data, just using 1 less disk,
without user intervention.
I hope this helps!
Guy
-----Original Message-----
From: linux-raid-owner@vger.kernel.org
[mailto:linux-raid-owner@vger.kernel.org] On Behalf Of Poonam Dalya
Sent: Wednesday, January 19, 2005 2:52 PM
To: linux-raid@vger.kernel.org
Subject: Checking if RAID does work?
Respected Sir,
Sir, I would like to check if my data is
actually being written on the RAID disks of RAID0
array. I tried to check by doing the following
steps...
I mounted my /dev/md1 on /mnt/raid. and then wrote a
file on it. Then I tried to mount the raid disks
/dev/hda10 on some other mount point and checked that
mount point. But there was nothing in that mount
point. Please could you please help me with this.
Sir I tried the same steps with a RAID1 array
and showed the files which I wrote on the md mount
point.
Hoping for your reply.Thanking you in
anticipation.
Regards,
Poonam
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday 19 January 2005 21:19, Peter T. Breuer wrote:
Poonam Dalya [off-list ref] wrote:
quoted
I mounted my /dev/md1 on /mnt/raid. and then wrote a
file on it. Then I tried to mount the raid disks
/dev/hda10 on some other mount point and checked that
mount point. But there was nothing in that mount
point. Please could you please help me with this.
You did not forget to format / mkfs it I suppose ?
Don't do that then. Do you have any reason to suppose that buffers were
already written to the top level system yet, or that mounting the same
device twice will caus eanything but pain and confusion and much
wailing and gnashing of teeth?
Sigh.
quoted
Sir I tried the same steps with a RAID1 array
Don't.
Peter, peter peter. You start again with nonsense and misinformation ?
Of course a disk from a raid-1 volume when mounted alone should have all the
files accessible that the array has. If it doesn't, the system is broken.
Simple as that.
To the OP: Yes, every part of a raid-1 array (but only a raid-1 array) will /
should be mountable and have the same filesystem as the array has.
HOWEVER you should never ever mount the array AT THE SAME TIME as one of its
underlying devices! Always umount first, and only then mount the other.
Maarten
--
To the OP: Yes, every part of a raid-1 array (but only a raid-1
array) will / should be mountable and have the same filesystem as
the array has. HOWEVER you should never ever mount the array AT THE
SAME TIME as one of its underlying devices! Always umount first,
and only then mount the other.
Furthermore, never ever mount a raid-1 component alone in read-write
mode. Modifying the mirrors individually will almost certainly result
in breakage when the array is activated again.
--
Måns Rullgård
mru@inprovide.com
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Peter T. Breuer <hidden> Date: 2005-01-19 21:24:59
maarten [off-list ref] wrote:
On Wednesday 19 January 2005 21:19, Peter T. Breuer wrote:
quoted
Poonam Dalya [off-list ref] wrote:
quoted
I mounted my /dev/md1 on /mnt/raid. and then wrote a
file on it. Then I tried to mount the raid disks
/dev/hda10 on some other mount point and checked that
mount point. But there was nothing in that mount
point. Please could you please help me with this.
You did not forget to format / mkfs it I suppose ?
quoted
Don't do that then. Do you have any reason to suppose that buffers were
already written to the top level system yet, or that mounting the same
device twice will caus eanything but pain and confusion and much
wailing and gnashing of teeth?
Sigh.
You don't understand - he mounted the raw partitions that make up the
raid array WHILE THE RAID WAS RUNNING somewhere else.
If the mount had failed he would have said. Therefore it did not fail.
If he had unmounted the raid array first, then the umount would have
flushed buffers to that device (the kernel sends flush_buffers or
whatever it is called nowadays) and the file would have been visible
when he did the later mount.
It was not, therefore he did not.
Peter
On Wednesday 19 January 2005 22:24, Peter T. Breuer wrote:
maarten [off-list ref] wrote:
quoted
On Wednesday 19 January 2005 21:19, Peter T. Breuer wrote:
quoted
Poonam Dalya [off-list ref] wrote:
quoted
Sigh.
You don't understand - he mounted the raw partitions that make up the
raid array WHILE THE RAID WAS RUNNING somewhere else.
In that case, okay.
If the mount had failed he would have said. Therefore it did not fail.
If he had unmounted the raid array first, then the umount would have
flushed buffers to that device (the kernel sends flush_buffers or
whatever it is called nowadays) and the file would have been visible
when he did the later mount.
I tried to reproduce it, and it is even more serious than that, upon first
glance. So you're right. Witness below:
dozer:~ # df
/dev/md0 1953344 1758636 194708 91% /
dozer:~ # cat /proc/mdstat
md0 : active raid1 hde1[1]
1953408 blocks [3/1] [_U_]
dozer:~ # mount -o ro /dev/hde1 /mnt/
dozer:~ # df
/dev/md0 1953344 1758640 194704 91% /
/dev/hde1 1953344 1758636 194708 91% /mnt
dozer:~ # touch /foobar
dozer:~ # ls -l /mnt/foobar
/bin/ls: /mnt/foobar: No such file or directory
dozer:~ # sync
dozer:~ # ls -l /mnt/foobar
/bin/ls: /mnt/foobar: No such file or directory
dozer:~ # umount /mnt/
dozer:~ # mount -o ro /dev/hde1 /mnt/
dozer:~ # ls -l /mnt/foobar
/bin/ls: /mnt/foobar: No such file or directory
dozer:~ # ls -l /foobar
-rw-r--r-- 1 root root 0 Jan 19 22:33 /foobar
Strange, eh ? (obviously I can't umount /dev/md0 to see...)
Maarten
--
On Wednesday 19 January 2005 22:22, Måns Rullgård wrote:
maarten [off-list ref] writes:
quoted
To the OP: Yes, every part of a raid-1 array (but only a raid-1
array) will / should be mountable and have the same filesystem as
the array has. HOWEVER you should never ever mount the array AT THE
SAME TIME as one of its underlying devices! Always umount first,
and only then mount the other.
Furthermore, never ever mount a raid-1 component alone in read-write
mode. Modifying the mirrors individually will almost certainly result
in breakage when the array is activated again.
Speaking from personal experience, I _think_ that modifying a drive that's
part of an array gets noticed by md (somehow). At least it always lead to a
mirror breakage with me, and thus a re-add and a resync was in order.
I'm not sure if it really does that, and neither how it is done, but I'm led
to believe it does get noticed. Maybe md (or the kernel?) writes a marker
just before deactivation which signifies "drive was shutdown @..." ?
OTOH, I've also seen that I just modified /etc/fstab on hda1 to reflect that
not /de/hda1 was root, but /dev/md0 instead, only to find that after a
reboot /dev/md0 is _indeed_ now mounted as root, but that those recent
changes in /fstab are gone. So... maybe I'm just losing my head. (-:
Maarten
--
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday 19 January 2005 22:22, Måns Rullgård wrote:
quoted
maarten [off-list ref] writes:
quoted
To the OP: Yes, every part of a raid-1 array (but only a raid-1
array) will / should be mountable and have the same filesystem as
the array has. HOWEVER you should never ever mount the array AT THE
SAME TIME as one of its underlying devices! Always umount first,
and only then mount the other.
Furthermore, never ever mount a raid-1 component alone in read-write
mode. Modifying the mirrors individually will almost certainly result
in breakage when the array is activated again.
Speaking from personal experience, I _think_ that modifying a drive that's
part of an array gets noticed by md (somehow). At least it always lead to a
mirror breakage with me, and thus a re-add and a resync was in order.
I'm not sure if it really does that, and neither how it is done, but I'm led
to believe it does get noticed. Maybe md (or the kernel?) writes a marker
just before deactivation which signifies "drive was shutdown @..." ?
If the array is stopped, and then the disks tampered with, there is no
way md is noticing it. It's possible, however, that md will notice if
a disk is accessed directly while the array is active.
--
Måns Rullgård
mru@inprovide.com
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html