pavement

Talk:RAID1, Software, How to setup

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (why?)
Line 27: Line 27:
  
 
Why SHOULD the sed command be that instead of the other?  --[[User:Jimbo|Jimbo]] 10:23, 1 Oct 2005 (EDT)
 
Why SHOULD the sed command be that instead of the other?  --[[User:Jimbo|Jimbo]] 10:23, 1 Oct 2005 (EDT)
 +
 +
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?

Revision as of 14:53, 1 October 2005

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)

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)

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?

Personal tools