- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tape drive 0 and 0m deleted
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
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
08-04-2004 11:09 AM
08-04-2004 11:09 AM
tape drive 0 and 0m deleted
The tape I was working was perfectly fine. I was successfully able to put, see and extract files from tape. However, when I tried to put some huge files into it, I ran into the follwoing problem. I then noticed the filesystem / where /dev/rmt exists was 100% full. Then I deleted 0 and 0m using "rm 0" "rm 0m". This reduced the filesystem size back to normal. However, I think it has some undesired consequences.
This was performed prior to deleting 0 & 0m:
# sh backup.sh
a system01.dbf 532496 blocks
a tools01.dbf 26000 blocks
a rbs01.dbf 4179984 blocks
vxfs: mesg 001: vx_nospace - /dev/root file system full (1 block extent)
Tar: end of tape
Tar: to continue, enter device/file name when ready or null string to quit.
User entered a null name for next device file.
# tar tvf /dev/rmt/0m
rw-rw-rw- 104/101 272637952 Aug 4 16:13 2004 system01.dbf
rw-rw-rw- 104/101 13312000 Aug 4 16:13 2004 tools01.dbf
rw-rw-rw- 104/101 2140151808 Aug 4 16:13 2004 rbs01.dbf
Tar: error! blocksize changed
# sh coldbackup.sh
a system01.dbf 532496 blocks
vxfs: mesg 001: vx_nospace - /dev/root file system full (1 block extent)
Tar: end of tape
Tar: to continue, enter device/file name when ready or null string to quit.
User entered a null name for next device file.
#
Deleted 0 and 0m ...
Currently:
# tar -cvf /dev/rmt/0m wtmpreduce.sh
tar: cannot stat wtmpreduce.sh. Not dumped.
# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
tape 0 14/0/3.0.0 stape CLAIMED DEVICE HP C5713A
# rmsf -H 14/0/3.0.0
# insf -H 14/0/3.0.0
# insf -e
insf: Installing special files for phmem instance 0 address 0/0/1
< etc .............. >
# mt -f /dev/rmt/0m status
ioctl SIOC_INQUIRY: Not a typewriter
# mt -f /dev/rmt/0 status
ioctl SIOC_INQUIRY: Not a typewriter
# mt -f /dev/rmt/0mn status
ioctl SIOC_INQUIRY: Not a typewriter
# ls -il /dev/rmt/0m
140 -rw-r--r-- 1 root sys 10240 Aug 4 18:27 /dev/rmt/0m
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 11:18 AM
08-04-2004 11:18 AM
Re: tape drive 0 and 0m deleted
crw-rw-rw- 2 bin bin 205 0x030000 Oct 9 2003 /dev/rmt/0m
i.e., line should start with a letter c and should have a hardware number associated with it.
while you are running this command, something may be trying to force write into /dev/rmt/0m file as it lookslike it is about 10K-byte big from the output.
make sure nothing else is accessing this device before you run insf -e then try removing and recreating it again.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 11:34 AM
08-04-2004 11:34 AM
Re: tape drive 0 and 0m deleted
I did rm 0 and rm 0m ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 11:50 AM
08-04-2004 11:50 AM
Re: tape drive 0 and 0m deleted
Do another rmsf -H xxxxx
Next, do an ls -l /dev/rmt and post that
Next, do an insf -H xxxx.
Now do another ls -l /dev/rmt and post that. That will tell us if you are successful in creating your device nodes.
Your /dev/rmt/0m is currently a regular file NOT a character special device. The name /dev/rmt/0m means absolutely nothing. I could create a tape device node and call it "BillyBubba" and it would work just fine as long as it had the correct major and minor device numbers.
I suspect that all of your previous test that you thought were working were using regular files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 12:08 PM
08-04-2004 12:08 PM
Re: tape drive 0 and 0m deleted
Thanks a million for all the help! As said before I shall give points soon
Here is the result
total 40
-rw-r--r-- 1 root sys 10240 Aug 4 08:35 0
-rw-r--r-- 1 root sys 10240 Aug 4 18:27 0m
-rw-r--r-- 1 root sys 0 Aug 4 18:26 0mn
crw-r--r-- 1 bin bin 205 0xfffffe Nov 23 1999 stape_config
# insf -H 14/0/3.0.0
# ls -l /dev/rmt
total 40
-rw-r--r-- 1 root sys 10240 Aug 4 08:35 0
-rw-r--r-- 1 root sys 10240 Aug 4 18:27 0m
-rw-r--r-- 1 root sys 0 Aug 4 18:26 0mn
crw-r--r-- 1 bin bin 205 0xfffffe Nov 23 1999 stape_config
#
A while ago I created 0 and 0m using vi ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 12:12 PM
08-04-2004 12:12 PM
Re: tape drive 0 and 0m deleted
insf -e
run:
ioscan -fnC tape
This will list the device files associated with the tape drive. Since this tape drive is Instance(I) 0, the device files should include /dev/rmt/0m,0mn,etc... If you are not seeing any device files, there is something else going on.
You say that the tar command worked for you in the past, but it looks like the device files may not have existed. You should probably go back and check your tapes. If the device files didn't exist, the tapes won't contain the files from when you ran the tar commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 12:17 PM
08-04-2004 12:17 PM
Re: tape drive 0 and 0m deleted
I deleted 0 and 0m manually !!! Please read my first message again if you don't mind ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 12:39 PM
08-04-2004 12:39 PM
Re: tape drive 0 and 0m deleted
Here's the result
# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
tape 0 14/0/3.0.0 stape CLAIMED DEVICE HP C5713A
/dev/rmt/0mb /dev/rmt/c3t0d0BEST /dev/rmt/c3t0d0BESTn /dev/rmt/c3t0d0DDS /dev/rmt/c3t0d0DDSn
/dev/rmt/0mnb /dev/rmt/c3t0d0BESTb /dev/rmt/c3t0d0BESTnb /dev/rmt/c3t0d0DDSb /dev/rmt/c3t0d0DDSnb
0 and 0m doesn't showup. What could be happening?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 01:44 PM
08-04-2004 01:44 PM
Re: tape drive 0 and 0m deleted
/dev/rmt/0mnb /dev/rmt/c3t0d0BESTb /dev/rmt/c3t0d0BESTnb /dev/rmt/c3t0d0DDSb /dev/rmt/c3t0d0DDSnb
Insf is not creating /dev/rmt/0m because it already exists as a regular file. Rm /dev/rmt/0m before doing an insf. /dev/rmt/0 is not an HP-UX standard device node name; nor is /dev/rmt0 as is common on many UNIX flavors.
You can actually create you own device node the old-fashioned way, via mknod.
Do an ls -l /dev/rmt/c3t0d0BEST
and note the major and minor device numbers for this device. Probably 205 and 0x030000.
rm -f /dev/rmt/0m # get rid of the regular file
mknod /dev/rmt/0m c 205 0x030000
chmod 666 /dev/rmt/0m
ls -l /dev/rmt
You should see that c3t0d0BEST and 0m now have identical major/minor device number tuples. This is the way device nodes were created by real UNIX guys in the good old days before them new-fangled commands came along (which by the way are not always available on all platforms). That's why it's good to know just what those little numbers really do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2004 02:12 PM
08-04-2004 02:12 PM
Re: tape drive 0 and 0m deleted
find /dev -type f -exec ll {} \;
Remove any and all of those files. You may find them in /dev/rmt, and you might even see something like /dev/null2 or similar. Remove these mistakes.
Here's what happened: you ran a backup command but misspelled the device file name. You probably ran something like this:
tar cvf /dev/rmt/0 /some_big_directory
tar (and cpio and dump and pax, etc) are far too friendly to report your error. You meant to use the trape drive but you specified a non-existent filename, so tar created a simple file and stored everything you asked for into the /dev/rmt directory. tar did a disk-to-disk copy and filled the / filesystem where /dev is located.
Unix commands are a bit unforgiving in these cases. You MUST spell the name of the device file correctly, like /dev/rmt/0m which is definitely not the same as /dev/rmt/om although they look similar. tar will not try to find the tape drive.
Once you have removed the regular files from /dev, you can repair any missing files with the command:
insf -e
It will re-create any missing device files. To see the correct device file names for your tape drive:
ioscan -knfC tape
And to see the characteristics of each device file, use this command:
lssf /dev/rmt/*
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 03:20 AM
08-05-2004 03:20 AM
Re: tape drive 0 and 0m deleted
How to use the tape now. You are right!
tar -cvf /dev/rmt/0m /var/adm/syslog/syslog.log
a /var/adm/syslog/syslog.log 155764 blocks
/var/adm/syslog/syslog.log: file changed size
# bdf -bi
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol3 524288 132348 367446 26% 2201 97983 2% /
Now How do I send them to tape????
Please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 03:38 AM
08-05-2004 03:38 AM
Re: tape drive 0 and 0m deleted
insf -e -C tape
after you deleted /dev/rmt/0m?
Normally, /dev/rmt/0m is linked to /dev/rmt/c#t#/d#BEST. If you run "ls -li", you would see that these files normally have the same inode.
So, running:
tar -cvf /dev/rmt/C3t0d0BEST
is exactly the same as running:
tar -cvf /dev/rmt/0m
From your earlier posts, it looks like C3t0d0BEST exists. What happens when you run:
tar -cvf /dev/rmt/C3t0d0BEST
If this works, you can always link /dev/rmt/0m to this device file:
ln /dev/rmt/c3t0d0BEST /dev/rmt/0m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 04:09 AM
08-05-2004 04:09 AM
Re: tape drive 0 and 0m deleted
I tried C3t0d0BEST. But it's the same case. Filling up filesystem to 100%. That's probably not going to tape!!!
How to use the tape?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 04:23 AM
08-05-2004 04:23 AM
Re: tape drive 0 and 0m deleted
tar -cvf /dev/rmt/0m /var/adm/syslog/syslog.log
a /var/adm/syslog/syslog.log 155764 blocks
/var/adm/syslog/syslog.log: file changed size
# bdf -bi
Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol3 524288 132348 367446 26% 2201 97983 2% /
Now How do I send them to tape????
----
You already stored the syslog.log file onto the tape. Are you asking how to recover the diskspace now that you've copied the syslog file to tape? If yes, just type this command:
cat /dev/null > /var/adm/syslog/syslog.log
then
bdf /var
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 04:27 AM
08-05-2004 04:27 AM
Re: tape drive 0 and 0m deleted
Firstly, when the filesystem gets I am thinking the file is not going to tape but going to /dev/rmt. That means I am not actually using the tape.
And even by cp /dev/null to syslog, this is not going to help because it is the / that is full.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 04:28 AM
08-05-2004 04:28 AM
Re: tape drive 0 and 0m deleted
And the available space in / is 440 MB. This tells clearly that it's definitely not the tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:06 AM
08-05-2004 05:06 AM
Re: tape drive 0 and 0m deleted
Post following outputs:
1. # ls -al /dev/rmt
2. # ioscan -fn
That should help you give exact steps to follows and resolve the problem quickly.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:26 AM
08-05-2004 05:26 AM
Re: tape drive 0 and 0m deleted
Appreciate the rescue effort.
# ls -al /dev/rmt
total 12
drwxr-xr-x 2 root sys 1024 Aug 5 12:31 .
dr-xr-xr-x 22 bin bin 5120 Aug 5 12:31 ..
crw-rw-rw- 2 bin bin 205 0x030000 Aug 5 12:31 0m
crw-rw-rw- 2 bin bin 205 0x030080 Aug 5 12:31 0mb
crw-rw-rw- 2 bin bin 205 0x030040 Aug 5 12:31 0mn
crw-rw-rw- 2 bin bin 205 0x0300c0 Aug 5 12:31 0mnb
crw-rw-rw- 2 bin bin 205 0x030000 Aug 5 12:31 c3t0d0BEST
crw-rw-rw- 2 bin bin 205 0x030080 Aug 5 12:31 c3t0d0BESTb
crw-rw-rw- 2 bin bin 205 0x030040 Aug 5 12:31 c3t0d0BESTn
crw-rw-rw- 2 bin bin 205 0x0300c0 Aug 5 12:31 c3t0d0BESTnb
crw-rw-rw- 1 bin bin 205 0x030001 Aug 5 12:31 c3t0d0DDS
crw-rw-rw- 1 bin bin 205 0x030081 Aug 5 12:31 c3t0d0DDSb
crw-rw-rw- 1 bin bin 205 0x030041 Aug 5 12:31 c3t0d0DDSn
crw-rw-rw- 1 bin bin 205 0x0300c1 Aug 5 12:31 c3t0d0DDSnb
crw-r--r-- 1 bin bin 205 0xfffffe Nov 23 1999 stape_config
# ioscan -fn | grep -i tape
tape 0 14/0/3.0.0 stape CLAIMED DEVICE HP C5713A
#
Plain ioscan -fn gives a lot of other things. Tape related info is shown above
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:31 AM
08-05-2004 05:31 AM
Re: tape drive 0 and 0m deleted
Wise decision:
1. # cd /dev/rmt
2. # pwd
/dev/rmt
3. # rm * (be careful)
4. # insf -e
5. # ls -al /dev/rmt ( You see the devices files for Tape)
6. # ioscan -fnC tape ( This should show you the device files in /dev/rmt bound with the Tape device )
And there you are. Then post back the result.
This should work
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 06:50 AM
08-05-2004 06:50 AM
Re: tape drive 0 and 0m deleted
Thank you.
Did all 6 steps above ..
Here's the result
# ls -al /dev/rmt
total 12
drwxr-xr-x 2 root sys 1024 Aug 5 14:48 .
dr-xr-xr-x 22 bin bin 5120 Aug 5 14:48 ..
crw-rw-rw- 2 bin bin 205 0x030000 Aug 5 14:48 0m
crw-rw-rw- 2 bin bin 205 0x030080 Aug 5 14:48 0mb
crw-rw-rw- 2 bin bin 205 0x030040 Aug 5 14:48 0mn
crw-rw-rw- 2 bin bin 205 0x0300c0 Aug 5 14:48 0mnb
crw-rw-rw- 2 bin bin 205 0x030000 Aug 5 14:48 c3t0d0BEST
crw-rw-rw- 2 bin bin 205 0x030080 Aug 5 14:48 c3t0d0BESTb
crw-rw-rw- 2 bin bin 205 0x030040 Aug 5 14:48 c3t0d0BESTn
crw-rw-rw- 2 bin bin 205 0x0300c0 Aug 5 14:48 c3t0d0BESTnb
crw-rw-rw- 1 bin bin 205 0x030001 Aug 5 14:48 c3t0d0DDS
crw-rw-rw- 1 bin bin 205 0x030081 Aug 5 14:48 c3t0d0DDSb
crw-rw-rw- 1 bin bin 205 0x030041 Aug 5 14:48 c3t0d0DDSn
crw-rw-rw- 1 bin bin 205 0x0300c1 Aug 5 14:48 c3t0d0DDSnb
crw-r--r-- 1 bin bin 205 0xfffffe Aug 5 14:48 stape_config
# ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
======================================================================
tape 0 14/0/3.0.0 stape CLAIMED DEVICE HP C5713A
/dev/rmt/0m /dev/rmt/0mnb /dev/rmt/c3t0d0BESTn /dev/rmt/c3t0d0DDSb
/dev/rmt/0mb /dev/rmt/c3t0d0BEST /dev/rmt/c3t0d0BESTnb /dev/rmt/c3t0d0DDSn
/dev/rmt/0mn /dev/rmt/c3t0d0BESTb /dev/rmt/c3t0d0DDS /dev/rmt/c3t0d0DDSnb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 08:11 AM
08-05-2004 08:11 AM
Re: tape drive 0 and 0m deleted
Once the file has been copied to tape, you must remove the contents of the file, but NOT the file itself. Although the syslog file may get re-created if you remove it (depending on how old your software is), the simplest way is to replace the file. So the command:
cat /dev/null > /var/adm/syslog/syslog.log
Does NOT copy a file onto the end of syslog.log, it replaces the entire file with /dev/null--a special file that is zero-length. Once you issue the cat command as shown above, the syslog.log will be zero bytes long and bdf will show you now have more space available.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 08:15 AM
08-05-2004 08:15 AM
Re: tape drive 0 and 0m deleted
Appreciate your responses. First of all if I do a cat /dev/null > syslog it will break a truck load of nuisance on me because at this stage everybody is using it. Secondly, I used syslog only as an example. And morover it lies in /var/adm which I am unconcerned about.
At this point, I want to put files in tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 08:21 AM
08-05-2004 08:21 AM
Re: tape drive 0 and 0m deleted
bdf /dev/rmt
bdf /var
In Unix, when you specify a device file such as /dev/rmt/0m, this is a 'special' file that redirects the output to an I/O device. If you don't spell the name correctly, then there is nothing to redirect the output so the program creates a simple file and stores the data in that file (not what you want to do).
Wathc the lights on your tape drive. Use the mt command to move the tape so you can see that /dev/rmt/0m is indeed a connector to the tape drive, like this:
mt -f /dev/rmt/0m rewind
or
mt -f /dev/rmt/0m fsf
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 09:45 AM
08-05-2004 09:45 AM
Re: tape drive 0 and 0m deleted
cd /some_directory
tar cvf /dev/rmt/0m system01.dbf
and now the tape will blink for a long time. That means that the file has been copied to the tape. Your script that is being used to save the .dbf files probably has a spelling error for the device file which is why the / directory filled up.
Bill Hassell, sysadmin