I have created a ec2 instance and attached 3 ebs volumes to it, I have created a lvm on the 3 ebs volumes and mounted it to /var/lib/pgsql and then installed postgresql source 8.4 and configure it to /var/lib/pgsql/data/data1 and i have created a sample table on it and the data is been store in lvm volumes( /dev/mapper/vg_ebs-lv_ebs) . I want check on which ebs volumes the data is been stored, so that I can remove the rest unused volumes in such that way that it does not affect the postgresql database.
I have attached the photos of the work.

Tried to check the details by pvdisplay, lvdisplay vgdisplay, and tried to make the volume full to 100% still not able to identify which ebs volumes the data is been stored.
Want to know if 1) the data is been stored in all the volumes, 2) in root volumes 2) or any specific volumes the data is stored.




Postgres data is in
/var/lib/pgsqlwhich falls underlv_ebslogical volume invg_ebsvolume group.To provide space for this volume group, you have three physical volumes:
/dev/sdf,dev/sdgand/dev/sdh.In general, LVM decides which data from logical volume to put on which physical volume. Allocation is done by means of extents which are non-overlapping, continuous ranges of bytes, each having a starting offset and a length (similar to partitions). You can get the information about extent allocation of LVs with
In your case all the space in PVs has been allocated to your LV, so you cannot just remove PV from VG. What you need to do is:
/var/lib/pgsqlresize2fsto shrink your filesystem by at least the size of the PV that you want to removelvreduceto shrink the size of LV to the reduced size of filesystempvmoveto move any active physical segments off of the PV being removedvgreduceto remove now empty PV from VGDon't forget to back up your data first.