1

I was reading Fast File System for UNIX where it says the following on page 3:

By ‘‘partition’’ here we refer to the subdivision of physical space on a disk drive. In the traditional file system, as in the new file system, file systems are really located in logical disk partitions that may overlap. This overlapping is made available, for example, to allow programs to copy entire disk drives containing multiple file systems

I don't quite understand what "overlapping" means here. Here's my understanding of disk organization:

Disks are divided into sectors (physical blocks) which are necessarily consecutive. Partitions are logical divisions of the disk, with blocks of size in integer multiples of the sector size, which have a file system installed.

The partition itself necessarily resides in a contiguous chunk of the disk (although files inside the partition may be spread out randomly within the partition).

  1. Is my understanding of disk organization correct?
  2. What does the paper mean by partition overlapping?
  • Partitions do not necessarily have to be disjunct. It is perfectly possible to define partition #1 from logical block 4096 to logical block 16383, and partition #2 from logical block 4096 to logical block 65535. You should of course take great care to use only one of them at any given time... Disks can present a different logical and physical block size; a common situation is to present a logical block size of 512 bytes (because some operating systems like this number) and a physical block size of 4096 bytes; this even has a name, 512e. – AlexP Jun 22 '17 at 11:22
2

Keep in mind that the text you are reading is from about 35 years ago, and while many of the characteristics of the "Fast File Systems" have survived e.g. in ext2, I assume you are doing that to study the history.

Disks are divided into sectors (physical blocks) which are necessarily consecutive.

Sort of. Physically, the harddisk is divided in platters, each with a read/write head. A concentric circle on one platter forms a track, and the set of tracks in the same position for each platter forms a cylinder. Tracks are divided into sectors.

This is a 3D structure, not a linear one, so it can't be consecutive. However, each sector (on each cylinder, on each head) is given a block number, and these block numbers are consecutive, and consecutive physical blocks are located very close to each other.

So from the OS point of view, a harddisk consists of a number of physical blocks, with consecutive physical block addresses (or sector addresses, because each block is a physical sector).

On the PC (and not on the PDP-11/VAX as in the document), harddisk addressing went from a cylinder/head/sector scheme (CHS) to a block address scheme (LBA).

Partitions are logical divisions of the disk, with blocks of size in integer multiples of the sector size, ...

Yes. Block is a dangerous word, because it can mean different things in different contexts. Filesystems use "filesystem blocks" or "allocation blocks" which are multiples of the physical block size. Partitions, at least PC and BSD-style partitions, typically use physical blocks as "partition block size".

... which have a file system installed.

Not necessarily. It can also be swap space, or a PC extended partition (a placeholder to allow more than four partitions), or a BSD raw partition (see below).

The partition itself necessarily resides in a contiguous chunk of the disk (although files inside the partition may be spread out randomly within the partition).

Yes. A partition is just a contigous range of physical blocks (given by beginning and ending block, or beginning block and number of blocks in this paritition).

So nothing stops us from defining a partition that contains several other partitions. In fact, if you look at the BDS partition example in bsdlabel,

 8 partitions:
   #      size   offset    fstype   [fsize bsize bps/cpg]
   a:    81920       16    4.2BSD     1024  8192    16
   b:   160000    81936      swap
   c:  1173930        0    unused        0     0        # "raw" part, don't edit

Partition a consists of block 16-81935, partition b of blocks 81936-1681936, and partition c of blocks 0-1173929. So partition c "contains" partition a and b (and some extra blocks).

The last "raw" partition that spans the entire disk is for convenience: It allows the OS to access the complete disk, for example to copy it entirely. On Linux, this is not necessary, because the OS can access the block device that represents the whole disk.

Note that it's impossible for a "container" partition to have a file system, because that would collide with the file systems or other data in the contained partitions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.