Tape Logical Device Files

LTO Ultrium

As we may know already that, tape device are in “/dev/rmt” directory. Actually tapes creates symbolic links in the “/dev/rmt” directory to the actual tape device special files under the “/devices” directory tree. tapes searches the kernel device tree to see what tape devices are attached to the system.

Each tape LUN seen by the system is represented by 24 minor nodes in the form of /dev/rmt/N, /dev/rmt/Nb, and /dev/rmt/Nbn, where N is an integer counter starting from 0. This number is picked by devfsadm during enumeration of new devices. Every new tape logical unit number (LUN) found by devfsadm gets the next available number in /dev/rmt.

here are the tape  logical device with its description:

Device Description
0 SystemV (SysV)-style rewinding device with no compression. This is the standard tape device. When you use this device name, the tape rewinds when complete.
0b Berkeley-style rewinding tape device with no compression.
0bn Berkeley-style nonrewinding tape device with no compression
0c SysV-style rewinding tape device with compression.
0cb Berkeley-style rewinding tape device with compression.
0cbn Berkeley-style nonrewinding tape device with compression.
0cn SysV-style nonrewinding tape device with compression.
0h SysV-style rewinding tape device with high density.
0hb Berkeley-style rewinding tape device with high density.
0hbn Berkeley-style nonrewinding tape device with high density.
0hn SysV-style nonrewinding tape device with high density.
01 SysV-style rewinding tape device with low density.
0lb Berkeley-style rewinding tape device with low density.
0lbn Berkeley-style nonrewinding tape device with low density.
0ln SysV-style nonrewinding tape device with low density.
0m SysV-style rewinding tape device with medium density.
0mb Berkeley-style rewinding tape device with medium density.
0mbn Berkeley-style nonrewinding tape device with medium density.
0mn SysV-style nonrewinding tape device with medium density.
0n SysV-style nonrewinding tape device with no compression.
0u SysV-style rewinding tape device with ultra compression.
0ub Berkeley-style rewinding tape device with ultra compression.
0ubn Berkeley-style nonrewinding tape device with ultra compression.
0un SysV-style nonrewinding tape device with ultra.

Example:

#tar cvf /dev/rmt/0cbn /  {backup root (/) + no rewind + compress}
#tar cvf /dev/rmt/0 /  {backup root (/) + no compress + rewind tape when finished}

#mt -f /dev/rmt/0 offline   {rewind and eject the tape}
#tar cvzf /dev/rmt/0cbn /
#tar tvf /dev/rmt/0cbn   {to list the file in the archive}
#tar tf /dev/rmt/0
#tar xvf /dev/rmt/0        {retrieve/restore all file from tape}

tar -czf /dev/rmt/0cbn /home

ufsdump 0uf <target> <source>
ex:
ufsdump 0uf /dev/rmt/0 /home
ufsrestore -i

ufsrestore f /dev/rmt/0 filename   {restore filename}
ufsrestore rf sparc1:/dev/rmt/0 filename   {restore entire directory sparc1}
ufsrestore rf /dev/rmt/0  {restore the entire content on tape drive}

ufsrestore ivf /dev/rmt/0

Advertisement

One response to “Tape Logical Device Files

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.