[UFO Chicago] does Ubuntu cache/index the contents of mounted drives ?

Neil R. Ormos ormos at ripco.com
Mon Mar 9 18:56:03 PDT 2015


Calvin Pryor wrote:

> I have a 1T Seagate Barracuda hard drive that is
> clicking pretty bad and I'm considering sending
> it to Seagate for data recovery.

> If they can restore at least 75% of the drive,
> the price is $400 something dollars.

> So I'm trying to figure out another way to get
> the size of the data on disk, to verify what 75%
> would be. [...]

> Or maybe mountd logs the stats of newly mounted
> file systems ?

> Anything like this that would be persistent
> enough for me to recover from the two Ubuntu
> installations ?

When you write you're trying to get the size of
the data on disk, do you mean that you want to
find the amount of the drive's storage that had
been allocated?

If the volumes on the drive drive were fscked
recently, there may still be a record in
/var/log/fsck/checkfs (or a rotated version
thereof).  Here's an example of what that might
look like:

  volume005: clean, 81147/58892288 files, 129278568/235560448 blocks

The third number is a number of used (more
properly, "allocated"?)  blocks on the volume. The
fourth number corresponds to the total size of the
volume.  Both are in units of filesystem blocks,
which might be 4096.  In this case, about 55% of
the volume was used at the time fsck ran.

If the disk contained only one volume, to which
all of the space was allocated, containing a
Linux-recognized filesystem, then this will give
you a reasonable approximation of the amount of
disk that had been used.  If there were multiple
volumes (i.e. partitions), or some space was
unallocated or had filesystems that were not
fscked, you may need to account for that space.


More information about the ufo mailing list