Score:0

why is faillog, tallylog and lastlog so big?

br flag

I got a notice from a backup system (rsnapshot) today that it's storage volume was full. A closer look reveals some older snapshots where faillog, tallylog and lastlog are bigger than the actual filesystem they are on (/var is a 6G partition).

-rw-r--r--  3 root       root             65G Feb 11 08:33 faillog
-rw-------  3 root       root            129G Feb 11 08:33 tallylog
-rw-rw-r--  2 root       utmp            585G Feb 11 08:57 lastlog

Redhat says this is normal. Any way to limit the size on these? Can they be safely rotated every few hours?

user10489 avatar
nc flag
Use `du` or `ls -s` to determine actual file size. The number shown by `ls -l` is not the file size, but the file length, which don't match for sparse files.
Nstevens avatar
br flag
What? That makes absolutely no sense. `-l` is the short for `listing` format.
user10489 avatar
nc flag
I always thought `ls -l` was "long format" not listing format, and the man page agrees. You could use `ls -ls` and get both size and length at once.
Score:0
ar flag

Redhat says this is normal. Any way to limit the size on these? Can they be safely rotated every few hours?

What RedHat says is that it's a sparse file. That's a file where the length of the file is larger than the content of the file; it has holes what doesn't contain any data.

To back up sparse files, use a tool that recognizes sparse files and can handle them correctly.

You should not rotate the files; that won't solve your problem. Rather, you should configure rsnapshot to use the --sparse flag. Or use a better backup tool. Or not back up those files.

Nstevens avatar
br flag
Thanks for the tip on the `--sparse` flag. I'll give it a shot.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.