Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#480 closed defect (wontfix)

Sparse files are not handled properly

Reported by: cp005e Owned by: bruno
Priority: normal Milestone:
Component: mondo Version: 2.2.9.6
Severity: normal Keywords: sparse lastlog
Cc:

Description

I run 64-bit Linux in an Active Directory environment using Likewise, which results in legitimately large uids. Constantly deleting /var/log/lastlog is a tedious workaround to the real problem of Mondo not properly handling sparse files. Instead I am forced to simply exclude the /var/log directory completely.

Additionally, if someone had a sparse file that they wanted to back up (e.g. a virtual machine disk file), it would take far longer (and potentially far more space) than necessary to back their system.

This is related to #131, but I truly think that it is an issue worth correcting at the source rather than simply excluding these files (such as /var/log/lastlog).

Change History (3)

comment:1 Changed 6 years ago by bruno

  • Milestone changed from 2.2.9.7 to 2.2.10
  • Status changed from new to assigned

Indeed as per afio man page, it seems that the support for sparse file is not that good, if compression is used.

from the man page:

       -j           Don't generate sparse filesystem blocks on restoring files.  By default, afio  creates  sparse  filesystem
                    blocks  (with  lseek(2))  when  possible when restoring files from an archive, but not if these files were
                    stored in a compressed form.   Unless stored in a compressed form, sparse files  are  not  archived  effi‐
                    ciently:  they  will take space equal to the full file length.  (The sparse file handling in afio does not
                    make much sense except in a historical way.)

That option is not used yet by mondo. But I made some tries, and in all case I was unable, even uncompressed to restore the sparse file correctly with afio. If compressed, it's stored correctly as sparse, but restored incorrectly, even with -j.

stat /var/log/lastlog
  File: « /var/log/lastlog »
  Size: 2920292         Blocks: 80         IO Block: 4096   fichier
Device: 902h/2306d      Inode: 93          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2011-06-25 04:15:46.114783547 +0200
Modify: 2011-06-19 20:16:16.383755862 +0200
Change: 2011-06-19 20:16:16.383755862 +0200
echo "/var/log/lastlog" | afio -Z -P gzip -G 9 -T 3k -o -M 16m /tmp/bkp
afio -ivj /tmp/bkp
var/log/lastlog.z -- okay
gzip -d var/log/lastlog.z
stat var/log/lastlog
  File: « var/log/lastlog »
  Size: 2920292         Blocks: 5704       IO Block: 4096   fichier
Device: 904h/2308d      Inode: 22298702    Links: 1
Access: (0644/-rw-r--r--)  Uid: (  600/   bruno)   Gid: (  501/   users)
Access: 2011-06-19 20:16:16.000000000 +0200
Modify: 2011-06-19 20:16:16.000000000 +0200
Change: 2011-06-25 16:26:40.964754512 +0200

If not compressed, it's stored incorrectly.

echo "/var/log/lastlog" | afio -o -j -M 16m /tmp/bkp
afio -ivj /tmp/bkp
var/log/lastlog -- okay
stat var/log/lastlog
  File: « var/log/lastlog »
  Size: 2920292         Blocks: 5704       IO Block: 4096   fichier
Device: 904h/2308d      Inode: 22298701    Links: 1
Access: (0644/-rw-r--r--)  Uid: (  600/   bruno)   Gid: (  501/   users)
Access: 2011-06-19 20:16:16.000000000 +0200
Modify: 2011-06-19 20:16:16.000000000 +0200
Change: 2011-06-25 16:37:09.317884015 +0200

Would you mind testing with star ? or do you know another sparse file compliant tool doing file by file compression ?

comment:2 Changed 5 years ago by bruno

  • Resolution set to wontfix
  • Status changed from assigned to closed

This may be fixed when MondoRescue? will be able to use other packing tools as afio (already star could provide a fix)

comment:3 Changed 3 years ago by bruno

  • Milestone 3.1.0 deleted

Milestone 3.1.0 deleted

Note: See TracTickets for help on using tickets.