From samson at editshare.com Thu Sep 23 15:08:37 2010 From: samson at editshare.com (Samson Yeung) Date: Thu, 23 Sep 2010 08:08:37 -0700 Subject: list used blocks Message-ID: Hi all, I'm looking for a tool that lists the used blocks in an ext3 file system. Is there already a tool that does exactly that? The closest I could find is dumpe2fs which lists groups, and free blocks within the group. Thanks, -Samson From sandeen at redhat.com Thu Sep 23 17:08:54 2010 From: sandeen at redhat.com (Eric Sandeen) Date: Thu, 23 Sep 2010 12:08:54 -0500 Subject: list used blocks In-Reply-To: References: Message-ID: <4C9B89A6.3090001@redhat.com> On 09/23/2010 10:08 AM, Samson Yeung wrote: > Hi all, > > I'm looking for a tool that lists the used blocks in an ext3 file system. > Is there already a tool that does exactly that? The closest I could > find is dumpe2fs which lists groups, and free blocks within the group. That's about the best there is, I think. (I assume you want to know the actual block numbers in use?) If you need something better and have some programming chops you could look at how dumpe2fs finds that info, and print it out in a format more to your liking... find /blah | xargs filefrag -v might be parseable into something useful too. Just out of curiosity what will you do with the list of used blocks? -Eric From samson at editshare.com Thu Sep 23 18:44:54 2010 From: samson at editshare.com (Samson Yeung) Date: Thu, 23 Sep 2010 11:44:54 -0700 Subject: list used blocks In-Reply-To: <4C9B89A6.3090001@redhat.com> References: <4C9B89A6.3090001@redhat.com> Message-ID: > Just out of curiosity what will you do with the list of used blocks? Write partimage, apparently. I was trying to speed up an archive procedure and was planning to use dd and only copy used blocks to a sparse file, but partimage looks like it already does it! Thanks, -Samson