Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Feb 2001 12:34:59 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Randy Primeaux <randy@Cloudfactory.ORG>
Cc:        Tony Landells <ahl@austclear.com.au>, freebsd-questions@FreeBSD.ORG
Subject:   Re: installing onto vinum
Message-ID:  <20010202123459.E82163@wantadilla.lemis.com>
In-Reply-To: <200102020228.SAA04507@relay.ultimanet.com>; from randy@Cloudfactory.ORG on Thu, Feb 01, 2001 at 05:44:04PM -0800
References:  <ahl@austclear.com.au> <200102020228.SAA04507@relay.ultimanet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday,  1 February 2001 at 17:44:04 -0800, Randy Primeaux wrote:
> Tony,
>    It will be several hours before I can resume testing.  In the
> meantime, I have a question.
>
> Per `man 8 vinum`:
>      vinum uses the first 265 sectors on each partition for configuration in-
>      formation, so the maximum size of a subdisk is 265 sectors smaller than
>      the drive.
>
> My new interpretation is that I should reserve 265 sectors per subdisk
> for configuration information.

That is a misinterpretation.  A partition corresponds to a drive, not
a subdisk.

> Following method one, where each subdisk overlays a partition, I
> might choose to layout /var, /usr, and /home initially 265s larger,
> then shrink each of them.

You can't shrink a file system.  Follow the instructions.

> Part of my confusion stems from the fact that Greg's example
> provided for two subdisks, and I chose to test with three.

That doesn't make any difference.

> Greg's example:
>>
>> 6.  Carefully calculate the offsets and the lengths of the file
>>     systems.  Create a Vinum configuration file something like this:
>>
>>     drive root dev /dev/ad0s1d

Oops, that's where this 'dev' comes from, is it?  Sorry.  As we've
seen, it should be 'device'.

>>     volume usr
>>      plex org concat
>>       sd length 256m
>>     volume home
>>      plex org concat
>>       sd length 8g driveoffset 524553s
>>
>>     The lengths and offsets need to be exact, of course.  The best way
>>     to get offset and length is from the last 8 lines of disklabel
>>     ouput.
>
> My first interpretation for three subdisks:
>>
>> drive root dev /dev/ad4s1d
>>  volume var
>>   plex org concat
>>    sd length 256m driveoffset 265s
>>  volume usr
>>   plex org concat
>>    sd length 4g driveoffset 1048841s

Where did you get this offset from?  It should be 265s + 256m.  256m
is 524288s, so it should be 524553, as shown above.  As Tony and I
both pointed out, though, it's best to go from the offsets and lengths
in the disklabel output.

>>  volume home
>>   plex org concat
>>    sd length 79574302s driveoffset 8913161s

This offset is correct, but since you've put usr.p0.s0 in the wrong
place, it would overlap, and you won't be able to allocate it.

> So on to my query.  Using this example, should my second vinum subdisk
> actually be 8388608s - 265s = 8388343s, where the original 4.2BSD
> partition was 8388608s, thereby reserving 265s per each subdisk?

No.

> If not, then why?

Because you can't shrink a file system.  Your file systems must be
exactly the same size and same place.  You shrink swap instead.

> Tony Landells writes:
>>> I start out with the following disklabel:
>>>
>>> 8 partitions:
>>> #        size   offset    fstype   [fsize bsize bps/cpg]
>>>   a:   524288        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 32*)
>>>   b:  1048841   524288      swap                        # (Cyl.   32*- 97*)
>>>   c: 90060327        0    unused        0     0         # (Cyl.    0 - 5605*)
>>>   e:   524288  1573129    4.2BSD     1024  8192    16   # (Cyl.   97*- 130*)
>>>   f:  8388608  2097417    4.2BSD     1024  8192    16   # (Cyl.  130*- 652*)
>>>   g: 79574302 10486025    4.2BSD     1024  8192    16   # (Cyl.  652*- 5605*)
>>>
>>>
>>> This is a test layout, in which I want / and swap to be static, and
>>> /var, /usr, /home to be on vinum, to be mirrored on ad5 when I am
>>> done.
>>>
>>> My intended layout is as such:
>>> ad4s1a /          256M
>>> ad4s1b swap   1048841
>>> ad4s1e /var       256M
>>> ad4s1f /usr         4G
>>> ad4s1g /home 79574302
>>
>> Well, this is actually the way you allocated it originally (you haven't
>> taken the vinum space out of swap here), but I know what you meant.  (I
>> only mention it for others following the example.)
>
> Yes, this example would be clearer if I showed this "Before" table,
> and an "After" table.

Yes, a good idea.

>>> I booted a release CD, then operated the fixit floppy so I had vi
>>> available without mounting /usr.  I then changed the disklabel as follows.
>>
>> A safe way to go, though I found that you can do pretty much everything
>> in single user mode after executing "mount -a".  Really.
>
> Ok, Tony, I'll try that.

No, don't, as I said in my message.

> I feared hitting this error again, based upon a mis-interpretation
> on my part: disklabel: ioctl DIOCWDINFO: open partition would move
> or shrink

Yes, you would.

> As an aside, I had commented out partitions e, f, and g on my first
> attempt.  On my second attempt I left them intact, and added d:.

That's the correct way to do it.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply.
For more information, see http://www.lemis.com/questions.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010202123459.E82163>