>I am using pkgtrans to transfer a couple of packages from disk to DAT tape
>on a Sun Ultra
>with Solaris 2.5.
>Total package size is about 32 Mb.
>However, pkgtrans cannot put the packages in a single 4GB cartridge, and
>asks for a second one.
>Using 2 cartridges, the packages are transferred and can be read.
>However, I do not not like very much the idea of spending 8GB tape capacity
>to distribute just 32 MB of data...
>Using the -s option of pkgtrans makes no difference.
>The packages were generated by pkgmk, and I have tried all possible pkgmk
>options I am aware of as well.
>The DAT unit is in order, it is used to store much bigger tar files without
>any problems, always as /dev/rmt/0
>However, if I translate to /dev/rmt/0h the packages fit in a single tape,
>but the process takes too much time (about 15 minutes!) and often reports
>write errors.
>May it be possible that pkgtrans uses a block size different from tar? How
>do I check/correct this?
>
>Packages are 32 Mb......
>orca>du -k -s GPPWs GPPSrv
>12616 GPPWs
>19504 GPPSrv
>
>But pktrans does not believe so....
>orca>pkgtrans . /dev/rmt/0 GPPSrv GPPWs
>
>Insert a tape into Tape Drive.
>Type [go] when ready,
> or [u] to unload/offline the tape,
> or [q] to quit: go
>Transferring package instance
>Transferring package instance
>
>Insert tape 2 of 2 into Tape Drive
>Type [go] when ready,
> or [u] to unload/offline the tape,
> or [q] to quit:
Answer (excerpt from Symptoms and Resolutions document 10449)
..................
The problem lies in the fact that the pkgtrans utility references the
/etc/device.tab file. This file is generated on boot up by the
/etc/rc2.d/S82mkdtab script (/etc/init.d/mkdtab).
The file gets created with an entry for a tape unit as follows
ctape0:/dev/rmt/0:::desc="Tape Drive" volume="tape"
type="ctape"
removable="true" capacity="45539" bufsize="15872"
erasecmd="/usr/bin/mt
-f /dev/rmt/0 erase" removecmd="/usr/bin/mt -f /dev/rmt/0 offline"
The capacity gets set to approx 45Mb no matter what tape unit is
attached.
To get pkgtrans working, change the capacity to a more realistic figure,
here is a list of Sun tape drives and there capacity value:
Archive 4mm tape unit 4500000 (~4.5Gb)
..........................
It works fine!
However, I have also been suggested not to use pkgtrans at all, but to copy
the pakage to tape with tar, and installing with tar xvf and pkgadd after
that. This also solves another problems and is more flexible than pkgadding
directly from tape.
Thanks to all who answered, specially to
Matthew Stier" <mstier@hotmail.com>
My apologies for the delay.
-- Oscar Goldes
-- Orden Argentina SA