geometry does not match label (255h,63s != 16h,63s)

Perhaps, hopefully someone may be able to help here.

uname -a
Code:
FreeBSD machname 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

The OS is to be upgraded to 9.2 or 10, but I'm not wanting to do it now, not knowing if it will aggravate the problem further, compromising data on disks.

Machine status:

Disk/slices that cannot be mounted: /dev/ada3 or /dev/ada3s1.
mach-#272:# dmesg | grep -i ada3
Code:
ada3 at ata0 bus 0 scbus2 target 1 lun 0
ada3: <MAXTOR 6L080J4 A93.0500> ATA-5 device
ada3: 100.000MB/s transfers (UDMA5, PIO 8192bytes)
ada3: 76345MB (156355584 512 byte sectors: 16H 63S/T 16383C)
ada3: Previously was known as ad1
GEOM: ada3s1: geometry does not match label (255h,63s != 16h,63s).
ext2fs: ada3s1b: wrong magic number 0xa1e4 (expected 0xef53)
mach-#273:#

mach-#273:# gpart show ada3s1
Code:
=>        0  156344517  ada3s1  BSD  (74G)
          0    2097152       2  freebsd-swap  (1.0G)
    2097152  154247365       5  freebsd-ufs  (73G)

Interestingly enough:
mach-#217:# ls /dev/ada3*
Code:
/dev/ada3       /dev/ada3s1     /dev/ada3s1b    /dev/ada3s1e

mach-#274:# bsdlabel -e -A ada3s1
Code:
# /dev/ada3s1:
type: ESDI
disk: ad1s1
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 9732
sectors/unit: 156355584
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#          size     offset    fstype   [fsize bsize bps/cpg]
  b:    2097152          0      swap
  c:  156344517          0    unused        0     0     # "raw" part, don't edit
  e:  154247365    2097152    4.2BSD     2048 16384 28552
~

Apparently the label is showing 255h but geom is reading 16h? Is there anyone with a possible solution to this? One that would not destroy the data on it.

Thanks!
 
The "geometry does not match label" message is harmless. It's a relic from the CHS era where disks were addressed using Cylinder/Head/Sector numbers. Nowadays everything uses LBA but the when you use MBR partitioning with FreeBSD some made up numbers have to be stored in the disklabel (Not MBR but the one that was previously written with bsdlabel(8), now with gpart(8)) and the GEOM code responsible for the MBR/bsdlabel stuff still does some unnecessary tests on the numbers. If you used GPT you would never see such warnings since GPT is strictly LBA only. The other error is not related to this bogus geometry warning.
 
Do you have any other idea why the disk fails to mount? The only other indicator, from dmesg is:
Code:
ext2fs: ada3s1b: wrong magic number 0xa1e4 (expected 0xef53)
g_vfs_done():ada0p1[READ(offset=262144, length=8192)]error = 5
ext2fs: ada0p1: wrong magic number 0x5d (expected 0xef53)
ext2fs: ada2p3: wrong magic number 0xc10d (expected 0xef53)

I was assuming this might have been related to the "geometry" issue.

Thanks!
 
It is unlikely that there is an ext2 filesystem inside a FreeBSD partition. Not impossible, though. Use file(1) to find out what is really there: # file -s /dev/ada3s1b.
 
Here is data revealed:

mach-#215:# ls /dev/ada3*
Code:
/dev/ada3       /dev/ada3s1     /dev/ada3s1b    /dev/ada3s1e

mach-#223:# file -s /dev/ada3
Code:
/dev/ada3: x86 boot sector; partition 1: ID=0xa5, active, starthead 1, startsector 63, 156344517 sectors, code offset 0x31

mach-#224:# file -s /dev/ada3s1
Code:
/dev/ada3s1: x86 boot sector; partition 4: ID=0xa5, active, starthead 0, startsector 0, 50000 sectors, code offset 0x3c, BSD disklabel

mach-#225:# file -s /dev/ada3s1b
Code:
/dev/ada3s1b: x86 boot sector; partition 4: ID=0xa5, active, starthead 0, startsector 0, 50000 sectors, code offset 0x3c, BSD disklabel

mach-#226:# file -s /dev/ada3s1e
Code:
/dev/ada3s1e: Unix Fast File system [v2] (little-endian) last mounted on /usr/tmp/automounter.probe, last written at Tue May 13 01:34:22 2014, clean flag 1, readonly flag 0, number of blocks 38561841, number of data blocks 37348197, number of cylinder groups 410, block size 16384, fragment size 2048, 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
 
Back
Top