1820733 Members
3143 Online
109627 Solutions
New Discussion юеВ

Tar error

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

Tar error


I am rying to create a tape with tar, but i have that error

# tar -cvf /dev/st0 /tmp
tar: /dev/st0: Cannot open: Read-only file system

Can u help me?
7 REPLIES 7
Huc_1
Honored Contributor

Re: Tar error

I think the command is correct you probably have the write ring on

to find out if you tape is alright you could enter the command

#mt -f /dev/st0 status

J-P
Smile I will feel the difference
Edwin Ruiz_2
Super Advisor

Re: Tar error

i have that error now

mt command not found.. i h ve redhat linux 7.2

thans
Huc_1
Honored Contributor
Solution

Re: Tar error

Ruiz,

You should be able to see your tape by typing the following command

#cdrecord -scanbus

and also check the device protection they should be as follow

crw-rw---- 1 root disk 9, 0 Jan 30 2003 /dev/st0

please also check that you dont have the write notch (ring) set on so that the tape is mounted in read only !

never mind if you do not hane mt

J-P
Smile I will feel the difference
Mark Grant
Honored Contributor

Re: Tar error

I don't think you should be getting that error if the tape is read only because it says you have a filesystem there unless that is a little buggling in Linux. You don't happen to have something mounted on /dev/st0 do you (df to check).
Never preceed any demonstration with anything more predictive than "watch this"
Edwin Ruiz_2
Super Advisor

Re: Tar error

I dont heve nothing mounted on it
Huc_1
Honored Contributor

Re: Tar error

Ruiz,

the following command should return you some output

#dmesg | grep -i "st0"

also tell use what

# ls -l /dev/st0

return to your screen

It is funny Because Mark is right the message if this is a write ring problem would be different.

I am asking the above because I do not realy understand where the problem is

J-P
Smile I will feel the difference
Gopu Bhaskar
New Member

Re: Tar error

The problem might be due to the tape being write protected. Check whether the tape has write protection. I got exactly the same error, due to the same reason.
HTH,
Gopu Bhaskar.