partition covering the whole slice
Andriy Gapon
avg at icyb.net.ua
Fri Dec 5 04:57:25 PST 2008
I have a disk with two slices and each slices has a single real
partition covering the whole slice, sector-to-sector.
I don't remember how I managed to configure the disk this way, is this
even possible? :-)
$ gpart show
=> 63 781422705 ad12 MBR (373G)
63 209712447 1 freebsd [active] (100G)
209712510 571705155 2 freebsd [active] (273G)
781417665 5103 - free - (2.5M)
=> 0 209712447 ufs/extbackup BSD (100G)
0 209712447 1 freebsd-ufs (100G)
=> 0 209712447 ad12s1 BSD (100G)
0 209712447 1 freebsd-ufs (100G)
=> 0 571705155 ufs/extstuff BSD (273G)
0 571705155 1 freebsd-ufs (273G)
=> 0 571705155 ad12s2 BSD (273G)
0 571705155 1 freebsd-ufs (273G)
You can immediately spot another oddity - I never used glabel on this
disk, but I did use tunefs -L to label the UFS filesystems within the
partitions.
Now it seems that the label of filesystems is also somehow recognized as
a label for the whole slice. E.g. "ufs/extbackup" is exatcly the same as
"ad12s1". Weird.
Here's some additional data:
$ ls -1 /dev/ad12*
/dev/ad12
/dev/ad12s1
/dev/ad12s1a
/dev/ad12s2
/dev/ad12s2a
Looks usual.
$ ls -1 /dev/ufs/
extbackup
extbackupa
extstuff
extstuffa
So there is one "normal" label for each filesystem and the second label
for it as a filesystem in partition "a" of a labeled slice.
There is nothing in /dev/label though.
And a bit more:
$ file -s /dev/ad12s1
/dev/ad12s1: Unix Fast File system [v2] (little-endian) last mounted on
/automnt/ufs/extbackupa, volume name extbackup, last written at Tue Dec
2 17:47:21 2008, clean flag 1, readonly flag 0, number of blocks
13107027, number of data blocks 13002290, number of cylinder groups 35,
block size 65536, fragment size 8192, average file size 16384, average
number of files in dir 64, pending blocks to free 0, pending inodes to
free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME
optimization
$ file -s /dev/ad12s1a
/dev/ad12s1a: Unix Fast File system [v2] (little-endian) last mounted on
/automnt/ufs/extbackupa, volume name extbackup, last written at Tue Dec
2 17:47:21 2008, clean flag 1, readonly flag 0, number of blocks
13107027, number of data blocks 13002290, number of cylinder groups 35,
block size 65536, fragment size 8192, average file size 16384, average
number of files in dir 64, pending blocks to free 0, pending inodes to
free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME
optimization
So it looks like start of ad12s1 is the same as ad12s1a.
On some better configured disks I see:
$ file -s /dev/ad6s1
/dev/ad6s1: x86 boot sector; partition 4: ID=0xa5, active, starthead 0,
startsector 0, 50000 sectors
Ultimately I would like to fix this so that I don't see labels on the
slices.
--
Andriy Gapon
More information about the freebsd-fs
mailing list