| When I tar files to tape (sco 5.04) I get a response indicating the blocking
| size is 10K (jives with /etc/default/tar=20); however as the files are
| written to tape the report the file name and number of blocks indicates 512
| byte blocks.
|
| example:
| -rw-rw-rw- 1 root sys 1058208 Jun 4 15:55 CC9_0011.prt
| eps:ttyp3# tar cv7 CC9_0011.prt
| Volume ends at 7899999K, blocking factor = 10K
| a CC9_0011.prt 2067 tape blocks
| eps:ttyp3#
|
| 1058208/2067 = 512
Semantic overload. Files on the hard drive ocuupy blocks of 512 bytes
each.
Tar archives are written (or read) at some "blocking" number of bytes at
a time. In the case of 'b 20', tar will deal with the tape in hunks of
10k at a time.
Consider also the dd command.
If you want to copy a file to a floppy, and do it this way:
dd if=some_file of=/dev/rfd0
it will take some time. You will notice considerably faster
execution if you do instead
dd if=some_file of=/dev/rfd0 bs=18k
IOW, in the case of tar, or dd, think of the blocking size as a
large buffer that the device drivers attempt to digest at one gulp.
This will also affect the total amount of bytes written to the archive.
Now on a tape, you can't really see this effect, but try this experiment,
using purely empty files as archive fodder:
# touch a b c
# tar cvfb 2tar 2 a b c
a a 0 tape blocks
a b 0 tape blocks
a c 0 tape blocks
# tar cvfb 20tar 20 a b c
a a 0 tape blocks
a b 0 tape blocks
a c 0 tape blocks
# l *tar
-rw-r--r-- 1 root sys 10240 Jun 4 19:41 20tar
-rw-r--r-- 1 root sys 3072 Jun 4 19:41 2tar
--