Dale, thanks for offering your patches. Was away second half of last week and will have a look at them today. Regards, Heinz -- The LVM Guy -- On Wed, May 01, 2002 at 12:34:34PM -0700, Stephenson, Dale wrote: > This patch doesn't attempt to solve any bugs. I just wanted to get more > useful information about snapshots from /proc -- little things like the > snapshots' actual size, what volume is its source, and how much of its space > it has used. Yes, all this information is available from /sbin/lvdisplay > (except for the *real* allocated LE, which you have to figure by hand). But > I like using /proc. > > I put the extra (conditional) lines before the "device:" line because the > optional stripesize line was already there. > > I'd like to fit the snapshot/snapshot-source bit into the status bits in > /proc/lvm/global too, but I haven't done it yet. > > Dale J. Stephenson > steph@snapserver.com > > --- linux/drivers/md/lvm-fs.c.orig Mon Apr 22 12:14:59 2002 > +++ linux/drivers/md/lvm-fs.c Mon Apr 22 13:44:03 2002 > @@ -285,6 +285,26 @@ > sz += sprintf(page + sz, "stripesize: %u\n", > lv->lv_stripesize); > } > + if (lv->lv_access & LV_SNAPSHOT) { > + sz += sprintf(page + sz, "remap total: %u\n", > + lv->lv_remap_end * lv->lv_chunk_size / 2); > + sz += sprintf(page + sz, "remap used: %u\n", > + lv->lv_remap_ptr * lv->lv_chunk_size / 2); > + sz += sprintf(page + sz, "snapshot LE: %u\n", > + lv->lv_allocated_snapshot_le); > + if (lv->lv_snapshot_org != NULL) { > + sz += sprintf(page + sz, "source: %s\n", > + lv->lv_snapshot_org->lv_name); > + } > + } > + if (lv->lv_access & LV_SNAPSHOT_ORG) { > + lv_t *lvp = lv->lv_snapshot_next; > + while (lvp != NULL) { > + sz += sprintf(page + sz, "source of: %s\n", > + lvp->lv_name); > + lvp = lvp->lv_snapshot_next; > + } > + } > sz += sprintf(page + sz, "device: %02u:%02u\n", > MAJOR(lv->lv_dev), MINOR(lv->lv_dev)); > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@sistina.com > http://lists.sistina.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html *** Software bugs are stupid. Nevertheless it needs not so stupid people to solve them *** =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Heinz Mauelshagen Sistina Software Inc. Senior Consultant/Developer Am Sonnenhang 11 56242 Marienrachdorf Germany Mauelshagen@Sistina.com +49 2626 141200 FAX 924446 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _______________________________________________ linux-lvm mailing list linux-lvm@sistina.com http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html