Re: Why the disk layout change
- From: Igor Sobrado <igor@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 9 Dec 2006 16:08:45 +0100
Erik Trulsson <ertr1013@xxxxxxxxxxxxx> wrote:
Yes, 'd' *used* to have a special meaning once upon a time, which is
the reason it was by default not used. Eventually sysinstall
was updated to treat 'd' just like the normal partition it is nowadays.
Indeed, `c' is the part of the disk allocated by the operating system
slice and `d' is the entire disk. This partition exists on NetBSD yet:
# disklabel wd0
# /dev/rwd0d:
type: unknown
disk: IC25N020ATDA04
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 38760
total sectors: 39070080
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 132048 63 4.2BSD 1024 8192 16512 # (Cyl. 0*- 131*)
b: 263088 132111 swap # (Cyl. 131*- 392*)
c: 39070017 63 unused 0 0 # (Cyl. 0*- 38759)
d: 39070080 0 unused 0 0 # (Cyl. 0 - 38759)
e: 787248 395199 4.2BSD 1024 8192 43736 # (Cyl. 392*- 1173*)
f: 66528 1182447 4.2BSD 1024 8192 8320 # (Cyl. 1173*- 1239*)
g: 26034624 1248975 4.2BSD 2048 16384 28800 # (Cyl. 1239*- 27067*)
h: 525168 27283599 4.2BSD 1024 8192 43768 # (Cyl. 27067*- 27588*)
i: 17136 27808767 4.2BSD 1024 8192 2144 # (Cyl. 27588*- 27605*)
j: 33264 27825903 4.2BSD 1024 8192 4160 # (Cyl. 27605*- 27638*)
k: 1835568 27859167 4.2BSD 1024 8192 45896 # (Cyl. 27638*- 29459*)
l: 4195296 29694735 4.2BSD 2048 16384 21872 # (Cyl. 29459*- 33621*)
m: 721728 33890031 4.2BSD 512 4096 22560 # (Cyl. 33621*- 34337*)
n: 3145968 34611759 4.2BSD 1024 8192 46272 # (Cyl. 34337*- 37458*)
o: 1312353 37757727 4.2BSD 1024 8192 43752 # (Cyl. 37458*- 38759)
(as you can see, most of the disk is being used by NetBSD)
These partitions are mounted, respectively, at:
$ df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/wd0a 62015 21215 37700 36% /
/dev/wd0f 31207 5380 24267 18% /var
/dev/wd0e 370295 184457 167324 52% /usr
/dev/wd0g 12620894 740582 11249268 6% /home
/dev/wd0h 247007 117552 117105 50% /usr/X11R6
/dev/wd0i 7951 1 7553 0% /usr/guest
/dev/wd0j 15535 1 14758 0% /usr/local
/dev/wd0k 863471 1 820297 0% /usr/obj
/dev/wd0l 2033630 627132 1304818 32% /usr/pkg
/dev/wd0m 320343 131289 173037 43% /usr/pkgsrc
/dev/wd0n 1479887 747239 658654 53% /usr/src
/dev/wd0o 636119 263465 340849 43% /usr/xsrc
mfs:409 63959 3 60759 0% /tmp
kernfs 1 1 0 100% /kern
As observed in a previous post on this thread, `a' (root), `b' (swap),
`c' (the part of the disk allocated by the operating system) and `d'
(the entire disk) are reserved by historical, and not so historical,
reasons.
`c' and `d' are used to access the operating system and the entire
disk (e.g., for backing up purposes).
On OpenBSD, the `c' partition has the same meaning as `d' in
NetBSD; there is not a partition over the disk are allocated by
the operating system on OpenBSD:
# disklabel wd0
# Inside MBR partition 3: type A6 start 63 size 117210177
# /dev/rwd0c:
type: ESDI
disk: ESDI/IDE disk
label: HTS541060G9AT00
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 117210240
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 307377 63 4.2BSD 2048 16384 304 # Cyl 0*- 304
b: 1048320 307440 swap # Cyl 305 - 1344
c: 117210240 0 unused 0 0 # Cyl 0 -116279
d: 307440 1355760 4.2BSD 2048 16384 306 # Cyl 1345 - 1649
e: 51408 1663200 4.2BSD 2048 16384 52 # Cyl 1650 - 1700
f: 2097648 1714608 4.2BSD 2048 16384 328 # Cyl 1701 - 3781
g: 33264 3812256 4.2BSD 2048 16384 34 # Cyl 3782 - 3814
h: 131040 3845520 4.2BSD 2048 16384 130 # Cyl 3815 - 3944
i: 98784 3976560 4.2BSD 2048 16384 98 # Cyl 3945 - 4042
j: 49392 4075344 4.2BSD 2048 16384 50 # Cyl 4043 - 4091
k: 65520 4124736 4.2BSD 2048 16384 66 # Cyl 4092 - 4156
l: 1048320 4190256 4.2BSD 2048 16384 328 # Cyl 4157 - 5196
m: 2097648 5238576 4.2BSD 2048 16384 328 # Cyl 5197 - 7277
n: 4194288 7336224 4.2BSD 1024 8192 86 # Cyl 7278 - 11438
o: 2097648 11530512 4.2BSD 1024 8192 86 # Cyl 11439 - 13519
p: 103582080 13628160 4.2BSD 2048 16384 328 # Cyl 13520 -116279
In this system, I choosed mounting these partitions in this way:
$ cat /etc/fstab
/dev/wd0a / ffs rw,softdep 1 1
/dev/wd0b none swap sw 0 0
/dev/wd0d /altroot ffs xx 0 0
/dev/wd0p /home ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0b /tmp mfs rw,nodev,nosuid,-s=129024 0 0
/dev/wd0f /usr ffs rw,nodev,softdep 1 2
/dev/wd0l /usr/local ffs rw,nodev,softdep 1 2
/dev/wd0m /usr/obj ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0n /usr/ports ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0o /usr/src ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0e /var ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0g /var/log ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0h /var/mail ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0b /var/run mfs rw,nodev,nosuid,-s=4032 0 0
/dev/wd0i /var/spool ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0j /var/tmp ffs rw,nodev,nosuid,softdep 1 2
/dev/wd0k /var/www ffs rw,nodev,nosuid,softdep 1 2
(/altroot is an alternate copy of the root filesystem, done automatically
by /etc/daily when the ROOTBACKUP variable is set to 1).
I certainly would like a higher degree of standardization (e.g.,
/var, /usr and /home should probably have their own partitions.)
On the other hand, an scheme where only partitions for `a' up to `c'
(or `d' on some systems) have an historical meaning is more flexible.
Hope this post will not make things even more dark!
Igor.
.
- References:
- Why the disk layout change
- From: Wes Groleau
- Re: Why the disk layout change
- From: Giorgos Keramidas
- Re: Why the disk layout change
- From: Wes Groleau
- Re: Why the disk layout change
- From: Erik Trulsson
- Why the disk layout change
- Prev by Date: Re: 6,1 and Java CLASSPATH
- Next by Date: linux -> freebsd (considering)
- Previous by thread: Re: Why the disk layout change
- Next by thread: Re: Why the disk layout change
- Index(es):
Relevant Pages
|