Partitioning

Jona Joachim jona.joachim at gmail.com
Sun Jan 15 09:33:17 PST 2006


Hi!
I'm quite new to FreeBSD and I have some concerns about partitioning.
I plan to install FreeBSD-6 as a desktop system and I bought a new
Western Digital Caviar SE WD800JB hard drive to use it as a second
disk for storing music, movies, photos and stuff like that on it. I
also want to put the swap partition on it as this drive will be idle
most of the time. So basically I want to create 2 partitions on this
drive: one 2GB partition for swap and one big UFS partition for data.
Fdisk reported that it couldn't clearly identify the disk architecture
because it thinks that the architecture is different from what BIOS
tells. Here is fdisk's output after having created a slice:

******* Working on device /dev/ad1 *******
parameters extracted from in-core disklabel are:
cylinders=155061 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=155061 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 0, size 156296322 (76316 Meg), flag 80 (active)
	beg: cyl 0/ head 0/ sector 1;
	end: cyl 512/ head 253/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

After creating a slice I created the partitions inside it with
disklabel. In every example I saw the swap partition was in the second
place. However, I want it to be in the beginning of the disk as this
should result in better performance. Are there any concerns about this
layout? I basically used the standards mentioned by the manual pages
of disklabel:

8 partitions:
#         size   offset    fstype [fsize   bsize bps/cpg]
  a:         2g          *      swap
  b:           *          *  4.2BSD  4096 16384          64
  c:           *          *   unused

Here is an output of what the layout now actually looks like:

# /dev/ad1s1:
8 partitions:
#        size                 offset        fstype   [fsize bsize bps/cpg]
  a:  4194304                    0          swap
  b: 152102018     4194304      4.2BSD     4096 16384 20732
  c: 156296322                 0       unused           0         0

The number of cylinders in a cylinder group bps/cpg was automatically
changed to 20732 which is quite different from 64. Why is that so?
I haven't had any problems with the disk until now but I don't want to
expose my data to danger by using a broken disk layout.
Thanks for your help!


More information about the freebsd-questions mailing list