Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-27-2006, 12:13 AM
|
#1
|
LQ Newbie
Registered: Jul 2006
Posts: 13
Rep:
|
How to remove some files from tape
I just try to erase the tape but it take along time so i want to remove only some files in there for more space.
Can I do that and how ?
Thanks...
|
|
|
07-27-2006, 12:44 AM
|
#2
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
Presumably by scrolling (rewinding/fast-forwarding) the tape into the correct position after which deleting (writing null?) over the wanted data..
Actually my only contact with tape drives has been when I created a small backup-scriptlet-system for a small server, so it doesn't help much  but the above is what I could think of..
|
|
|
07-27-2006, 12:45 AM
|
#3
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
A tape drive is not a random-access media. As I understand it, your data must be continuous. (I may be wrong, but a quick google makes me believe this)
|
|
|
07-27-2006, 04:27 AM
|
#4
|
LQ Newbie
Registered: Jul 2006
Posts: 13
Original Poster
Rep:
|
Thanks i just testing and now i understand. so I want to ask
if I starting with tar command for backup a file and next day i want to backup another file at that time I must use
mt with fsfm Forward space count files The tape is positioned on the last block of the previous file.
for a next file right?
|
|
|
07-27-2006, 04:51 AM
|
#5
|
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
|
perhaps each write makes an eof marker. then when a new data is to be written, the tape searches for the last eof mark then writes data after it. that's just an idea.
|
|
|
07-27-2006, 05:03 AM
|
#6
|
LQ Newbie
Registered: Jul 2006
Posts: 13
Original Poster
Rep:
|
Thanks very much now i'm trying
|
|
|
07-27-2006, 05:14 AM
|
#7
|
LQ Newbie
Registered: Jul 2006
Posts: 13
Original Poster
Rep:
|
Konsolebox!
First I use tar cvf /dev/st0 test
then I use mt -f /dev/st0 eof
or mt -f /dev/st0 weof
or mt -f /dev/st0 wset
and then i use tar tvf /dev/st0 to view the content of tape, I see nothing
so how do i can set eof for this file and make a backup for next file
Last edited by angelfire; 07-27-2006 at 05:15 AM.
|
|
|
07-27-2006, 05:20 AM
|
#8
|
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
|
ouch! hey i told you that it was just an idea  . try to find some manuals with google. do search 'linux tape' and sometimes also add the word 'howto'. that might help you.
i don't have and i haven't seen yet a tape btw.
|
|
|
07-27-2006, 05:30 AM
|
#9
|
LQ Newbie
Registered: Jul 2006
Posts: 13
Original Poster
Rep:
|
yes i just testing now
|
|
|
07-27-2006, 05:47 AM
|
#10
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
I considered this tape thing again, reading Matir's post. Then I recalled this Windows software Veritas Backup Exec for Windows, which allows you to restore only certain files from the tape. Ok. That's where I think the illusion came; but if we think about how a tape works (like a sound tape, it's basically the same thing):
to put something on it (record), you have to rewind it so there's tape left first. Then recording is started - the tape is scrolling while the data (like sound) is recorded. Once the tape is at the end or somebody stops recording, tape stops. Then I can rewind again, press play and listen to the stuff that was recorded on it; I can even stop in the middle of the recording, press recording on and start adding new content, but if it isn't exactly the length of the old data, it either overwrites something I didn't want it to, or stops too early leaving some old data after it.
The data indeed has to be continuous, if the data tapes are like any tape is (and I think this is the case, like Matir noticed). It means the data can be read from anywhere inside the stream (and if there are EOFs or some other marks, a computer program would know when to stop reading, thus making it possible to copy certain files off the tape), and even recorded, but the new recorded data may not be the same size as the "original" one, so it leads to corrupted data streams (either data streams, or "files", without a start or without a proper end or EOF) unless the newly written data is exactly of the same length than the original one.
A simple example: let aaabbbccc be the contents of a tape, with three files, aaa,bbb and ccc. For simplicity, let's not think about EOFs or other stuff alike, let's just imagine your pc knows where the files end and where they begin.
Now if you wanted to replace the file bbb with a newer file ddd, and they were exactly of the same size, you'd get aaadddccc which includes three perfect files. Yes, trick done.
If you instead wanted to replace the file bbb with a smaller file ee, the result was aaaeebccc where there would be a broken piece of file, b. No good.
If you instead wanted to replace the file bbb with a larger file ffff, the result was aaaffffcc, and again you would have a broken piece of file, cc this time. No good again.
Conclusion: from a data tape, single files can be read out but not written in, unless you have a tool that can move all the rest of the data forward on the tape, and that means actually re-recording the tape all over from the point where the added new file ends. I'm not aware if such a software exists, and even if it does, it'd sound easier for me to just write at the end of the existing data and once the tape is full, start from the beginning (or buy a new one; the tapes are cheaper than the valuable information on them, and if they're not -- you think the tapes are too expensive -- you really don't need a backup system really)
EDIT: A backup is usually a backup of some certain moment of time. Thus updating only some files on the backup sounds odd, since the other content is not of the same age, so actually it's not a backup, but a copy storage.
Last edited by b0uncer; 07-27-2006 at 05:51 AM.
|
|
|
All times are GMT -5. The time now is 04:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|