If I want to look up size of filesystem attached to logical volume at /dev/myvg/mylv later, what command do I use?
[user1@localhost myvg]$ sudo lvdisplay
--- Logical volume ---
LV Path /dev/myvg/mylv
LV Name mylv
VG Name myvg
LV UUID 7lpeKo-RVPK-Q7TK-NOpM-3NGr-4ve8-EIQOEu
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2016-06-01 21:37:21 -0400
LV Status available
# open 0
LV Size 60.00 MiB
Current LE 15
Read ahead sectors auto
- currently set to 8192
Block device 253:2
[user1@localhost myvg]$ sudo lvextend -L +10M /dev/myvg/mylv
Rounding size to boundary between physical extents: 12.00 MiB
Size of logical volume myvg/mylv changed from 60.00 MiB (15 extents) to 72.00 MiB (18 extents).
Logical volume mylv successfully resized.
[user1@localhost myvg]$ sudo resize2fs /dev/myvg/mylv 72M
resize2fs 1.42.9 (28-Dec-2013)
Resizing the filesystem on /dev/myvg/mylv to 73728 (1k) blocks.
The filesystem on /dev/myvg/mylv is now 73728 blocks long.
Note: The filesystem size attached to logical volume, /dev/myvg/mylv, is NOT necessary the same as the attached filesystem on the mylv. For example, I can shrink the filesystem on mylv like so:
sudo resize2fs /dev/myvg/mylv 60M
I could use this:
[user1@localhost myvg]$ sudo dumpe2fs /dev/myvg/mylv | grep -i "block count"
dumpe2fs 1.42.9 (28-Dec-2013)
Block count: 73728
Reserved block count: 3686
But I am looking for generic command that can self-discover the filesystem type and spit out filesystem info.