Re: Vinum + new disk for mirror

2004-04-07 Thread Rob Ellis
Just a follow up on my recent vinum disk replacement question...
I have a two disk mirror and one of the disks died; I'd asked if
I could use dd to copy the good disk to a replacement disk and
was being persistent about whether that would work or not. %-)
I didn't do that (dd).

Instead I followed Greg Lehey's advice and the instructions here:

  http://www.vinumvm.org/vinum/replacing-drive.html

and it all went fine. There's a note on that page about a
"a bug [that] will cause the state to be incorrect", but
I didn't run into it. My steps were:

  - install the new disk
  - fdisk it with /stand/sysinstall
  - edit the partition table with disklabel to match the 
partitions on the good disk
  - create a config file -- vinum.newdisk:
   drive vinumdisk2 device /dev/ad2s1d
  - run 'vinum create vinum.newdisk'
  - then 'vinum start data.p1.s0' # etc...

Worked great.

- Rob
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Vinum + new disk for mirror

2004-04-06 Thread Rob Ellis
On Tue, Apr 06, 2004 at 09:40:09AM +0930, Greg 'groggy' Lehey wrote:
> On Monday,  5 April 2004 at 19:09:46 -0400, Rob Ellis wrote:
> > On Tue, Apr 06, 2004 at 08:12:49AM +0930, Greg 'groggy' Lehey wrote:
> >> On Monday,  5 April 2004 at 12:42:12 -0400, Rob Ellis wrote:
> >>> We have a machine with a vinum mirror, all the partitions except
> >>> the root partition mirrored between two disks. The second
> >>> disk has died and I want to replace it. I can't find a disk exactly
> >>> the same, so I have a disk that's bigger (80GB, old one was 60GB).
> >>
> >> That's not a problem.  Vinum doesn't use disks.
> >>
> >>> Can I...
> >>>
> >>>- shutdown, replace the bad disk with the bigger new disk
> >>>- boot single user, mount /
> >>>- copy the good disk to the new disk with:
> >>>   dd bs=128k if=/dev/ad0 of=/dev/ad2
> >>>- vinum start
> >>>- restart any stale subdisks (?)
> >>>- ...
> >>
> >> You can, though you'll need a couple more steps.  But why don't you
> >> follow the instructions?
> >> http://www.vinumvm.org/vinum/replacing-drive.html or
> >> http://www.vinumvm.org/cfbsd/vinum.pdf.
> >
> > Oops.
> >
> > I guess what I was wondering about / wanted to be clear about is
> > whether the 'dd' of /dev/ad0 to /dev/ad2 is ok between disks that
> > aren't the same. I was hoping that it would copy the partition table
> > and boot blocks (I don't care about the extra space at the end of
> > the bigger disk)...
> 
> You should do.
> 
> > I was also hoping (blindly) that the vinum config would get copied
> > and that the dd of the data would speed up the rebuilding of the
> > mirror...
> 
> The Vinum config would, indeed, get copied.  But that's not the way to
> do it.
> 
> > But it sounds like what I should do is manually configure the
> > partition table on the new disk to match the old one and then follow
> > the instructions? :-)
> 
> No, make the partition table to cover the entire disk.  Why throw away
> space?

To make it simpler? Because I don't need the space?

I've got 8 partitions on the existing disk -- 5 filesystems, 1 swap,
1 vinum which overlaps 4 of the filesystems, and 'c' -- which I think 
is the limit for partitions? (4.9).

I suppose I could make the un-mirrored root partition on the new disk
much larger, but I don't want to do that... or I guess I could put a 
filesystem on a refigured 'c' on the new disk... but I don't really
want to do that either. Anyway, I could do it later by editing the 
copied partition table if it turns out I do need the space...?

I probably will do it the recommended way :-)
but I'm just curious now if dd would work. It does seem simpler,
and I won't have to try to edit a partition table with overlapping
partitions with 'disklabel'. And maybe the copied vinum config 
will just work...?

Thanks Greg.

- Rob
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Vinum + new disk for mirror

2004-04-05 Thread Greg 'groggy' Lehey
On Monday,  5 April 2004 at 19:09:46 -0400, Rob Ellis wrote:
> On Tue, Apr 06, 2004 at 08:12:49AM +0930, Greg 'groggy' Lehey wrote:
>> On Monday,  5 April 2004 at 12:42:12 -0400, Rob Ellis wrote:
>>> We have a machine with a vinum mirror, all the partitions except
>>> the root partition mirrored between two disks. The second
>>> disk has died and I want to replace it. I can't find a disk exactly
>>> the same, so I have a disk that's bigger (80GB, old one was 60GB).
>>
>> That's not a problem.  Vinum doesn't use disks.
>>
>>> Can I...
>>>
>>>- shutdown, replace the bad disk with the bigger new disk
>>>- boot single user, mount /
>>>- copy the good disk to the new disk with:
>>>   dd bs=128k if=/dev/ad0 of=/dev/ad2
>>>- vinum start
>>>- restart any stale subdisks (?)
>>>- ...
>>
>> You can, though you'll need a couple more steps.  But why don't you
>> follow the instructions?
>> http://www.vinumvm.org/vinum/replacing-drive.html or
>> http://www.vinumvm.org/cfbsd/vinum.pdf.
>
> Oops.
>
> I guess what I was wondering about / wanted to be clear about is
> whether the 'dd' of /dev/ad0 to /dev/ad2 is ok between disks that
> aren't the same. I was hoping that it would copy the partition table
> and boot blocks (I don't care about the extra space at the end of
> the bigger disk)...

You should do.

> I was also hoping (blindly) that the vinum config would get copied
> and that the dd of the data would speed up the rebuilding of the
> mirror...

The Vinum config would, indeed, get copied.  But that's not the way to
do it.

> But it sounds like what I should do is manually configure the
> partition table on the new disk to match the old one and then follow
> the instructions? :-)

No, make the partition table to cover the entire disk.  Why throw away
space?

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
Note: I discard all HTML mail unseen.
Finger [EMAIL PROTECTED] for PGP public key.
See complete headers for address and phone numbers.


pgp0.pgp
Description: PGP signature


Re: Vinum + new disk for mirror

2004-04-05 Thread Rob Ellis
On Tue, Apr 06, 2004 at 08:12:49AM +0930, Greg 'groggy' Lehey wrote:
> On Monday,  5 April 2004 at 12:42:12 -0400, Rob Ellis wrote:
> > We have a machine with a vinum mirror, all the partitions except
> > the root partition mirrored between two disks. The second
> > disk has died and I want to replace it. I can't find a disk exactly
> > the same, so I have a disk that's bigger (80GB, old one was 60GB).
> 
> That's not a problem.  Vinum doesn't use disks.
> 
> > Can I...
> >
> >- shutdown, replace the bad disk with the bigger new disk
> >- boot single user, mount /
> >- copy the good disk to the new disk with:
> >   dd bs=128k if=/dev/ad0 of=/dev/ad2
> >- vinum start
> >- restart any stale subdisks (?)
> >- ...
> 
> You can, though you'll need a couple more steps.  But why don't you
> follow the instructions?
> http://www.vinumvm.org/vinum/replacing-drive.html or
> http://www.vinumvm.org/cfbsd/vinum.pdf.

Oops.

I guess what I was wondering about / wanted to be clear about is
whether the 'dd' of /dev/ad0 to /dev/ad2 is ok between disks that
aren't the same. I was hoping that it would copy the partition table
and boot blocks (I don't care about the extra space at the end of
the bigger disk)...

I was also hoping (blindly) that the vinum config would get copied
and that the dd of the data would speed up the rebuilding of the 
mirror...

But it sounds like what I should do is manually configure the
partition table on the new disk to match the old one and then
follow the instructions? :-)

Thanks.

- Rob
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Vinum + new disk for mirror

2004-04-05 Thread Greg 'groggy' Lehey
On Monday,  5 April 2004 at 12:42:12 -0400, Rob Ellis wrote:
> We have a machine with a vinum mirror, all the partitions except
> the root partition mirrored between two disks. The second
> disk has died and I want to replace it. I can't find a disk exactly
> the same, so I have a disk that's bigger (80GB, old one was 60GB).

That's not a problem.  Vinum doesn't use disks.

> Can I...
>
>- shutdown, replace the bad disk with the bigger new disk
>- boot single user, mount /
>- copy the good disk to the new disk with:
>   dd bs=128k if=/dev/ad0 of=/dev/ad2
>- vinum start
>- restart any stale subdisks (?)
>- ...

You can, though you'll need a couple more steps.  But why don't you
follow the instructions?
http://www.vinumvm.org/vinum/replacing-drive.html or
http://www.vinumvm.org/cfbsd/vinum.pdf.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
Note: I discard all HTML mail unseen.
Finger [EMAIL PROTECTED] for PGP public key.
See complete headers for address and phone numbers.


pgp0.pgp
Description: PGP signature


Vinum + new disk for mirror

2004-04-05 Thread Rob Ellis
We have a machine with a vinum mirror, all the partitions except
the root partition mirrored between two disks. The second
disk has died and I want to replace it. I can't find a disk exactly
the same, so I have a disk that's bigger (80GB, old one was 60GB).

Can I...

   - shutdown, replace the bad disk with the bigger new disk
   - boot single user, mount /
   - copy the good disk to the new disk with:
  dd bs=128k if=/dev/ad0 of=/dev/ad2
   - vinum start
   - restart any stale subdisks (?)
   - ...

?

Thanks.

- Rob
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"