Why the disk layout change - BSD

This is a discussion on Why the disk layout change - BSD ; I just installed FreeBSD 6.1. I still have 6.0 on an ATA disk and on a SCSI disk on the same machine. Failures during boot were traced to the fact that the auto-partitioning in 6.1 is different: path 6.0/5.11/4.9 6.1 ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Why the disk layout change

  1. Why the disk layout change

    I just installed FreeBSD 6.1. I still have 6.0 on an ATA disk
    and on a SCSI disk on the same machine. Failures during boot
    were traced to the fact that the auto-partitioning in 6.1
    is different:

    path 6.0/5.11/4.9 6.1
    ----- ------------ -----------
    /tmp /dev/..#s#f /dev/..#s#e
    /var /dev/..#s#e /dev/..#s#d
    /usr /dev/..#s#g /dev/..#s#f

    I am curious--what is the rationale for this change?

    I remember that sub-partition 'c' is or was the entire
    slice but I don't remember what (if anything) was the
    special purpose for 'd'

    --
    Wes Groleau

    Truth often suffers more from the heat of its defenders
    than from the arguments of its opposers.
    -- William Penn

  2. Re: Why the disk layout change

    On Sat, 02 Dec 2006 22:11:30 GMT,
    Wes Groleau wrote:
    > I just installed FreeBSD 6.1. I still have 6.0 on an ATA disk
    > and on a SCSI disk on the same machine. Failures during boot
    > were traced to the fact that the auto-partitioning in 6.1 is
    > different:
    >
    > path 6.0/5.11/4.9 6.1
    > ----- ------------ -----------
    > /tmp /dev/..#s#f /dev/..#s#e
    > /var /dev/..#s#e /dev/..#s#d
    > /usr /dev/..#s#g /dev/..#s#f
    >
    > I am curious--what is the rationale for this change?


    Why does it matter? The best way to make sure partitioning tools
    create a particular set of partitions is to ask them *exactly*
    for this particular set of partitions and avoid 'auto' mode. If
    your setup depends on particular partition layout and sizes, you
    shouldn't really use 'auto'

    > I remember that sub-partition 'c' is or was the entire slice
    > but I don't remember what (if anything) was the special purpose
    > for 'd'.


    There is no special purpose for 'd', 'e', ... partitions. The
    only ones that have special meaning are:

    partition 'a' - the default place for a root filesystem
    partition 'c' - the entire disk


  3. Re: Why the disk layout change

    Begin <87odqlxwzo.fsf@kobe.laptop>
    On 2006-12-03, Giorgos Keramidas wrote:
    > On Sat, 02 Dec 2006 22:11:30 GMT,
    > partition 'a' - the default place for a root filesystem

    partition 'b' - the default place for swapspace
    > partition 'c' - the entire disk



    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  4. Re: Why the disk layout change

    On 3 Dec 2006 09:56:18 GMT, jpd wrote:
    > Begin <87odqlxwzo.fsf@kobe.laptop>
    > On 2006-12-03, Giorgos Keramidas wrote:
    >> On Sat, 02 Dec 2006 22:11:30 GMT,
    >> partition 'a' - the default place for a root filesystem

    >
    > partition 'b' - the default place for swapspace
    >
    >> partition 'c' - the entire disk


    Right, thanks


  5. Re: Why the disk layout change

    On Sat, 02 Dec 2006 22:11:30 GMT, Wes Groleau wrote:
    : I am curious--what is the rationale for this change?

    I don't know. FWIW, you can letter-label slices on existing drives
    any way you like with disklabel -e

  6. Re: Why the disk layout change

    Giorgos Keramidas wrote:
    > Wes Groleau wrote:
    >> I just installed FreeBSD 6.1. I still have 6.0 on an ATA disk
    >> and on a SCSI disk on the same machine. Failures during boot
    >> were traced to the fact that the auto-partitioning in 6.1 is
    >> different:
    >>
    >> path 6.0/5.11/4.9 6.1
    >> ----- ------------ -----------
    >> /tmp /dev/..#s#f /dev/..#s#e
    >> /var /dev/..#s#e /dev/..#s#d
    >> /usr /dev/..#s#g /dev/..#s#f
    >>
    >> I am curious--what is the rationale for this change?

    >
    > Why does it matter? The best way to make sure partitioning tools


    It doesn't. If it did, I would pick some word other than "curious" :-)

    > create a particular set of partitions is to ask them *exactly*
    > for this particular set of partitions and avoid 'auto' mode. If


    Actually I used auto, but then I tweaked the sizes.
    But the boot failure was in 6.0 I had to wipe the
    disk to install 6.1 (too full) and so I tried to boot
    6.0 on another disk to restore fstab and such. To
    get past the boot failure, I had to change the letters
    in the 6.0 fstab. No biggie, just wondering.

    > your setup depends on particular partition layout and sizes, you
    > shouldn't really use 'auto'
    >
    >> I remember that sub-partition 'c' is or was the entire slice
    >> but I don't remember what (if anything) was the special purpose
    >> for 'd'.

    >
    > There is no special purpose for 'd', 'e', ... partitions. The
    > only ones that have special meaning are:


    OK, so it had no special meaning--but there must have been _some_
    reason they chose to have 'auto' skip 'd' and make e, f, g

    For that matter, I'm also curious why the chose 'c' for that purpose
    I would have thought it would make more sense (aesthetically) to have
    ad0s1a and ad0s1b be parts of ad0s1 rather than parts of ad0s1c

    --
    Wes Groleau

    Change is inevitable.
    Conservatives should learn that "inevitable" is not a synonym for "bad."
    Liberals need to learn that "inevitable" is not a synonym for "good."
    -- WWG

  7. Re: Why the disk layout change

    Howard Goldstein wrote:
    > I don't know. FWIW, you can letter-label slices on existing drives
    > any way you like with disklabel -e


    Thanks, I'll look at that.
    Though vi /etc/fstab wasn't difficult. :-)

    --
    Wes Groleau

    Ostracism: A practice of sticking your head in the sand.

  8. Re: Why the disk layout change

    On Wed, 06 Dec 2006 03:47:33 GMT,
    Wes Groleau wrote:
    >Giorgos Keramidas wrote:
    >>> I remember that sub-partition 'c' is or was the entire slice
    >>> but I don't remember what (if anything) was the special purpose
    >>> for 'd'.

    >>
    >> There is no special purpose for 'd', 'e', ... partitions. The
    >> only ones that have special meaning are:

    >
    > OK, so it had no special meaning--but there must have been _some_
    > reason they chose to have 'auto' skip 'd' and make e, f, g


    I'm not sure. A quick look through the commit logs of
    usr.sbin/sysinstall didn't reveal anything which looks related.

    I don't really understand *all* the bits and pieces of the partitioning
    code in sysinstall though, so I may have missed something important.

    > For that matter, I'm also curious why the chose 'c' for that purpose
    > I would have thought it would make more sense (aesthetically) to have
    > ad0s1a and ad0s1b be parts of ad0s1 rather than parts of ad0s1c


    That's probably for ``hysterical raisins''. I don't know why it was
    originally done this way, but it is probably related to the fact that
    BSD could run off disks without a DOS-style partition table. The choise
    of 'c' instead of 'a' for covering the entire disk is something we would
    have to dig a bit for, though.


  9. Re: Why the disk layout change

    Wes Groleau wrote:
    > Giorgos Keramidas wrote:
    >> Wes Groleau wrote:
    >>> I just installed FreeBSD 6.1. I still have 6.0 on an ATA disk
    >>> and on a SCSI disk on the same machine. Failures during boot
    >>> were traced to the fact that the auto-partitioning in 6.1 is
    >>> different:
    >>>
    >>> path 6.0/5.11/4.9 6.1
    >>> ----- ------------ -----------
    >>> /tmp /dev/..#s#f /dev/..#s#e
    >>> /var /dev/..#s#e /dev/..#s#d
    >>> /usr /dev/..#s#g /dev/..#s#f
    >>>
    >>> I am curious--what is the rationale for this change?

    >>
    >> Why does it matter? The best way to make sure partitioning tools

    >
    > It doesn't. If it did, I would pick some word other than "curious" :-)
    >
    >> create a particular set of partitions is to ask them *exactly*
    >> for this particular set of partitions and avoid 'auto' mode. If

    >
    > Actually I used auto, but then I tweaked the sizes.
    > But the boot failure was in 6.0 I had to wipe the
    > disk to install 6.1 (too full) and so I tried to boot
    > 6.0 on another disk to restore fstab and such. To
    > get past the boot failure, I had to change the letters
    > in the 6.0 fstab. No biggie, just wondering.
    >
    >> your setup depends on particular partition layout and sizes, you
    >> shouldn't really use 'auto'
    >>
    >>> I remember that sub-partition 'c' is or was the entire slice
    >>> but I don't remember what (if anything) was the special purpose
    >>> for 'd'.

    >>
    >> There is no special purpose for 'd', 'e', ... partitions. The
    >> only ones that have special meaning are:

    >
    > OK, so it had no special meaning--but there must have been _some_
    > reason they chose to have 'auto' skip 'd' and make e, f, g


    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.





    --

    Erik Trulsson
    ertr1013@student.uu.se

  10. Re: Why the disk layout change

    Erik Trulsson 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.

+ Reply to Thread