bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] Spanning multiple hard disks using tar


From: Wayne Liu
Subject: [Bug-tar] Spanning multiple hard disks using tar
Date: Mon, 3 Jul 2006 10:04:02 -0600

My company is developing a new tape-replacement technology based on removable hard disks. While testing spanning an archive over multiple removable HDs, I had some interesting observations that I couldn’t quite explain. So I am writing to this mailing list, and hope to hear directly from tar experts about what behind the behavior of tar I have seen as well as what is the best way to use tar in my case.

(Need to mention that I did some research on the web. But among the references I have found, there are a few mentioning of Zip drive and removable hard disks, but most seems to be projected out of past experience using tape/floppy instead of real experience using removable disks.)

 

First, some background information:  My backup drive is on /dev/sda, which, instead of taking tape cartridges, accepts removable hard disks. The hard drive shows up in the system as a SCSI hard disk (/dev/sda).  All my removable hard disks have a single partition, and may be formatted to different file systems (FAT16/32 or ext2/ext3).

 

1. I tested creating the archive by writing directly to the partition handle directly, or to a tar file on the partition using the following commands:
- "tar -Mcvf /dev/sda1 file-list”     (this treats the hard drive like a tape drive).
- "tar -Mcvf /media/disk/tar_file_name file-list"     (the partition is mounted under /media/disk).

 

Both command formats successfully wrote the archive to the RDX cartridge, and read/extract it back. Note that the partition is not mounted when using the partition handle as the tar destination since writing to the partition handle destroys the file system.

 

In both cases, if the archive is bigger than a single disk, tar prompted for the second/third volumes after it has filled a cartridge. After I ejected the cartridge and inserted a new one (which must be mounted at the same point), tar completed the archive without error.

 

2. The following commands are used to extract contents of the archive:

- "tar -Mxvf /dev/sda1”
- "tar -Mxvf /media/disk/tar_file_name"

 

In both cases, tar prompts for the second volume after it has extracted the content from the first. However, after a new cartridge is inserted (and mounted if necessary), tar always gives an error on the second volume: "tar: This volume is out of sequence".     I checked the second partition (tar -t ..), and the second archive looks fine. I also tested it on different file systems: FAT32, ext2, ext3. All failed the same way.

 

Interestingly, the extraction worked if the cartridge is formatted as FAT16!

3. I was able to get the extraction working by adding a "-L N" option to the write pass, which tells tar to change volume after N blocks. But there are a few catches here:

-  N must be smaller than the available blocks on the partition (partition size minus the file system, etc).

-  Also, the archive must be written to a file on the partition. If the archive is written to the partition handle, the write pass works fine. But it seems tar couldn’t figure out the end of the volume on the extraction pass and read right through it (-L does not work on the read pass). The result is that tar exits with an error, such as invalid headers, etc.

 

I would greatly appeciate if someone can shed some lights into why tar works, or doesn’t work, as I have seen. I am also hoping to find a way to NOT use the “-L N” option since it is always a hassle to determine the value of N on the fly (especially when my HDs have different capacities).

 

Thanks in advance.

 

Wayne

 

_____________________________

address@hidden

ProStor Systems, Inc.

5555 Central Ave. Suite 100

Boulder, CO 80301

(303) 545-2535 x236

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]