Pages

Saturday, January 17, 2009

Don't overlook largefile support when using Solaris 10

This is the typical thing you don't think about unless something you carefully planned fails unexpectedly. I was answering a post (yet another) in an Internet forum and it seems that people doesn't know/think about large files and large files support when issuing their commands.

Largefile

As man largefile states:

Standards, Environments, and Macros largefile(5)

NAME
largefile - large file status of utilities

DESCRIPTION
A large file is a regular file whose size is greater than or equal to 2 Gbyte ( 2^31 bytes). A small file is a regular file whose size is less than 2 Gbyte.

You're using Solaris, aren't you? So it's nothing strange the directory you're backing up (for example) contains some file with these characteristics. When in doubt, and before wasting precious CPU time, check:
  • if you need large file support
  • if the utilities you're going to use support large files
Both tasks are easy, and for the latter the already mentioned largefile man page is all you need.

pax, tar, cpio

As far as it concerns these utilities, their large file status is:
  • pax and cpio are large files aware, but have anyway a limit: they "only" support files up to 8 GB - 1 byte
  • tar has full large file support
That's the reason why I usually go with tar, always. And that's the reason I always use the e option (which stops tar in case of error) and usually never use the v option, which clutters the terminal with a flood of messages between which it's sometimes impossible to spot warning and errors. Remember the good old standard output and standard error redirection, if you really want to know if something has gone bad.

No comments:

Post a Comment