HDD representation in /dev

First to say, that everything is working.
It is just, that I am a little bit confused, with how does it work actually.

This is my HDD
Code:
# ll /dev/ad*
crw-r-----  1 root  operator  -   0,  83 Nov 26 06:24:38 2009 /dev/ad4
crw-r-----  1 root  operator  -   0,  86 Nov 26 06:24:38 2009 /dev/ad4s1
crw-r-----  1 root  operator  -   0,  87 Nov 26 06:24:38 2009 /dev/ad4s2
crw-r-----  1 root  operator  -   0,  88 Nov 26 06:24:38 2009 /dev/ad4s3
crw-r-----  1 root  operator  -   0,  91 Nov 26 07:24:37 2009 /dev/ad4s3a
crw-r-----  1 root  operator  -   0,  92 Nov 26 07:24:37 2009 /dev/ad4s3b
crw-r-----  1 root  operator  -   0,  93 Nov 26 06:24:38 2009 /dev/ad4s3c
crw-r-----  1 root  operator  -   0,  94 Nov 26 07:24:37 2009 /dev/ad4s3d
crw-r-----  1 root  operator  -   0,  95 Nov 26 07:24:37 2009 /dev/ad4s3e
crw-r-----  1 root  operator  -   0,  96 Nov 26 07:24:37 2009 /dev/ad4s3f
crw-r-----  1 root  operator  -   0,  89 Nov 26 08:58:19 2009 /dev/ad4s5
crw-r-----  1 root  operator  -   0,  90 Nov 26 06:24:38 2009 /dev/ad4s6

Now, as I know, there can be a max of 4 slices.
So..., why do I see 6 of them?!

They are mounted like this:
Code:
# cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad4s3b             none            swap    sw              0       0
/dev/ad4s3a             /               ufs     rw              1       1
/dev/ad4s3e             /tmp            ufs     rw              2       2
/dev/ad4s3f             /usr            ufs     rw              2       2
/dev/ad4s3d             /var            ufs     rw              2       2
#/dev/acd0              /cdrom          cd9660  rw              0       0

/dev/ad4s1              /mnt/win_c      ntfs    rw,late         0       0
/dev/ad4s5              /mnt/win_d      ntfs    rw,late         0       0
/dev/ad4s6              /mnt/win_e      ntfs    rw,late         0       0

Slice 3 is where FreeBSD resides.

Slice 1 is WinXP's C: drive
Slice 5 is WinXP's D: drive
Slice 6 is WinXP's E: drive

So, max of 4 slices is actually used, even there are 6 listed slices.
If WinXP can have a max of 2 partitions(which are actually slices), then D: and E: drive should be part of 1 slice, which is in WinXP term., called extended, right?

So..., what am I missing here?
 
... which turns out to be true, according to:
Code:
# fdisk
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=317632 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=317632 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 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
    start 63, size 31455207 (15358 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 9/ sector 63
The data for partition 2 is:
sysid 15 (0x0f),(Extended DOS (LBA))
    start 31455270, size 236267955 (115365 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 6/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 267723225, size 52449831 (25610 Meg), flag 80 (active)
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 15/ sector 63
The data for partition 4 is:
<UNUSED>
 
Slice 5 and higher is equivalent to the BIOS/PC extended partitions. You can create 4 primary partitions or 3 primaries and 1 extended. Inside an extended partition you can create more partitions.
 
So...
Code:
/dev/ad4[B][color="Red"]s1[/color][/B]
, holds WinXp C: partition

And:
Code:
/dev/ad4[B][color="#ff0000"]s2[/color][/B]
is actually a container of:
Code:
/dev/ad4[B][color="#ff0000"]s5[/color] --> WinXp D: partition[/B]
/dev/ad4[B][color="Red"]s6[/color] --> WinXp E: partition[/B]

Then this is my FreeBSD:
Code:
/dev/ad4[B][color="#ff0000"]s3[/color][/B]

Finally:
Code:
/dev/ad4[B][color="#ff0000"]s4[/color][/B]
is actually one that is unused(shown in fdisk).

Is this true? :stud
 
Back
Top