🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Karsten Thygesen Wed, 07 Mar 2001 13:37
CNFS on partitions
#51047
Author: Karsten Thygesen
Date: Wed, 07 Mar 2001 13:37
40 lines
2529 bytes
Hi

I'm configuring INN-2.3.1 on a Solaris-2.8 box in 64bit-kernel mode.

I would like to use rwa partitions for CNFS buffes, and have entries
like:

cycbuff:3332:/pack/inn/spool/cycbuf/3332:2077000
cycbuff:3432:/pack/inn/spool/cycbuf/3432:2077000

3332 is the name of a node:

brw-rw-r--   1 news     news     118,146 Mar  7 14:26 /pack/inn/spool/cycbuf/3332

which corresonds to:

brw-r-----   1 root     sys      118,146 Oct 16 12:06 /dev/dsk/c3t3d3s2

I intend to use the entire (yeah right - a 2.1 GB disk, but I got a
load of them!) disk for spool, so I use the partition 2 (entire disk).

However, once INN have started, and it sure finds the new spool and
initializes it, it shortly after claims, that it can not open the
device.

I _think_, that INN is trashing the partition table on the disk during
initialization and afterwards can not open the disk. If I relabel the
disk (writes a new partition table), cnfsstat can "see" the spool, but
once INN have touched it, cnfsstat also claim, that it can not read
the spool.

So what is the leasson? Should I make a new (smaler) partition and use
that instead? The size I defined above is below the physical size of
the disk... Is there any magic about partition 2? 

Sorry for spamming you with questions, but well... :-)

Karsten
Re: CNFS on partitions
#51048
Author: Alex Kiernan
Date: Wed, 07 Mar 2001 14:34
20 lines
1925 bytes
Karsten Thygesen <karthy@SunSITE.dk> writes:

> So what is the leasson? Should I make a new (smaler) partition and use
> that instead? The size I defined above is below the physical size of
> the disk... Is there any magic about partition 2? 
> 

At a guess its this from the INSTALL file:

    Solaris users please note:  On Solaris, do not use raw devices that
    include the first cylinder of the disk.  Solaris doesn't protect the
    superblock from being overwritten by an application writing to raw
    devices and includes it in the first cylinder of the disk, so unless you
    use a slice that starts with cylinder 1 instead of 0, INN will
    invalidate the partition table when it tries to initialize the cycbuff
    and all further accesses will fail until you repartition.

-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC
Re: CNFS on partitions
#51053
Author: Karsten Thygesen
Date: Wed, 07 Mar 2001 16:58
30 lines
2451 bytes
>>>>> "Alex" == Alex Kiernan <alexk@demon.net> writes:

 Alex> Karsten Thygesen <karthy@SunSITE.dk> writes:
 >> So what is the leasson? Should I make a new (smaler) partition and
 >> use that instead? The size I defined above is below the physical
 >> size of the disk... Is there any magic about partition 2?
 >> 

 Alex> At a guess its this from the INSTALL file:

 Alex>     Solaris users please note: On Solaris, do not use raw
 Alex> devices that include the first cylinder of the disk.  Solaris
 Alex> doesn't protect the superblock from being overwritten by an
 Alex> application writing to raw devices and includes it in the first
 Alex> cylinder of the disk, so unless you use a slice that starts
 Alex> with cylinder 1 instead of 0, INN will invalidate the partition
 Alex> table when it tries to initialize the cycbuff and all further
 Alex> accesses will fail until you repartition.

Head on!!! I swear I did read the INSTALL file, but somehow that part
did not ring a bell at the right time. 

I'm sorry I asked a RTFM question. 

OK, my dear disks - here comes dady^H^H^H^Hformat....

Thanks, Alex!!

Karsten
Re: CNFS on partitions
#51065
Author: Russ Allbery
Date: Wed, 07 Mar 2001 23:09
43 lines
3060 bytes
Karsten Thygesen <karthy@SunSITE.dk> writes:

> However, once INN have started, and it sure finds the new spool and
> initializes it, it shortly after claims, that it can not open the
> device.

> I _think_, that INN is trashing the partition table on the disk during
> initialization and afterwards can not open the disk. If I relabel the
> disk (writes a new partition table), cnfsstat can "see" the spool, but
> once INN have touched it, cnfsstat also claim, that it can not read the
> spool.

Right.  This is a known problem with Solaris.

URL: <http://www.eyrie.org/~eagle/faqs/inn.html#5.2>

Subject: 5.2. Using raw devices on Solaris destroys the partition table

If you use slice 2, or some other disk slice that includes the entire
disk, under Solaris as a raw partition for CNFS, you may run into this
problem.  The symptoms are that INN manages to initialize the cycbuffs
just fine, but then gets invalid device errors when it tries to open them
again, and the disks show up in format as needing to be repartitioned.

The solution is to not use raw devices that include the first cylinder of
the disk.  Solaris doesn't protect the superblock from being overwritten
by an application writing to raw devices and includes it in the first
cylinder of the disk, so unless you use a slice that starts with cylinder
1 instead of 0, INN will invalidate the partition table when it tries to
initialize the cycbuff and all further accesses will fail until you
repartition.

Generally all that has to be done is to repartition the disk with slice 0
starting from cylinder 1 and extending to the end of the disk and then
point INN at slice 0 instead of slice 2.  You lose some small amount of
space, but generally not enough to care about.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: CNFS on partitions
#51206
Author: bill davidsen
Date: Wed, 14 Mar 2001 18:12
36 lines
2861 bytes
In article <ylitllch1v.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:

| The solution is to not use raw devices that include the first cylinder of
| the disk.  Solaris doesn't protect the superblock from being overwritten
| by an application writing to raw devices and includes it in the first
| cylinder of the disk, so unless you use a slice that starts with cylinder
| 1 instead of 0, INN will invalidate the partition table when it tries to
| initialize the cycbuff and all further accesses will fail until you
| repartition.
| 
| Generally all that has to be done is to repartition the disk with slice 0
| starting from cylinder 1 and extending to the end of the disk and then
| point INN at slice 0 instead of slice 2.  You lose some small amount of
| space, but generally not enough to care about.

This is true to some extent with Linux, although not in the same way. If
you use /dev/hdb (the whole drive) rather than /dev/hdb1 (partition 1)
you will mess up the partition table. However, Linux will still let you
use the device just fine.

It looks as if Solaris slice two is the whole disk in size, but is in
reality a partition, needing the partition table included in the slice
to find itself. I thought there was a device name for the whole drive
which was not a slice, and which did allow you to use the whole drive
happily. I haven't done Solaris in a long time, so this could be other
SVR4 information floating through holes in my memory.

Not that giving up the partition table as data space is going to be an
issue, even on a 2GB drive.

-- 
  bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
"I am lost. I am out looking for myself. If I should come back before I
return, please ask me to wait."  -seen in a doctor's office
Re: CNFS on partitions
#51220
Author: Russ Allbery
Date: Wed, 14 Mar 2001 23:25
19 lines
1734 bytes
bill davidsen <davidsen@tmr.com> writes:

> It looks as if Solaris slice two is the whole disk in size, but is in
> reality a partition, needing the partition table included in the slice
> to find itself.

It's not just slice two.  I experimented with this quite a lot, and
Solaris includes the partition table in *any* slice that starts with
cylinder 0.  Apparently Solaris's file system code is just smart enough to
not use the first X bytes of its slice.

It's really a bug in Solaris in my opinion.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads