Re: Mounting a Tape Drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 18, 2004 at 12:41:22AM -0700, Celine Neo wrote:
> I urgently need to mount my tape drive as i need to do
> backup. But after reading from quite a few sources, I
> am getting more confused.

Let's see if we can summarize.  (I'll be simplifying a bit.)

A device in Uni--er, Linux--is a special file, usually stored in the /dev
directory.  A special file doesn't actually point to any disk storage.
Instead, it contains special information (major and minor device numbers)
that lot the kernel determine which driver and settings apply to it.  This
special file is created by the "mknod" command, which accepts (in its most
minimal form) options of the form:

   mknod tape c 37 0

which would, in the current directory, make a tape device of type
character (AFAIK, all tape devices are 'character' devices, as opposed to
'block' devices.  Don't worry about that now.), with a major device number
of 37--that tells the kernel this IS a tape device, and what kind--and
a minor number of 0--which tells the kernel *which* tape device of that
type this is.

So, a tape device created in this manner would show up in the /dev
directory as:

   crw-rw----    2 root     disk      37,   0 May  5  1998 tape

The important thing to note is that the "37,0" is the major/minor device
number for a tape device, *on this particular system*.  It can change,
depending on the version of the kernel and who built it.

One of the difficult things on Unix/Linux systems has always been to
determine that major/minor device number pair.  To make this easier,
the MAKEDEV script was created.  It's stored in the /dev directory, and
basically will figure out for you what the major and minor devices for
given devices are on your system.  To really understand this command,
read the man page--"man MAKEDEV".

The biggest difference between Unix/Linux and "traditional" operating
systems is that tape devices aren't really mounted.*  They don't contain
a filesystem; usually, it's some form of archive, or even just files.
(You may ask how the system manages multiple users requesting the tape
drive.  A good question; there have been various schemes over the years
to handle that.  The kernel doesn't.)

SO--create the device.  Then use it as input or output, or an option, to
whatever command is needed to store or extract data.  That's all.

Now, looking at your post in light of what we just wrote:

> To mount a device, I must first define a mount point,
> right? For this case, this is what i have define in
> /etc/fstab (I don't know if this correct)

No.  Only mountable disks.
> Then I use this command --> mount /mnt/tape
> and it says "mount: special device /dev/tape does not
> exist"

Just skip this.

> So I continue searching and ooe of the site says must
> create device entry by doing --> /dev/MAKEDEV
> 
> So I followed, I did a --> /dev/MAKEDEV tape

Well, I hope you were *in* the /dev directory; otherwise MAKEDEV created
a tape special device in the current directory.  OTOH, I kind of hope
you WEREN'T in the /dev directory--because your tape device was probably
already there, and is more likely correct than what you created.

> After this command, the /dev created "tape-d" and
> "tape-reset". But where is the "tape" that I have
> asked for?

Ok, MAKEDEV decided you have a qic tape drive.  Try to recall what your
current directory was when you ran MAKEDEV, and go clean up all the
special files it created there.

> And now I am stucked. =(

Ok, now you have some serious decisions to make, since there's no single
or even default backup scheme built into Linux.  A look at the Linux FAQ:

    4.3. How To Make Backups.

    You can back up a directory hierarchy or complete file system to
    any media using GNU tar or cpio, the standard *nix tools for this
    purpose.  tar seems to be the more commonly used program currently,
    and includes command line options to make compressed, incremental,
    and multi-volume backups. Complete information is contained in the
    documentation, which is in GNU Texinfo format.

    The free program, Amanda, receives a lot of mentions on Usenet. Its
    home page is http://www.amanda.org/.

    Several commercial backup utilities also exist. They are often
    included in commercial distributions.

Note that I'll comment here that Amanda is probably NOT what you
want--it's not trivial to set up.

> Someone pls help me.

The simplest way to get a quick and dirty backup:

	cd /
	tar cvf /dev/tape /

Note that I am NOT recommending this as your backup scheme.  But it WILL
at least stick a copy of your data to tape.

I'm assuming you're using Redhat, and it's a recent release, and you're
working in X-windows.  Look at the documentation that came with your
system to see what they recommend for backups; it probably won't
be the best solution, but it should work.

Otherwise, take a look at groups.google.com, and use "Linux backup"
as your search terms.  The fourth hit will have a title "RE: Is there
a Red Hat Linux Backup like MS-Backup?".  Go read that thread.

Good luck,
-- 
	Dave Ihnat
	ignatz@xxxxxxxxxx


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux