Link to home
Start Free TrialLog in
Avatar of dee43
dee43Flag for United States of America

asked on

How can I set data compression in Solaris 9?

We have a SunFire V480 server running Solaris 9 (36GB HD) that has a external HP SureStore DAT tape drive attached.  The tape drive is DDS4; native 20GB capacity with 40GB compressed. We have exceeded the 20GB capacity.  

How can I set the data compression so I will be able to use all of the tape drive capacity?
I was told to change "/dev/rmt/1n" (1n is what we use now) to "/dev/rmt/1un" (ultra) but that did not work.  

Your help will be greatly appreciated!
ASKER CERTIFIED SOLUTION
Avatar of soupdragon
soupdragon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Otetelisanu
Otetelisanu

/dev/rmt/1nc

n = not rewint

c = compression
Avatar of yuzh
if you tape driver support compress (hardware compress) than you can use /dev/rmt/1nc as the above comments.

if you don't have a tape device with that capability you can, use "usfdump + compress + dd" to do the backup :

eg:

ufsdump 0f - /fs | compress | dd of=/dev/rmt/1n obs=20480

And the corresponding rstores would look like:
dd if=/dev/rmt/1n | compress -d | ufsrestore -

Or
use GNU tar with -z (compess option) to do the job, you can download GUN tar from:
http://www.sunfreeware.com/
 
use GNU tar:
If you used Gnu tar to back up whatever in mydir the with something like:

cd /path-to/mydir
tar cvzf /dev/rmt/1n .

then you would restore the data with:

cd /path-to/mydir
tar xvzpf /dev/rmt/1n











The /dev/rmt/1cbn device should do the job, but if you require any compressed files to be made smaller, I'd suggest getting a copy of gzip from www.sunfreeware.com and using that to compress your files. HTH.
Avatar of dee43

ASKER

soupdragon,

dev/rmt/1cbn worked!  BTW, we are using ufsdump to do our backups. What does the "b" stand for and will I have to decompress files when I do a restore (ufsrestore)?


Thanks!
b stands for Berkeley-style device, leaving it off reverts to At&T-style as explained here:

When a file open for reading only is closed and the no-rewind bit is not set, the tape is rewound.  If the no-rewind bit is set, the behavior depends on the style mode.  For AT&T-style devices, the tape is positioned after the EOF following the data just read.  For Berkeley-style devices, the tape is not repositioned in any way.

You can leave the b off and it should still work. Some backup systems, like Legato, require the b option since they use record rather than file level repositioning.

Under normal circumstances the two modes seem pretty interchangable unless the application specifies otherwise.

SD