From owner-freebsd-current Sun Dec 10 4:25:29 2000 From owner-freebsd-current@FreeBSD.ORG Sun Dec 10 04:25:24 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 330A537B400 for ; Sun, 10 Dec 2000 04:25:22 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id XAA25407; Sun, 10 Dec 2000 23:24:48 +1100 Date: Sun, 10 Dec 2000 23:26:09 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: "Daniel C. Sobral" Cc: Poul-Henning Kamp , "Brandon D. Valentine" , FreeBSD-CURRENT Subject: Re: write(2) returns error saying read only filesystem when trying to write to a partition In-Reply-To: <3A330010.37F216E4@newsguy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 10 Dec 2000, Daniel C. Sobral wrote: > Poul-Henning Kamp wrote: > > > > >>| Partition table | Data | > > >> | Slice 1 | Slice 2 | Slice 3 | Slice 4 | > > >> | Disklabel | Data | > > >> | c | > > >> |a|b|f|g| > > > > > >That is really an excellent diagram. That should be in an FAQ > > >somewhere. Doc committers? > > > > Except it is not actually correct. The BSD disklabel is usually > > inside the 'a' partition and certainly inside the 'c' > > Is that so? Mea culpa, then. At least I knew what I was talking about > wrt partition table and the actual slices. > > This diagram is just an example. There can be less slices, it doesn't > show extended partitions (extended slices??? :), This leaves out the most interesting (complicated) part. FreeBSD supports the fully recursive version of them: Slice := OrdinarySlice or ExtendedSlice OrdinarySlice := LabeledSlice or UnlabeledSlice (see above for layouts) Layout of ExtendedSlice: | ExtendedSlice | | Partition table | Slice | Slice | Slice | Slice | The recursion gives a quaternary tree with OrdinarySlices as leaves. For compatibility with other OS's (ones whose fdisk program actually supports creating the tree :-), the full tree must not be used. There must be at most ExtendedSlice at each level, and at most one nonempty OrdinarySlice except at the top level where there may be up to 4 OrdinarySlices. The tree thus reduces to a list with up to 3 warts at the top. > it suggests an ordering > that is not necessary. If this is going to the FAQ or the handbook, a > number of notes should be made to point out these (and possibly others > I'm overlooking right now) issues. Other things not shown in the diagram: - there may be more partitions (d|e|h). - slice and partition order may be non-physical. - slices may overlap the partition table in dubious configurations, including the "Dangerously Dedicated" one. - slices may overlap each other in dubious configurations. I sometimes use this feature to help move slices. - partitions may overlap each other (... similarly). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message