Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 429
  • Last Modified:

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!
1 Solution
Didn't work or didn't give you any compression? What backup utility are you using?

As I understand it the un (ultra compressed) and cn (compressed) devices are identical but try with /dev/rmt/1cbn just in case.

Check that your tape device is featured in the tape device config file /kernel/drv/st.conf. If the device is being picked up correctly then device type should show up in the /var/adm/messages file - and indeed if you call 'mt -f /dev/rmt/1cn status'.

Finally is there a significant amount of compressed data on the drive you are backing up (.Z, .zip etc. files)? If the data on disk is largely compressed (database_dumps.Z etc) then you won't get an awful lot of compression on the tape.



n = not rewint

c = compression
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 :


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 -

use GNU tar with -z (compess option) to do the job, you can download GUN tar from:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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.
dee43Author Commented:

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)?

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.


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now