cancel
Showing results for 
Search instead for 
Did you mean: 

vmphyinv

Stumpr2
Level 6
I had a problem this weekend. I inserted tapes into the TLD library and the barcode reader generated a false media ID for the tapes. The barcode was 600001L2. The media ID generated became 0001L2. I immediately knew that the barcode rules were incorrect/non-existent and would need to be modified. I created in the vm.conf:
MEDIA_ID_BARCODE_CHARS 0 8 1:2:3:4:5:6 I then stop/started netbackup to ensure that the vm.conf file would be read.

I then tried to use vmphyinv

DESCRIPTION
Physically inventory the media contents of a robotic library or standalone drive and update the volume database. vmphyinv mounts each media specified by the search criterion, reads the tape header, and updates the volume database based on the information obtained from the tape header. This command can be executed by authorized users.

-non_interactive vmphyinv, in the default mode displays a list of recommendation and ask for confirmation before modifying volume database and NetBackup media database (if required). If this option is specified, the changes are applied without any confirmation.

I was at first hopeful when I tried this command. I was logged in as root on the master/volume manager/robot controller host. It did mount the tape I specified by slot number. It read the internal label. It detected a difference and stated that it changed the media database to reflect what was actually read on the internal media header to be used for the media label. It did NOT update the media database!

I eventually had to physically remove the tape from the library. Re-initialize the library. Delete the incorrect volume ID from media manager and then re-introduce the tape into the library. Since I had the barcode rules correct the media was registered with the correct barcode of 600001 and I was happy. Well, sort of :)

I sure would like to know why vmphyinv did not work like it had reported that it did.
Isn't the Latin word VERITAS = truth?
Or is that improper Symantec's.

Sorry I am an Incorrigible punster -- Do not incorrige!Message was edited by:
Bob Stump
5 REPLIES 5

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
> Isn't the Latin word VERITAS = truth?
> Or is that improper Symantec's.

Yes. Symantec get VERITAS by stock exchange!!


Did you get any error when you ran vmphyinv? I also fails.


bash-2.05# vmcheckxxx -rt tld -rn 0

Robot Contents Volume Configuration

Slot Tape Barcode Media ID Barcode Mismatch Detected
==== ==== ============= ======== ============= =================
1 Yes ITO000 ITO000 ITO000
2 Yes ITO001 ITO001 ITO001
3 No
4 Yes ITO003 ITO003 ITO003
5 Yes ITO004 ITO004 ITO004
6 Yes ITO005 ITO005 ITO005
7 Yes ITO006 ITO006 ITO006
8 Yes ITO007 ITO007 ITO007
9 Yes ITO008 ITO008 ITO008
10 No
11 No
12 No
13 No
14 No
15 No
16 Yes CIV821 CIV821 CIV821
17 Yes DKU308 DKU308 DKU308
18 Yes CLN000 CLN000 CLN000
19 Yes CLN001 CLN001 CLN001
20 Yes CLN961 CLN961 CLN961
bash-2.05# vmphyinv -rn 0 -slot_range 1 9 -d dlt
Skipping slot 3 as the slot is empty
Waiting for mount of media ID ITO000 on host nbuhost
Waiting for mount of media ID ITO001 on host nbuhost
Mounted media ID ITO000 on host nbuhost
Waiting for mount of media ID ITO003 on host nbuhost
Mounted media ID ITO001 on host nbuhost
Waiting for mount of media ID ITO004 on host nbuhost
Mounted media ID ITO003 on host nbuhost
Waiting for mount of media ID ITO005 on host nbuhost
Mounted media ID ITO004 on host nbuhost
Waiting for mount of media ID ITO006 on host nbuhost
Mounted media ID ITO005 on host nbuhost
Waiting for mount of media ID ITO007 on host nbuhost
Mounted media ID ITO006 on host nbuhost
Waiting for mount of media ID ITO008 on host nbuhost
Mounted media ID ITO008 on host nbuhost
Mounted media ID ITO007 on host nbuhost

Following error(s) detected:

Media in slot 1 is A00001 with barcode ITO000 and not ITO000.
Media in slot 4 is A00003 with barcode ITO003 and not ITO003.
Media in slot 8 is CIV814 with barcode ITO007 and not ITO007.


But after deleting volume, I do successfully.


bash-2.05# vmdelete -m ITO007
bash-2.05# vmphyinv -rn 0 -slot_range 8 8 -d dlt
Waiting for mount of media from TLD(0), slot # 8 on host nbuhost
Mounted media from TLD(0), slot # 8 on host nbuhost

Proposed Change(s) to Update the Volume Configuration
=====================================================
Logically add new media CIV814 to robot slot 8.

Update volume configuration? (y/n) n:

Added new media CIV814 to slot 8 on host nbuhost.

Stumpr2
Level 6
Yeah, I know about vmdelete but I had worked 20 hours that day and could barely remember how to drive home ;)

I just don't understand why the volume needed to be deleted by the way I did it or by the way you did it. It seems to me that if VERITAS went to all the trouble to create vmphyinv that they could have done a better job and included a vmdelete in the vmphyinv itself. Or they shouldn't document that it will detect a difference and then change it. They didn't include the step of deleting the bad label info.

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
Before running vmphyinv, NetBackup has record of ITO007 which has label of 'ITO007'.
vmphyinv were to add CIV817 which has label of 'ITO007'(see below). So without running vmdelete before, vmphyinv try to add new volume those barcode is same with another volume. This makes confliction. I suppose that vmphyinv reject it to avoid confliction.



# vmquery -m CIV814
================================================================================
media ID: CIV814
media type: DLT cartridge tape (11)
barcode: ITO007
media description: ------
volume pool: NetBackup (1)
robot type: TLD - Tape Library DLT (8)
robot number: 0
robot slot: 8
robot control host: nbuhost
volume group: 00_000_TLD
vault name: ---
vault sent date: ---
vault return date: ---
vault slot: ---
vault session id: ---
vault container id: -
created: Wed Aug 24 21:23:31 2005
assigned: ---
last mounted: ---
first mount: ---
expiration date: ---
number of mounts: 0
max mounts allowed: ---
================================================================================

In your case, robot inventory added media id 0001L2 labeled as 0001L2 first.
Next after modifying vm.conf, vmphyinv tried to add media id 0001L2(read from media header) labeled 600001. Media id doubled with different barcode.

> It seems to me that if VERITAS went to all the trouble to create
> vmphyinv that they could have done a better job and included a
> vmdelete in the vmphyinv itself. Or they shouldn't document that
> it will detect a difference and then change it. They didn't
> include the step of deleting the bad label info.

Yes, I agree. vmphyinv makes up little confused. This needs great care, and isn't friendly.

TempoVisitor
Level 4
Hi Bob,

vmphyinv is not magic. It was created to be able to make an inventory (physical inventory) for thos libraries which do not have a barcode reader.

There is no reason why vmphyinv would act differently than another inventory : if the media in a given slot has been added to the volume database under a specific mediaID, then this mediaID will NOT be changed in anyway. You can not modify that part of the volume database.

That's why you had to delete yourself the media from the base. You do not want vmphyinv to delete a media from the base if your library became crazy and accidentaly moved a tape to a different slot, do you ?

Then, when the vmphyinv made an inventory of the media in your given slot, it decided to read its WRITTEN mediaID, means the LABEL.
- if the media was new, there was no label ... vmphyinv couldn't do anything.
- if the media had already been used, there was a label : original one, 00001L2, so it gave back the volume name associated to the tape in the slot.

I dont know if vmphyinv gave u a wrong message. What i can say is :
- no use to restart netbackup after modifying vm.conf, because it's a configuration file of MediaManager, not of NetBackup, and it's read each time you make an inventory
- you MUST create this vm.conf rule on each of your media servers. (this is very true under windows : you'll see that if you use a deported admonistration console, it has it's own vm.conf, and would not use the media server local vm.conf and rules)
- don't use vmphyinv if you want to re-read te barcode of a tape - vmphyinv reads the LABEL on the tape, not the barcode
- once a tape has been named, you can not change its mediaID - only thing you can do is changing the its associated barcode .... reason why you had to delete the media from the base before having another inventory made (vmupdate or GUI)
- instead of creating media_id_barcode rules, you can configure your library for SHORT_LABEL. Most have this option, and would not give the L1, L2, D1, D2 associated with SDLT and LTO tapes.

Hope this helps.Message was edited by:
Laurent Dongradi

Stumpr2
Level 6
..Message was edited by:
Bob Stump