pavement

Talk:RAID1, Software, How to setup

From FreeBSDwiki
Jump to: navigation, search

good article....might wanna drop it in the FBSD for Servers section too

--Dave 20:27, 23 Jul 2005 (EDT)



we have one of those? --Jimbo 00:21, 24 Jul 2005 (EDT)



we do now --Dave 01:53, 24 Jul 2005 (EDT)

Contents

also,

shouldn't the sed line be "sed s/ad0/mirror\/gm0/g /mnt/etc/fstab > /mnt/etc/fstab.new" instead? (i'd also recommend doing a diff between the fstabs before just switching them, but if you're doing software raid, i guess it can be assumed that you're smart enough to do it or accept the risks)

Now we need to fix fstab to refer to the mirror, not to /dev/ad0 itself. You can either manually edit it using ee or vi and change 
all references to /dev/ad0? to /dev/mirror/gm0? - ie /dev/ad0s1b becomes /dev/mirror/gm0s1b - or you can use a sed command to do it 
for you:

# sed "s%ad0%mirror/gm0%" /mnt/etc/fstab > /mnt/etc/fstab.new
# mv /mnt/etc/fstab /mnt/etc/fstab.old
# mv /mnt/etc/fstab.new /mnt/etc/fstab

why?

Why SHOULD the sed command be that instead of the other? --Jimbo 10:23, 1 Oct 2005 (EDT)

for the global change isntead of just "first change"

because the sed command i gave makes the changes globally, and the other doesn't? I want to say the syntax is wrong but am too lazy to ssh into my freebsd box to verify. the doublequotes make the / and \/ be equivalent but what's the piont of the %'s?--Dave 14:53, 1 Oct 2005 (EDT)

ok, my brain fart moment is over

so you're using the % as a delimiter instead of escaping the /'s with \ and since there will (usually) only be one /dev/ entry for each line, the /g isn't strictly necessary. Adding this comment for anyone else who runs across this entry and has my same stupid question. --Dave 10:16, 3 Oct 2005 (EDT)

question

if the bsd disk (original) partitions coexist with other partition types, the 2nd identical disk should have an identical partition scheme, or the entire disk must be dedicated as well as the first ? or less likely, a new entire geom disk will just mirror the first BSD partitions, or the entire drive as if ghosting it ??

as far as I know...

As far as I know, you can use GEOM to mirror partitions in other filesystems, because GEOM operates at block-level mode. So yes, it would basically be like ghosting the foreign partitions onto another drive. However, if you're talking about a system that dual-boots, it's a bad idea, because GEOM won't be running while you're booted into the other system, so you'll be regenerating the array every time you boot into BSD - and when you do, GEOM will probably think that the changes that your other operating system made are "errors" and restore everything back to the way it was!

With that said, it IS possible to simply mirror partitions rather than entire drives, but the process looks a little different and a little more complicated than the situation in this article. man gvinum for details. --Jimbo 10:25, 27 October 2006 (EDT)

4

torebki torebki david jones torebki damskie <a href="http://torebki4you.com">torebki david jones </a> torebki damskie torebki david jones torebki torebki david jones <a href=http://torebki4you.com>torebki david jones </a>

Personal tools