Score:0

LVM logical volume space used

cn flag

I am using the lvdisplay command in LVM and am attempting to determine the used size of the logical volume from the following output:

      --- Logical volume ---
  LV Path                /dev/vg1/Web
  LV Name                Web
  VG Name                vg1
  LV UUID                89aBZf-2Cd6-Jx9e-mpXf-i1YX-M887-nxsF0P
  LV Write Access        read/write
  LV Creation host, time ubuntu, 2023-02-02 16:17:14 -0500
  LV Status              available
  # open                 1
  LV Size                10.00 GiB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

From this output how am I expected to determine the amount of space used? It is easy to determine the allocated space but not so, the used space. I have seen this question asked several times on the Internet and each time the answer skirts around the question, modifying the question to something else. Is the answer that you cannot directly see this value?

PonJar avatar
in flag
I doubt lvdisplay will give you this information. The amount of space used could be considered an attribute of the filesystem(s) that reside on the logical volume. That makes it a few steps away from the attributes of the logical volume. You can easily get this information from df, du or duf when the filesystem(s) are mounted
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.