LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-26-2007, 03:24 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Configuring the density of a tar device


Hi there --

I have been running a nightly tar backup script to a DDS-3 tape device for some time. Recently, I noticed the amount of data that is being backed up has exceeded the storage capacity of the DDS-3 device. I replaced the drive with a DDS-4 device capable of 40GB storage.

Last night's backup onto the new device failed supposedly because there was not enough space left on the device. Listed below is the output to the log file:

SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x26 (DDS-4 or QIC-4GB).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
tar: Removing leading `/' from member names
tar: /var/run/avahi-daemon/socket: socket ignored
tar: /var/run/dbus/system_bus_socket: socket ignored
tar: /var/run/sdp: socket ignored
tar: /dev/st0: Cannot write: No space left on device
tar: Error is not recoverable: exiting now

I ran the du and ncdu commands, and both indicated the amount of data that is to be backed up is no more than 27GB. Is there a way to configure the density of the device prior to or during the tar backup? The current syntax in the script is as follows:

sh -c 'tar -cf /dev/st0 $(cat /root/backup_list.txt)'

If the above is not the way to do it, the other approach I thought of was modifying the tar line shown above to read as follows:

sh -c 'tar -czf /dev/st0 $(cat /root/backup_list.txt)'
 
Old 06-26-2007, 04:12 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could use compression in the tar command with the -j -z options. The tar manpage lists the option -[0-7]lmh and says -[0-7]lmh changes the density and(sic) the drive. I assume that -m means medium density, and -h means high density.

What is the device (as in /dev/st???) that this tape player uses. There may be a corresponding readme file for the device in the linux Documentation directory (of the kernel source) that lists device options. ( You could look at the kernel source on your personal laptop or on the web instead of installing the kernel source on the server ) Sometimes documentation in the kernel provides additional information or at least more authoritive information, since it is more current and matches your kernel).
 
Old 06-26-2007, 04:34 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
I don't know if the following applies to you, but I realize that when I backup already compressed files to a dat drive which has hardware compression enabled, the resulting data is bigger than the original data.

This is because the hardware compression algorithm is dumb and it can not detect that data is already compressed.

anyway, try to disable hardware compression in your drive if you are backing up compressed data (JPEG, GIF, PNG, zip, gzip, etc)

to get hardware compression status:
Code:
root@bigslam:~>mt -f /dev/nst0 datcompression 1
Compression off.
root@bigslam:~>
to set data compression off, use count=0
Code:
root@bigslam:~>mt -f /dev/nst0 datcompression 0
Compression off.
root@bigslam:~>
any value other than 0|1 enables hardware compression.
 
Old 06-27-2007, 10:15 AM   #4
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
Thanks for your reply. I believe I discovered the problem to the backups. I manually ran the backup today using the following command syntax:

tar -czvf -7 /dev/st0 $(cat /root/backup_list.txt)'

During the backup I noticed the / directory eventually got filled to capacity. Shortly after that, I encountered the error message that I had mentioned in my original e-mail.

I ran the ncdu utility, and tracked down the file in question. It was a file that was associated with the backup. It's name was -7. I removed the file and was able to get free disk space made available.

There is not enough diskspace available in any directory for this file during the backup. Is there a way to do the backup without this file being created? Thanks.
 
Old 06-27-2007, 10:31 AM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
the arguments for tar are in a wrong order. The -f key expect the NEXT argument to be the destination of backup, the tape drive device /dev/st0, not another key....
The correct way should be:
Code:
tar -7 -czvf /dev/st0 $(cat /root/backup_list.txt)
(there is a extra single quote in your cmd line, too)

In your wrong cmd line, nothing was sent to tape. Instead, the backup was created in a file named "-7". That is why you get a big file in your filesystem.

I hope this is clear now.
 
Old 06-27-2007, 12:05 PM   #6
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
Hi there --

I have run into another problem: I entered in the correct syntax:

tar -7 -czvf /dev/st0 $(cat /root/backup_list.txt)

and the error message I get is:

Options '-[0-7][lmh]' not suppored by *this* tar

The version of tar that I am using is GNUtar 1.16. Has anyone seen this, and know how to get around it? Thanks.
 
Old 06-27-2007, 12:20 PM   #7
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
Don't bother yourself with this density option.
I may be wrong, but density option is kind of deprecated now. It was useful on older QIC tapes but with modern DAT drives it is useless.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
LXer: Condor Engineering Introduces New High Density ARINC 429 Interface for PC/104-Plus LXer Syndicated Linux News 0 01-24-2006 10:16 PM
tar: /dev/nst0: Cannot open: No such device evallejo Linux - Software 4 09-02-2004 03:00 PM
High Density PC133(256MB) in PII 400mhz with PC100 slots?? flamesrock Linux - Hardware 1 08-26-2004 03:54 PM
Why the density makes so much difference? dj_relentless General 3 04-30-2002 03:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration