- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: best way to identify tape device attributes in...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:20 AM
тАО04-02-2002 05:20 AM
We have a script that we use to create a bootable/installable Ignite-UX DAT tape. We need the ability to properly check for the "norewind" option in the script.
Is there a way to use the major/minor number info to determine if a user entry (manually typed in) is for a tape device file that uses the "norewind" option?
We do not want to rely on the last character of the device file as the indicator (all the device files we have that are norewind have an "n" as the last character).
We prefer using the information contained within the major/minor number fields of an ls-al output.
So, for example, in the list below, how do we decode the info for the c3td0BESTn device file (205 0x033040), or the 3mn device file (205 0x0230c3) to be sure it is a "norewind" device file? What in the info shows that the device file is "norewind", or that it is Berkeley...?
# pwd
/dev/rmt
# ls -al
crw-rw-rw- 1 root root 205 0x023084 Apr 1 16:06 3c
crw-rw-rw- 1 root root 205 0x0230c4 Apr 1 16:06 3cn
crw-rw-rw- 1 root root 205 0x023083 Apr 1 16:06 3m
crw-rw-rw- 1 root root 205 0x0230c3 Apr 1 16:06 3mn
crw-rw-rw- 1 bin bin 205 0x033000 Mar 20 08:42 c3t3d0BEST
crw-rw-rw- 1 bin bin 205 0x033080 Mar 20 08:42 c3t3d0BESTb
crw-rw-rw- 1 bin bin 205 0x033040 Mar 28 15:15 c3t3d0BESTn
crw-rw-rw- 1 bin bin 205 0x0330c0 Mar 20 08:42 c3t3d0BESTnb
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:32 AM
тАО04-02-2002 05:32 AM
Re: best way to identify tape device attributes in a script
Two Points.
1. Why no rewind on a ignite tape - tapes are cheap - one make recovery / tape.
2. Why user input on device file? - users will mess thing up - just script the correct device file - test it and it will not go wrong.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:47 AM
тАО04-02-2002 05:47 AM
Re: best way to identify tape device attributes in a script
Thanks for the point, but are there reasons as to why you are seeking this solution?
The more info the forum has the better we can help.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:51 AM
тАО04-02-2002 05:51 AM
SolutionSee man lssf on device file listing.
sysadmin@N-0/>lssf /dev/rmt/0m
stape card instance 3 SCSI target 3 SCSI LUN 0 at&t best density available at address 1/2/0/0.3.0 /dev/rmt/0m
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 05:58 AM
тАО04-02-2002 05:58 AM
Re: best way to identify tape device attributes in a script
stape card instance 0 SCSI target 3 SCSI LUN 0 at&t no rewind best density available at address 0/0/1/0.3.0 /dev/rmt/1mn
lssf /dev/rmt/1m
stape card instance 0 SCSI target 3 SCSI LUN 0 at&t best density available at address 0/0/1/0.3.0 /dev/rmt/1m
Then:
CANREW=`lssf $tape | grep -c "rewind"`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 06:32 AM
тАО04-02-2002 06:32 AM
Re: best way to identify tape device attributes in a script
Note also that no-rewind implies specific tape positioning and the default AT&T behavior for no-rewind can best be described as bizarre. If you must position the tape to an exact location, always use the Berkeley device files with no-rewind. The info is in: man 1 mt and more details are found in: man 7 mt, specifically the Tape Behavioral Characteristics section.
Berkeley device files can be created with insf or mksf if needed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2002 08:26 AM
тАО04-02-2002 08:26 AM
Re: best way to identify tape device attributes in a script
I couldn't remember the 'lssf' command!
FYI: The "no rewind" option is needed when creating a bootable/installable DAT tape, so that when 'dd'ng the bootlif file to tape at 2k block size, the tape doesn't rewind before 'dd'ng the golden image file to tape (10k block size)
We have more than one DDS tape drive attached to some workstations, so it is necessary to check the user entry for the tape device they want to use when creating the boot/install tape. It is not common to use a "no rewind" tape device, so that is why we need to check the user's entry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2002 04:04 AM
тАО04-03-2002 04:04 AM
Re: best way to identify tape device attributes in a script
Make_tape_recovery does what you are doing by default and creates a bootable tape.
Command for full vg00 Mkae recovery.
/opt/ignite/bin/make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn
HTH
Paula