How full are your snapshot volumes in LVM?

As I mentioned in my previous post, which is already 2 months old :(, I'm using snapshots for data retention.


Now I run up in the situation, that I wanted to know how full the snapshots are. A 'normal' df will not work... but I figured it out! The command lvs is willing to do the work:


# lvs --aligned --separator | vol_backup
  LV                |VG        |Attr  |LSize |Origin|Snap% |Move|Log|Copy% |Convert
  lvm0              |vol_backup|owi-ao|40.00G|      |      |    |   |      |      
  snap-20100412_2350|vol_backup|swi-a-| 4.00G|lvm0  | 23.71|    |   |      |      
  snap-20100413_2350|vol_backup|swi-a-| 4.00G|lvm0  | 21.70|    |   |      |      
  snap-20100414_2350|vol_backup|swi-a-| 4.00G|lvm0  | 19.52|    |   |      |      
  snap-20100415_2350|vol_backup|swi-a-| 4.00G|lvm0  | 17.53|    |   |      |      
  snap-20100416_2350|vol_backup|swi-a-| 4.00G|lvm0  | 15.54|    |   |      |      
  snap-20100417_2350|vol_backup|swi-a-| 4.00G|lvm0  | 13.56|    |   |      |      
  snap-20100418_2350|vol_backup|swi-a-| 4.00G|lvm0  | 11.56|    |   |      |      
  snap-20100419_2353|vol_backup|swi-a-| 4.00G|lvm0  |  9.02|    |   |      |      
  snap-20100420_2353|vol_backup|swi-a-| 4.00G|lvm0  |  6.76|    |   |      |      
  snap-20100421_2350|vol_backup|swi-a-| 4.00G|lvm0  |  2.79|    |   |      | 



In the 'Snap%' column you can see how full your snapshot volume is!