How to find out the file system of a LVM
<p>I have a logical volume at /dev/xvdk that I'd like to programmatically detect if it's unformatted. In the past, I've run "file -s" on physical devices and it'll return "data" if device is unformatted. </p>

<p>But because it's a LVM (I think?), it's giving me something like this, which isn't helpful.</p>

<blockquote>
  <p>sudo file -sL /dev/xvdk</p>
  
  <p>/dev/xvdk: LVM2 PV (Linux Logical Volume Manager), UUID: pmk0C-FABx-LAsZxB, size: 536870912000</p>
</blockquote>

<p>I've tried other commands like "fdisk", "lsblk", "parted", "lvdisplay". They all work on physical devices but not for LVM.</p>

<p>Suggestions?</p>