Fedora This forum is for the discussion of the Fedora Project. |
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.
|
|
06-26-2007, 03:24 PM
|
#1
|
Member
Registered: Nov 2003
Posts: 809
Rep:
|
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)'
|
|
|
06-26-2007, 04:12 PM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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).
|
|
|
06-26-2007, 04:34 PM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
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.
|
|
|
06-27-2007, 10:15 AM
|
#4
|
Member
Registered: Nov 2003
Posts: 809
Original Poster
Rep:
|
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.
|
|
|
06-27-2007, 10:31 AM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
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.
|
|
|
06-27-2007, 12:05 PM
|
#6
|
Member
Registered: Nov 2003
Posts: 809
Original Poster
Rep:
|
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.
|
|
|
06-27-2007, 12:20 PM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 04:56 PM.
|
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
|
|