Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
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.
Distribution: Solaris 9, FreeBSD 4.10, Slackware, RedHat, Knoppix,
Posts: 84
Rep:
well you need it when u store multiple records in the tape drive
each record is ended by an EOF mark
so when u fsf (forward) it by 1, it goes to the beginning of the 2nd mark (incase u r at the first mark)
like
mt -f /dev/st0 rewind (will bring u to the beginning of the first data set)
mt -f /dev/st0 fsf 1 (will forward u to the beginning of the 2nd data set)
fsf means forward by count
check "man mt" for all the options
also u can do it only if u store multiple record set in the device which is done by setting the no rewind option while writting to it - otherwise it rewinds automatically to the beginning "n" is for no rewind
like in solaris (not sure abt linux ) u do this to stop it from rewinding
/dev/rmt/0mn (m=write with medium density and n = no rewind)
so the count after weof should be always 1 or an index of the current file
i mean after first backup i write
weof 1
after the seconed backup what it should be weof 1 or 2 ?
and when i write the eof should i use st0 or nst0 coz i saw some scripts that use nst0 to write the backup
and st0 to write the EOF ?
another question is about how to know that i reached the end of the tape ? or can i know if the remaining space is enough for the file that i am going to write ?
Distribution: Solaris 9, FreeBSD 4.10, Slackware, RedHat, Knoppix,
Posts: 84
Rep:
hi
weof is used to write "eof" marks. so if u execute the weof 2 command - it ll write the 2nd eof mark at that location in the device.
st0 is the name of the device
nst0 (i assume) means the device in "no rewind" mode - the one which u wud be using
lets say u have to backup data at the end of each day
monday = u backup the data and that would write 1 eof mark (in a norewind mode)
so at this point of time if u do fsf 1 it ll point to the begiing of the second data (which does not exist yet)
tuesday = u backup data again in a no rewind mode
wed = <repeat>
now lets say u want to restore the data of tuesday
u rewind the tape and do a "fsf 1" and then restore it
checking space can be done using df command (please try and check it)- though i have never done that coz ufsdump itself specifies when the disk is full and loads another tape drive incase of autoloader tape devices
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.