- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Tape device path
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
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
тАО06-15-2009 01:52 AM
тАО06-15-2009 01:52 AM
Tape device path
#dmesg |grep tape
Attached scsi tape st0 at scsi1, channel 0, id 5, lun 0
st0: Write not multiple of tape block size.
I assume the drive is attached to the device path /dev/st0 of my server , then I tried tar -cvf /dev/st0 /tmp , but I found that the file is backup to the file /dev/st0 but not the tape drive , can advise how can I know what device path that attached ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 02:01 AM
тАО06-15-2009 02:01 AM
Re: Tape device path
You should verify if the axtual device file is created - perhaps it creates it elsewhere.
You should also see it in /sys tree. As a last resort you can find it using device numbers in /dev.
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2009 02:06 AM
тАО06-15-2009 02:06 AM
Re: Tape device path
I like to use lshw. Not all Linux distributions install it by default unfortunately, but you can find an rpm or the source for it easily enough on google.
In this case I would do:
[root@sdltrng01 ~]# lshw -class tape
*-tape
description: SCSI Tape
product: DLT7000
vendor: QUANTUM
physical id: 0.6.0
bus info: scsi@0:0.6.0
logical name: /dev/nst0
logical name: /dev/st0
version: 296D
serial: CX905S6032
capabilities: removable
configuration: ansiversion=2
Which gives me the appropriate take device names for the norewind device (nst0) and the rewind device (st0). Yours may be different.
If you have a tape loaded you can test the device is online and the tape is visible with the command:
[root@sdltrng01 ~]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x1b (DLT 35GB).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
The mt command on Redhat comes with the mt-st RPM package.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 12:02 AM
тАО06-16-2009 12:02 AM
Re: Tape device path
with your method , I checked that the device path is /dev/nst0 , I can eject the tape from this device so I sure the device path is correct .
#mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (50000):
DR_OPEN IM_REP_EN
But however , when I tried to tar files to it , it didn't allow to do it , can advise what is wrong ? thx
#tar -cvf /dev/nst0 /tmp
tmp/test
tar: /dev/nst0: Wrote only 0 of 10240 bytes
tar: Error is not recoverable: exiting now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 12:06 AM
тАО06-16-2009 12:06 AM
Re: Tape device path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 12:24 AM
тАО06-16-2009 12:24 AM
Re: Tape device path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 02:02 AM
тАО06-16-2009 02:02 AM
Re: Tape device path
I can eject the tape by mt -f /dev/st0 offline , the device path must correct , but when tar file to it "tar -zcvf /dev/st0 file" , I found there is a file /dev/st0 created , it seems not write to the tape , can advise what is wrong ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2009 06:50 AM
тАО06-16-2009 06:50 AM
Re: Tape device path
# ls -l /dev/*st0
crw-rw---- 1 root disk 9, 128 May 19 10:39 /dev/nst0
crw-rw---- 1 root disk 9, 0 May 19 10:39 /dev/st0
If they don't begin with "c" then this is potentially your problem. Are you able to reboot this system? If so then remove these device files and reboot and the devices should be recreated for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2009 12:35 AM
тАО06-19-2009 12:35 AM
Re: Tape device path
I will reboot it later for creating /dev/st0 .
But I am wonder in my system , there is /nst0 , is it also the tape drive path ? if yes , why I am unable to write files to the tape ?
#ll /dev/nst0
crw-rw---- 1 root disk 9, 128 Jun 25 2004/dev/nst0
#tar -cvf /dev/nst0 /tmp/*
/tmp/file.txt
tar (child): /dev/nst0: Wrote only 0 of 10240 bytes
tar (child): Error is not recoverable: exiting now
Broken pipe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2009 01:11 AM
тАО06-19-2009 01:11 AM
Re: Tape device path
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2009 01:27 AM
тАО06-19-2009 01:27 AM
Re: Tape device path
Hm, yes something is still not right as it should work ok with the nst0 device you have now.
What strikes me as odd is the result of the of your mt status. Are you sure you have a tape in there and the tape is good? The status code you're seeing DR_OPEN = "Door is Open", which depending on the tape drive you have usually means there is no tape present.
The status codes I see on an mt status on a system here are BOT ONLINE IM_REP_EN where:
BOT = Beginning of Tape
ONLINE = The drive has a tape in place and ready for operation.
Have you checked your tape drive to make sure there are no warning lights/indicators? Maybe you have a hardware fault. If that's ok then try changing the tape for another one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2009 02:18 AM
тАО06-19-2009 02:18 AM
Re: Tape device path
I have just reboot the server , but still can't find /dev/st0 in my server ,
I 100% sure the drive is properly work, as I everyday backup it by ARCserver .
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2009 03:44 PM
тАО06-19-2009 03:44 PM
Re: Tape device path
How about this:
tar -cvf /dev/st0 / > /var/log/backup.log
(point the log file redirect where ever you want of course, or not)
This works fine on an older RH 7 box.