Hi Gurus, Unfortunately, I did not get any solution. I had suggestions to just "Label" the disk, but my problem is not fixing a disk with an incorrect label, but rather finding such disks (LUNs) across many systems because these disks are currently "in use" and as a result, some portions of the disk is not available. Richard Hobbs mentioned having seen the same thing in the past when moving disks from one system to another. Using "format" to label a disk with an existing label does not re-read the disk geometry from the physical disk, it reads it from the existing label. The only way to really re-label a disk is by first corrupting the label, eg using the following procedure: First, corrupt the first sector on the disk c#t#d# dd if=/path/to/any/file of=/dev/rdsk/c#t#d#s2 count=1 bs=512 Next, use format to write a new label to the disk format select disk label? YES quit Then finally, encapsulate the disk, or partition and start using it as per normal. My Original question: > > Hi gurus, > > > > I was happily scripting a couple of weeks ago and came across something > > that produced a message similar to this (off the top of my head) > > > > Warning: The label contents does not match the geometry reported by the > > physical device. > > > > Now I can not remember the command I ran, but I want to use it in another > > script. I was busy writing a script to report on raw disk sizes as seen > by > > Solaris (not Veritas), and I was playing with commands like > > > > format, prtvtoc, fmthard > > > > I've been searching the web and sunsolve, but I can't find out what it is > I > > did. Makes me want to "script" to record everything I do... ! > > > > The situation I have is that sometimes when the storage administrators > > allocate a whole bunch of LUNs I do not check each individually, and > > sometimes I don't realise I am not seeing the full LUN (eg if the first > > sector of an expanded LUN was previously the first sector of a smaller > > LUN). I am trying to write a script which will tell me where I may be > > using LUNs without getting access to the whole full size of the LUN. > > > > > > > > moreover, I have tried to write something to compare the output of fdisk > -g > > with that of fdisk -G, but I always get the following message: > > > > # fdisk -g /dev/rdsk/c3t11d4s2 > > * Label geometry for device /dev/rdsk/c3t11d4s2 > > * PCYL NCYL ACYL BCYL NHEAD NSECT SECSIZ > > 39516 39516 2 0 15 96 512 > > # fdisk -G /dev/rdsk/c3t11d4s2 > > /dev/rdsk/c3t11d4s2: Cannot get physical disk geometry. > > > > > > > > devinfo appears totally useless, and on Solaris 2.6 I get for -g and -G > > both: > > > > Disk does not support fixed disk partition table > > > > > > Any ideas/suggestions ? > > > > Thanx, > > _Johan |---------+---------------------------> | | "Hobbs, Richard"| | | <hobbs | | | @mongeese.co.uk>| | | | | | 17/04/2003 04:14| | | PM | | | | |---------+---------------------------> >-----------------------------------------------------------------------------------------------------------------| | | | To: Johan Hartzenberg/GIS/CSC@CSC | | cc: | | Subject: Re: Mismatch between physical geometry and disk label contents | >-----------------------------------------------------------------------------------------------------------------| Hello, How do you know the disk label is valid though?? What told you that it was valid? To produce the error, i took the 2GB disk out of my Ultra 1, and then took two 9GB disks out of an old veritas-managed disk array. I then put the two 9GB disks into my Ultra 1, and tried to install Solaris 9 onto them. These two disks were going to stay in my Ultra 1 permanently from now on. At some point in the install (fairly early on), i got the error you had... about the wrong physical geometry. I checked several things: - Whether that type of disk would actually work in my machine at all. - Whether the disk type was compatible with the bus i had plugged them onto. - Whether the disks were actually dead (by putting them in a working array). - Whether there were any master/slave jumpers on the disks. - Whether a "probe-scsi-all" command at the ok prompt could pick up the disks. - Whether a boot into single user-mode, followed by a 'format' would help. - ...and finally, i tried labelling them, and that worked! I don't know too much about it technically, i'm afraid, but there's my story. Hope it helps!! Try posting on my forum!! http://unixforum.co.uk Thanks, Richard. Quoting Johan Hartzenberg <jhartzen@csc.com>: > > > Hi, > > Thanx for your reply. The veritas stuff is not the problem, the problem is > that the disk label was valid, but the geometry was "wrong". > > What did you have to do to actually get the system to produce this message? > > So far I only got your reply, plus one from someone who didn't properly > read my question! > > Thanx, > _Johan > > > > > > |---------+---------------------------> > | | "Hobbs, Richard"| > | | <hobbs | > | | @mongeese.co.uk>| > | | | > | | 17/04/2003 03:45| > | | PM | > | | | > |---------+---------------------------> > > > -----------------------------------------------------------------------------------------------------------------| > | > | > | To: Johan Hartzenberg <jhartzen@csc.com> > | > | cc: > | > | Subject: Re: Mismatch between physical geometry and disk label > contents | > > > -----------------------------------------------------------------------------------------------------------------| > > > > > Hello, > > I had that problem when i put two disks from a veritas-managed array into > an > Ultra 1. It said the disk was reporting geometry that didn't match the > physical > disk. > > I simply had to label it i think. Veritas doesn't label disks the same way > Solaris does, so this could be the problem. > > I'd be very interested to see the summary when yo figure it out though! > > Thanks, > Richard. > > > > _______________________________________________ > > sunmanagers mailing list > > sunmanagers@sunmanagers.org > > http://www.sunmanagers.org/mailman/listinfo/sunmanagers > > > > > -- > Richard Hobbs > hobbs@mongeese.co.uk > http://mongeese.co.uk | http://unixforum.co.uk > > "There's only one way of life, and that's your own" - The Levellers > > _____________________________________________________ > Send all your jokes to jokes@fishsponge.co.uk !! > To subscribe, email: jokes-subscribe@fishsponge.co.uk > > > > > -- Richard Hobbs hobbs@mongeese.co.uk http://mongeese.co.uk | http://unixforum.co.uk "There's only one way of life, and that's your own" - The Levellers _____________________________________________________ Send all your jokes to jokes@fishsponge.co.uk !! To subscribe, email: jokes-subscribe@fishsponge.co.uk _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Wed Apr 23 02:12:24 2003
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:09 EST