From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,f8c5dd11f980bdea X-Google-Attributes: gidfa528,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e34g2000pro.googlegroups.com!not-for-mail From: JLPARSEC Newsgroups: comp.unix.tru64 Subject: Re: disklabel fails with "Bad file number" Date: 21 Oct 2007 11:23:21 -0700 Organization: http://groups.google.com Message-ID: <1192990680.727263.293330@e34g2000pro.googlegroups.com> References: <1192783042.567073.44370@v29g2000prd.googlegroups.com> NNTP-Posting-Host: 75.70.214.221 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1192991015 7978 127.0.0.1 (21 Oct 2007 18:23:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 21 Oct 2007 18:23:35 +0000 (UTC) In-Reply-To: <1192783042.567073.44370@v29g2000prd.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e34g2000pro.googlegroups.com; posting-host=75.70.214.221; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.unix.tru64:110 On Oct 19, 2:37 am, Mp...@bigfoot.com wrote: > Hi Group, > We recently had a disk go awol from a single disk Tru64 V5.1B > box. In order to recover the system I did a fresh install to another > disk, installed Netbackup and then and then used Netbackup to restore > everything from the tape backup over the top of the new disk, choosing > to overwrite existing files. The system boots OK and looks fine except > it won't let me label a new disk (I want to make a copy of the current > disk in case this happens again). > > This is what I see: > > root@D:/> hwmgr -view devices > HWID: Device Name Mfg Model Location > > -------------------------------------------------------------------------= --=AD--- > ... > 97: dsk9 DEC HSG80 > IDENTIFIER=3D1002 #this is the current boot device > 98: dsk10 DEC HSG80 > IDENTIFIER=3D1001 #this is the new device I want to label > root@D:/> ls -l /dev/disk/dsk10* > brw------- 1 root system 19,195 Oct 18 11:28 /dev/disk/dsk10a > brw------- 1 root system 19,197 Oct 18 11:28 /dev/disk/dsk10b > brw------- 1 root system 19,199 Oct 18 11:28 /dev/disk/dsk10c > brw------- 1 root system 19,201 Oct 18 11:28 /dev/disk/dsk10d > brw------- 1 root system 19,203 Oct 18 11:28 /dev/disk/dsk10e > brw------- 1 root system 19,205 Oct 18 11:28 /dev/disk/dsk10f > brw------- 1 root system 19,207 Oct 18 11:28 /dev/disk/dsk10g > brw------- 1 root system 19,209 Oct 18 11:28 /dev/disk/dsk10h > root@D:/> disklabel -p dsk10 > disklabel: dsk10: Bad file number > root@D:/> disklabel -rw dsk10 > disklabel: dsk10: Bad file number > root@D:/> > > Can anyone tell me why this is happening, and what can be done about > it? > > TIA for any help. Hello, I have seen similiar behavior when performing similiar tasks, and this can sometimes be a symptom of either device special file or hardware database corruption. Here is what I would recommend to try and fix this: 1=2E hwmgr view dev (any devices reporting "null"?) 2=2E hwmgr sh scsi (any devices reporting "null"? If so, remove them per #7 below) 3=2E dsfmgr -vV (any errors?) 4=2E dsfmgr -vFV (if any errors seen in #3) 5=2E dsfmgr -vV (any errors? If not, try labelling the disk; if you can't, go to #6) 6=2E hwmgr show scsi (note the "scsi did" of dsk10) 7=2E hwmgr del scsi -did scsi_did_of_dsk10 8=2E hwmgr scan scsi (scans the scsi bus & registers devices that aren't registered) 9=2E hwmgr show scsi (should show a new device in place of "dsk10") 10. disklabel -r new_dskN (does it still fail with "bad file number"? If it says "disk is un-labelled", then the disk is simply un-labelled at this point) 11. if #10 was successful, you can move the "new" name back to the "old" name via "dsfmgr -m newname oldname" then write a label via "disklabel -rw dskN". Hope this helps, --John Lanier