cancel
Showing results for 
Search instead for 
Did you mean: 

available_media command not working

chrislogo
Level 5
I am getting below error while running available_media


===========================================

[root@kodiak tmp]# available_media
tail: cannot open `+3' for reading: No such file or directory
media   media   robot   robot   robot   side/   ret    size     status
 ID     type    type      #     slot    face    level  KBytes
----------------------------------------------------------------------------
/bin/cat: /tmp/avail_media_sorted_output: No such file or directory
===========================================


Netbackup master server version - 6.5.4
OS version - Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel Version - Linux kodiak 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Any help would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions

CRZ
Level 6
Employee Accredited Certified
Check the following TechNote for more info:

Installation of the NetBackup master or media server on Linux fails with error: "tail: cannot open '+2' for reading" 
 http://support.veritas.com/docs/302582

You will need to find ALL of the commands (tail, sort, &c.) in the script and change them, or change your environment variable _POSIX2_VERSION as described in the TechNote.

View solution in original post

9 REPLIES 9

sunbird
Level 4
Solution:
The available_media script will fail because of some changes made to the Linux Red Hat Enterprise Server 5.0 commands parameters. Customers should be able to change the available_media script with the following suggestions:
  • Removed sort variables from script
  • Changed tail and used head instead
To learn more about the cause of this specific issue, refer to TechNote 302582 (linked below).

http://library.veritas.com/docs/302582

dltsc
Level 4
Partner
You can quickly fix this error by modifying the script.  Look for the line that uses tail and change it from "tail +3" to "tail -n+3"

chrislogo
Level 5

now am getting belwo error

===================================================
[root@kodiak tmp]# available_media
media   media   robot   robot   robot   side/   ret    size     status
 ID     type    type      #     slot    face    level  KBytes
----------------------------------------------------------------------------
/bin/cat: /tmp/avail_media_sorted_output: No such file or directory

===================================================


just the line tail: cannot open `+3' for reading: No such file or directory disappeared from previous error


 

se7en
Level 3
Partner Accredited
.

CRZ
Level 6
Employee Accredited Certified
Check the following TechNote for more info:

Installation of the NetBackup master or media server on Linux fails with error: "tail: cannot open '+2' for reading" 
 http://support.veritas.com/docs/302582

You will need to find ALL of the commands (tail, sort, &c.) in the script and change them, or change your environment variable _POSIX2_VERSION as described in the TechNote.

chrislogo
Level 5
 

Marianne
Level 6
Partner    VIP    Accredited Certified
About: /bin/cat: /tmp/avail_media_sorted_output: No such file or directory
Is your TMPDIR variable set to /tmp? NetBackup needs to use it as working directory for temp files.

CRZ
Level 6
Employee Accredited Certified
You say you changed the environment variable - could you please confirm that that did get the script working again?

(Also, as much as I hate seeing people do this here on Connect, I'd really appreciate if you could mark my reply as the solution if that DID fix it...so we can shut down this discussion.)

chrislogo
Level 5
Set the variable and  added  to below file 

=======================================

[root@kodiak ~]# cat .bashrc
# .bashrc
 
# User specific aliases and functions
 
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
export _POSIX2_VERSION=199209
 
 
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
[root@kodiak ~]#
======================================