How can I find what uses the space in a LV(logical volume)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












-1















The logical volume(aka LV), centos-home is created automatically when installing CentOS 7 by default, but I didn't use it manually.



Now, I have mounted an empty directory, work to centos-home.



/home/anselmo/work ==> /dev/mapper/centos-home



The following are the results of df -h after mount.



[anselmo@anselmo-centos7 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_anselmo--centos7-root 50G 45G 5.2G 90% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 302M 63G 1% /dev/shm
tmpfs 63G 43M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb3 1014M 358M 657M 36% /boot
/dev/sdc1 200M 12M 189M 6% /boot/efi
/dev/mapper/centos_anselmo--centos7-home 2.6T 1.7T 948G 65% /home
tmpfs 13G 92K 13G 1% /run/user/1000
/dev/mapper/centos-home 65G 8.8G 56G 14% /home/anselmo/work


Though I mounted an empty directory, the LV had already used space 8.8G.



How can I find what uses this space?










share|improve this question






















  • What filesystem you use for this LV?

    – Romeo Ninov
    Mar 4 at 7:00











  • What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

    – telcoM
    Mar 4 at 10:35











  • @RomeoNinov I'm using LVM2 and xfs.

    – Anselmo Park
    Mar 5 at 7:26











  • @telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

    – Anselmo Park
    Mar 5 at 7:30












  • When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

    – telcoM
    Mar 5 at 9:25















-1















The logical volume(aka LV), centos-home is created automatically when installing CentOS 7 by default, but I didn't use it manually.



Now, I have mounted an empty directory, work to centos-home.



/home/anselmo/work ==> /dev/mapper/centos-home



The following are the results of df -h after mount.



[anselmo@anselmo-centos7 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_anselmo--centos7-root 50G 45G 5.2G 90% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 302M 63G 1% /dev/shm
tmpfs 63G 43M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb3 1014M 358M 657M 36% /boot
/dev/sdc1 200M 12M 189M 6% /boot/efi
/dev/mapper/centos_anselmo--centos7-home 2.6T 1.7T 948G 65% /home
tmpfs 13G 92K 13G 1% /run/user/1000
/dev/mapper/centos-home 65G 8.8G 56G 14% /home/anselmo/work


Though I mounted an empty directory, the LV had already used space 8.8G.



How can I find what uses this space?










share|improve this question






















  • What filesystem you use for this LV?

    – Romeo Ninov
    Mar 4 at 7:00











  • What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

    – telcoM
    Mar 4 at 10:35











  • @RomeoNinov I'm using LVM2 and xfs.

    – Anselmo Park
    Mar 5 at 7:26











  • @telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

    – Anselmo Park
    Mar 5 at 7:30












  • When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

    – telcoM
    Mar 5 at 9:25













-1












-1








-1


1






The logical volume(aka LV), centos-home is created automatically when installing CentOS 7 by default, but I didn't use it manually.



Now, I have mounted an empty directory, work to centos-home.



/home/anselmo/work ==> /dev/mapper/centos-home



The following are the results of df -h after mount.



[anselmo@anselmo-centos7 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_anselmo--centos7-root 50G 45G 5.2G 90% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 302M 63G 1% /dev/shm
tmpfs 63G 43M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb3 1014M 358M 657M 36% /boot
/dev/sdc1 200M 12M 189M 6% /boot/efi
/dev/mapper/centos_anselmo--centos7-home 2.6T 1.7T 948G 65% /home
tmpfs 13G 92K 13G 1% /run/user/1000
/dev/mapper/centos-home 65G 8.8G 56G 14% /home/anselmo/work


Though I mounted an empty directory, the LV had already used space 8.8G.



How can I find what uses this space?










share|improve this question














The logical volume(aka LV), centos-home is created automatically when installing CentOS 7 by default, but I didn't use it manually.



Now, I have mounted an empty directory, work to centos-home.



/home/anselmo/work ==> /dev/mapper/centos-home



The following are the results of df -h after mount.



[anselmo@anselmo-centos7 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_anselmo--centos7-root 50G 45G 5.2G 90% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 302M 63G 1% /dev/shm
tmpfs 63G 43M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb3 1014M 358M 657M 36% /boot
/dev/sdc1 200M 12M 189M 6% /boot/efi
/dev/mapper/centos_anselmo--centos7-home 2.6T 1.7T 948G 65% /home
tmpfs 13G 92K 13G 1% /run/user/1000
/dev/mapper/centos-home 65G 8.8G 56G 14% /home/anselmo/work


Though I mounted an empty directory, the LV had already used space 8.8G.



How can I find what uses this space?







centos filesystems mount lvm






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 4 at 6:52









Anselmo ParkAnselmo Park

94




94












  • What filesystem you use for this LV?

    – Romeo Ninov
    Mar 4 at 7:00











  • What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

    – telcoM
    Mar 4 at 10:35











  • @RomeoNinov I'm using LVM2 and xfs.

    – Anselmo Park
    Mar 5 at 7:26











  • @telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

    – Anselmo Park
    Mar 5 at 7:30












  • When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

    – telcoM
    Mar 5 at 9:25

















  • What filesystem you use for this LV?

    – Romeo Ninov
    Mar 4 at 7:00











  • What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

    – telcoM
    Mar 4 at 10:35











  • @RomeoNinov I'm using LVM2 and xfs.

    – Anselmo Park
    Mar 5 at 7:26











  • @telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

    – Anselmo Park
    Mar 5 at 7:30












  • When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

    – telcoM
    Mar 5 at 9:25
















What filesystem you use for this LV?

– Romeo Ninov
Mar 4 at 7:00





What filesystem you use for this LV?

– Romeo Ninov
Mar 4 at 7:00













What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

– telcoM
Mar 4 at 10:35





What is the output of the following commands: ls -Rabl /home/anselmo/work and du -kx /home/anselmo/work ?

– telcoM
Mar 4 at 10:35













@RomeoNinov I'm using LVM2 and xfs.

– Anselmo Park
Mar 5 at 7:26





@RomeoNinov I'm using LVM2 and xfs.

– Anselmo Park
Mar 5 at 7:26













@telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

– Anselmo Park
Mar 5 at 7:30






@telcoM It has another "anselmo" directory. It looks like my home directory at old time. Does it mean it is an used disk? I thought that I removed all partitions of the disk when I installed my OS, but the result seems that it is my misunderstanding.

– Anselmo Park
Mar 5 at 7:30














When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

– telcoM
Mar 5 at 9:25





When you installed CentOS 7, it auto-created that LV as you said. It also created a home directory for any regular user(s) specified during the installation, and populated the home directory (or directories) with the contents of /etc/skel. That plus the preallocation feature described by @RomeoNinov probably explain it all.

– telcoM
Mar 5 at 9:25










1 Answer
1






active

oldest

votes


















1














According to this Q/A this is preallocated diskspace and it is related to "XFS Dynamic Speculative EOF Preallocation"




This is a move to reduce file fragmentation during streaming writes by
speculatively allocating space as file sizes increase. The amount of
space preallocated per file is dynamic and is primarily a function of
the free space available on the filesystem (to preclude running out of
space entirely).



It follows this schedule:



freespace max prealloc size




5% full extent (8GB)

4-5% 2GB (8GB >> 2)

3-4% 1GB (8GB >> 3)

2-3% 512MB (8GB >> 4)

1-2% 256MB (8GB >> 5)

<1% 128MB (8GB >> 6)




This is an interesting addition to the filesystem as it may help with
some of the massively fragmented files I deal with.







share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504208%2fhow-can-i-find-what-uses-the-space-in-a-lvlogical-volume%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    According to this Q/A this is preallocated diskspace and it is related to "XFS Dynamic Speculative EOF Preallocation"




    This is a move to reduce file fragmentation during streaming writes by
    speculatively allocating space as file sizes increase. The amount of
    space preallocated per file is dynamic and is primarily a function of
    the free space available on the filesystem (to preclude running out of
    space entirely).



    It follows this schedule:



    freespace max prealloc size




    5% full extent (8GB)

    4-5% 2GB (8GB >> 2)

    3-4% 1GB (8GB >> 3)

    2-3% 512MB (8GB >> 4)

    1-2% 256MB (8GB >> 5)

    <1% 128MB (8GB >> 6)




    This is an interesting addition to the filesystem as it may help with
    some of the massively fragmented files I deal with.







    share|improve this answer



























      1














      According to this Q/A this is preallocated diskspace and it is related to "XFS Dynamic Speculative EOF Preallocation"




      This is a move to reduce file fragmentation during streaming writes by
      speculatively allocating space as file sizes increase. The amount of
      space preallocated per file is dynamic and is primarily a function of
      the free space available on the filesystem (to preclude running out of
      space entirely).



      It follows this schedule:



      freespace max prealloc size




      5% full extent (8GB)

      4-5% 2GB (8GB >> 2)

      3-4% 1GB (8GB >> 3)

      2-3% 512MB (8GB >> 4)

      1-2% 256MB (8GB >> 5)

      <1% 128MB (8GB >> 6)




      This is an interesting addition to the filesystem as it may help with
      some of the massively fragmented files I deal with.







      share|improve this answer

























        1












        1








        1







        According to this Q/A this is preallocated diskspace and it is related to "XFS Dynamic Speculative EOF Preallocation"




        This is a move to reduce file fragmentation during streaming writes by
        speculatively allocating space as file sizes increase. The amount of
        space preallocated per file is dynamic and is primarily a function of
        the free space available on the filesystem (to preclude running out of
        space entirely).



        It follows this schedule:



        freespace max prealloc size




        5% full extent (8GB)

        4-5% 2GB (8GB >> 2)

        3-4% 1GB (8GB >> 3)

        2-3% 512MB (8GB >> 4)

        1-2% 256MB (8GB >> 5)

        <1% 128MB (8GB >> 6)




        This is an interesting addition to the filesystem as it may help with
        some of the massively fragmented files I deal with.







        share|improve this answer













        According to this Q/A this is preallocated diskspace and it is related to "XFS Dynamic Speculative EOF Preallocation"




        This is a move to reduce file fragmentation during streaming writes by
        speculatively allocating space as file sizes increase. The amount of
        space preallocated per file is dynamic and is primarily a function of
        the free space available on the filesystem (to preclude running out of
        space entirely).



        It follows this schedule:



        freespace max prealloc size




        5% full extent (8GB)

        4-5% 2GB (8GB >> 2)

        3-4% 1GB (8GB >> 3)

        2-3% 512MB (8GB >> 4)

        1-2% 256MB (8GB >> 5)

        <1% 128MB (8GB >> 6)




        This is an interesting addition to the filesystem as it may help with
        some of the massively fragmented files I deal with.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 5 at 7:45









        Romeo NinovRomeo Ninov

        6,91432129




        6,91432129



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504208%2fhow-can-i-find-what-uses-the-space-in-a-lvlogical-volume%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay