* disklabel fails with "Bad file number"
@ 2007-10-19 8:37 Mpatt
2007-10-20 19:14 ` Krzysiek
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Mpatt @ 2007-10-19 8:37 UTC (permalink / raw)
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
------------------------------------------------------------------------------
...
97: dsk9 DEC HSG80
IDENTIFIER=1002 #this is the current boot device
98: dsk10 DEC HSG80
IDENTIFIER=1001 #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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: disklabel fails with "Bad file number"
2007-10-19 8:37 disklabel fails with "Bad file number" Mpatt
@ 2007-10-20 19:14 ` Krzysiek
2007-10-21 18:23 ` JLPARSEC
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Krzysiek @ 2007-10-20 19:14 UTC (permalink / raw)
Hi,
Please run : hwmgr -scan scsi , than hwmgr -show scsi , hwmgr -view dev and send output ...
Mpatt@bigfoot.com pisze:
> 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
>
> ------------------------------------------------------------------------------
> ...
> 97: dsk9 DEC HSG80
> IDENTIFIER=1002 #this is the current boot device
> 98: dsk10 DEC HSG80
> IDENTIFIER=1001 #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.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: disklabel fails with "Bad file number"
2007-10-19 8:37 disklabel fails with "Bad file number" Mpatt
2007-10-20 19:14 ` Krzysiek
@ 2007-10-21 18:23 ` JLPARSEC
2007-10-22 11:27 ` Mpatt
2007-10-23 5:36 ` Uusimäki
3 siblings, 0 replies; 6+ messages in thread
From: JLPARSEC @ 2007-10-21 18:23 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 3007 bytes --]
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
>
> ------------------------------------------------------------------------------
> ...
> 97: dsk9 DEC HSG80
> IDENTIFIER=1002 #this is the current boot device
> 98: dsk10 DEC HSG80
> IDENTIFIER=1001 #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. hwmgr view dev (any devices reporting "null"?)
2. hwmgr sh scsi (any devices reporting "null"? If so, remove them
per #7 below)
3. dsfmgr -vV (any errors?)
4. dsfmgr -vFV (if any errors seen in #3)
5. dsfmgr -vV (any errors? If not, try labelling the disk; if you
can't, go to #6)
6. hwmgr show scsi (note the "scsi did" of dsk10)
7. hwmgr del scsi -did scsi_did_of_dsk10
8. hwmgr scan scsi (scans the scsi bus & registers devices that
aren't registered)
9. 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: disklabel fails with "Bad file number"
2007-10-19 8:37 disklabel fails with "Bad file number" Mpatt
2007-10-20 19:14 ` Krzysiek
2007-10-21 18:23 ` JLPARSEC
@ 2007-10-22 11:27 ` Mpatt
2007-10-23 5:36 ` Uusimäki
3 siblings, 0 replies; 6+ messages in thread
From: Mpatt @ 2007-10-22 11:27 UTC (permalink / raw)
Thanks to Krzysiek and JLPARSEC for your replies, here's the output
you requested. I guess from John's reply I should remove the devices
with the null scsi IDs, which I'll do when I have a chance to play,
and I'll report back.
root@D:/> hwmgr -scan scsi
hwmgr: Scan request successfully initiated
root@D:/> hwmgr -show scsi
SCSI DEVICE DEVICE DRIVER NUM DEVICE FIRST
HWID: DEVICEID HOSTNAME TYPE SUBTYPE OWNER PATH FILE VALID
PATH
-------------------------------------------------------------------------
69: 1 ATCT02 disk none 0 4 (null)
70: 2 ATCT02 disk none 0 4 (null)
71: 3 ATCT02 disk none 0 4 (null)
72: 4 ATCT02 disk none 0 4 (null)
73: 5 ATCT02 disk none 0 4 (null)
74: 6 ATCT02 disk none 0 4 (null)
75: 7 ATCT02 disk none 0 4 (null)
76: 8 ATCT02 disk none 0 4 (null)
77: 9 ATCT02 disk none 0 4 (null)
78: 10 ATCT02 cdrom none 0 1 cdrom0
[2/0/0]
81: 0 ATCT02 raid none 0 4 scp0
[1/0/0]
97: 11 ATCT02 disk none 2 4 dsk9
[1/0/2]
98: 12 ATCT02 disk none 0 4 dsk10
[1/0/1]
root@D:/> hwmgr -view dev
HWID: Device Name Mfg Model Location
------------------------------------------------------------------------------
4: dmapi
5: scp
6: kevm
50: floppy0 3.5in floppy fdi0-unit-0
78: cdrom0 COMPAQ CD-224E bus-2-targ-0-
lun-0
79: random
80: urandom
81: scp0 HSG80CCL bus-1-targ-0-
lun-0
97: dsk9 DEC HSG80 IDENTIFIER=1002
98: dsk10 DEC HSG80 IDENTIFIER=1001
root@D:/> dsfmgr -vV
dsfmgr -vV
Secure Session Lock. At Mon Oct 22 12:17:44 2007
dsfmgr: verify all datum for system (5.1B-0 2650) at /
Default File Tree:
OK.
Device Class Directory Default Database:
OK.
Device Category to Class Directory Database:
OK.
Dev directory structure:
OK.
Device Status Files:
OK.
Dev Nodes:
OK.
Release Session Lock at Mon Oct 22 12:17:44 2007
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: disklabel fails with "Bad file number"
2007-10-19 8:37 disklabel fails with "Bad file number" Mpatt
` (2 preceding siblings ...)
2007-10-22 11:27 ` Mpatt
@ 2007-10-23 5:36 ` Uusimäki
2007-10-23 20:36 ` martyn
3 siblings, 1 reply; 6+ messages in thread
From: Uusimäki @ 2007-10-23 5:36 UTC (permalink / raw)
Mpatt@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
>
> ------------------------------------------------------------------------------
> ...
> 97: dsk9 DEC HSG80
> IDENTIFIER=1002 #this is the current boot device
> 98: dsk10 DEC HSG80
> IDENTIFIER=1001 #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.
>
Have you done the disklabel -z first before trying to write the new label?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: disklabel fails with "Bad file number"
2007-10-23 5:36 ` Uusimäki
@ 2007-10-23 20:36 ` martyn
0 siblings, 0 replies; 6+ messages in thread
From: martyn @ 2007-10-23 20:36 UTC (permalink / raw)
Uusim�ki wrote:
>
> Have you done the disklabel -z first before trying to write the new label?
>
Yes, I tried that but it didn't work either.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-23 20:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 8:37 disklabel fails with "Bad file number" Mpatt
2007-10-20 19:14 ` Krzysiek
2007-10-21 18:23 ` JLPARSEC
2007-10-22 11:27 ` Mpatt
2007-10-23 5:36 ` Uusimäki
2007-10-23 20:36 ` martyn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox