Re: Recover file after truncate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The free space btree can be traversed offline via the xfs_db utility.
Something like the following could give you the free extent information
for each AG in the fs.

for i in $(seq 0 <maxag>); do
	echo agno $i
	xfs_db -c "agf $i" -c "addr bnoroot" -c "btdump"  <dev>
done

My xfs_db didn't have 'btdump' but I discovered 'freesp -d' which summarised the free regions for all AGs at once. I also needed to use 'xfs_db -r ...' to attach it to the filesystem as it was still mounted read-write. (I wasn't sure if remounting it or unmounting it and mounting it again would destroy the logs.)


Thanks again for your help.



Regards,
@ndy

--
andyjpb@xxxxxxxxxxxxxx
http://www.ashurst.eu.org/
0x7EBA75FF
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux