View Single Post
  #5   (View Single Post)  
Old 13th June 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by gosha View Post
I know, it seems I've not read the faq and manpages, but I did many times in the past to install OpenBSD, but could never fully understand the difference between the partition in fdisk and in disklabel and also this head/sector thing.
  • As far as the "head/sector thing", this is not an OpenBSD-specific topic. Again, Wikipedia may help clear up ambiguities:

    http://en.wikipedia.org/wiki/Cylinder-head-sector
  • Maybe the following will help depict the difference between the different uses of the word "partition".

    One of the better (free) diagrams I have seen on the difference between fdisk(8) & disklabel(8) partitions is in the NetBSD documentation. See Section 2.2.2 of the NetBSD Guide:

    http://netbsd.org/docs/guide/en/chap-inst.html

    This document also uses the term "slice" which is the same thing as "disklabel(8) partition".

    However, note that there are also differences between NetBSD's & OpenBSD's nomenclature. In OpenBSD, the entire disk is accessible via disklabel slice 'c' whereas in NetBSD, the same slice is entitled 'd'. Also, OpenBSD does not have an analogous construct as what NetBSD designates as slice 'd'. You can have a disklabel slice entitled 'd' in an OpenBSD filesystem, but it will not represent the MBR partition where it resides. Otherwise, this diagram is still useful.
Quote:
Now, if I get it right, I could make my four partitions in fdisk and then for every of them add extended partitions with disklabel, right?
No. Only one MBR primary partition can be made into an extended partition in MBR terminology. A disk can only have one FFS (type A6 MBR partition...) filesystem as BSDfan666 has already stated.
Quote:
So, Ocicat, you say I could make one big partition in fdisk and then extended partitions using disklabel.
OpenBSD's FFS filesystem can reside on an MBR fdisk(8) partition of any size & a maximum of 16 disklabel(8) partitions (or "slices" as NetBSD's documentation uses...) can reside within it. See Section 14.16 & disklabel(8)'s manpage.

...& note that one of the 16 partitions that disklabel(8) can recognize is the entire disk, so an OpenBSD system can recognize only 15 configurable partitions at a time.
Quote:
I was thinking about doing it with fdisk to start using only part of the disk, and then if needed make the new partition, maybe, if needed using another filesystem (if the primary partition is, say, ffs, disklabel cannot make a ext2 partition, right?)
disklabel(8) does not create ext2 filesystems. MBR partitions can be designated as ext2 by setting the type to 83, but you will need to verify this value. disklabel(8) will be able to recognize ext2 partitions, but disklabel(8) will not be able to subpartition an ext2 filesystem, however newfs(8) will be able to initialize it.

Two observations:
  • You appear to be of the opinion that disklabel(8) can subpartition filesystems of any type. disklabel(8) can only subpartition FFS filesystems. However, disklabel(8) will be b able to recognize a limited number of other filesystems & assign them disklabel(8) letters such that they can be mounted into an OpenBSD system, but there are still only 16 letters that OpenBSD can map.
  • It is not entirely clear why you want to slice & dice a hard drive to such a fine granularity. Yes, dump(8) & restore(8) can be used to backup partitions, however, they can also be used to backup individual files.

    If you are thinking that one disk can be universally used across multiple architectures & operating systems, this may or may not work. I would think that setting up either a Samba or NFS server would be simpler approach to creating neutral storage in a diverse environment.
Final comment: disk management is very rich with a large number of knobs to turn. Don't expect to master this topic on the first pass. I don't know anyone who did.
Reply With Quote