SOLUTION!!!!

Turns out there is a way to not only identify sparse files, but also read the map as root! 

FIBMAP ioctl will do the job quite nicely and there is even a utility to read it ( as root ) filefrag -v <filename>

This sure as heck beats scanning the file for zeros manually!

Cheers,
Eric

On 4/26/06, Scott Ruckh < [EMAIL PROTECTED]> wrote:
This is what you said Eric Warnke
> Unfortunately I have looked high and low, there is just no good way to
> read
> sparse files intelligently.  Whoever though of providing the functionality
> without an API to step through the block mapping was a moron.  It is truly
> a
> brain dead technology.  At least there is a fcntl under Win32 to deal with
> it with some intelligence.
>
> Cheers,
> Eric
>
>
>
> On 4/26/06, Bill Moran <[EMAIL PROTECTED]> wrote:
>>
>> "Scott Ruckh" <[EMAIL PROTECTED]> wrote:
>>
>> > This is what you said Eric Warnke
>> > >
>> > > Oops tar -Scf lowercase s is somthing else.
>> > >
>> > > Cheers,
>> > > Eric
>> >
>> > Good idea.
>> >
>> > I tried:
>> > tar -Sc -f /var/log/lastlog.tar /var/log/lastlog
>> >
>> > But it appears to do much the same as bacula.  It too must read
>> through
>> > the entire file, so it does not speed things up.
>>
>> The only program I'm aware of that will back up sparse files efficiently
>> is dump.  But dump isn't cross-platform - not even a little.
>>

I want to thank everyone for their help.

I am not even sure why this file is created this way, seems like a strange
implementation from someone on the outside looking in.

I will just learn to deal with /var/log/lastlog until something better
come up.

Thanks.
Scott

Reply via email to