df du hardlinks and space reclaimation

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











up vote
0
down vote

favorite












I am really confused on how to build an understanding around hardlinks.
I work with a DB hosted on Linux. The Db in order to take backups creates hardlinks to data files in a different directory.
Hardlinks as per the definition will not take up space on disk as they point to an existing inode of the file.
But when removing files to clear up space on disk,it is normally recommended to delete the backups first.
And this even works as after removing the backup (directory with hardlinks) directory,the df-h does show considerable amount of space is reclaimed.
Please do help on how to visualize df du hardlinks, space occupied by hardlinks and how deletion of a link to an inode appears to reduce space on disk as per the df-h command.










share|improve this question

















  • 1




    Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
    – dirkt
    Sep 22 at 6:00










  • Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
    – RAJSEKHAR
    Sep 26 at 12:30















up vote
0
down vote

favorite












I am really confused on how to build an understanding around hardlinks.
I work with a DB hosted on Linux. The Db in order to take backups creates hardlinks to data files in a different directory.
Hardlinks as per the definition will not take up space on disk as they point to an existing inode of the file.
But when removing files to clear up space on disk,it is normally recommended to delete the backups first.
And this even works as after removing the backup (directory with hardlinks) directory,the df-h does show considerable amount of space is reclaimed.
Please do help on how to visualize df du hardlinks, space occupied by hardlinks and how deletion of a link to an inode appears to reduce space on disk as per the df-h command.










share|improve this question

















  • 1




    Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
    – dirkt
    Sep 22 at 6:00










  • Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
    – RAJSEKHAR
    Sep 26 at 12:30













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am really confused on how to build an understanding around hardlinks.
I work with a DB hosted on Linux. The Db in order to take backups creates hardlinks to data files in a different directory.
Hardlinks as per the definition will not take up space on disk as they point to an existing inode of the file.
But when removing files to clear up space on disk,it is normally recommended to delete the backups first.
And this even works as after removing the backup (directory with hardlinks) directory,the df-h does show considerable amount of space is reclaimed.
Please do help on how to visualize df du hardlinks, space occupied by hardlinks and how deletion of a link to an inode appears to reduce space on disk as per the df-h command.










share|improve this question













I am really confused on how to build an understanding around hardlinks.
I work with a DB hosted on Linux. The Db in order to take backups creates hardlinks to data files in a different directory.
Hardlinks as per the definition will not take up space on disk as they point to an existing inode of the file.
But when removing files to clear up space on disk,it is normally recommended to delete the backups first.
And this even works as after removing the backup (directory with hardlinks) directory,the df-h does show considerable amount of space is reclaimed.
Please do help on how to visualize df du hardlinks, space occupied by hardlinks and how deletion of a link to an inode appears to reduce space on disk as per the df-h command.







disk-usage hard-link






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 22 at 3:52









RAJSEKHAR

112




112







  • 1




    Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
    – dirkt
    Sep 22 at 6:00










  • Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
    – RAJSEKHAR
    Sep 26 at 12:30













  • 1




    Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
    – dirkt
    Sep 22 at 6:00










  • Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
    – RAJSEKHAR
    Sep 26 at 12:30








1




1




Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
– dirkt
Sep 22 at 6:00




Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check with ls -l (which shows the number of hardlinks in the 2nd column) that every file in the directory you are removing has other hardlinks. Also, try removing the files one by one, and see at which points df claims more space. As you say, on ext-filesystems, removing hardlinked files shouldn't free up significant space.
– dirkt
Sep 22 at 6:00












Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
– RAJSEKHAR
Sep 26 at 12:30





Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
– RAJSEKHAR
Sep 26 at 12:30











1 Answer
1






active

oldest

votes

















up vote
1
down vote













Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
Find details in the below link:
The DB in question is Apache Cassandra which runs compaction time and again to merge data files and demands backup files to be manually removed
https://www.google.co.in/amp/s/www.imanisdata.com/limitations-snapshots-cassandra-backup/amp/






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f470655%2fdf-du-hardlinks-and-space-reclaimation%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
    Find details in the below link:
    The DB in question is Apache Cassandra which runs compaction time and again to merge data files and demands backup files to be manually removed
    https://www.google.co.in/amp/s/www.imanisdata.com/limitations-snapshots-cassandra-backup/amp/






    share|improve this answer


























      up vote
      1
      down vote













      Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
      Find details in the below link:
      The DB in question is Apache Cassandra which runs compaction time and again to merge data files and demands backup files to be manually removed
      https://www.google.co.in/amp/s/www.imanisdata.com/limitations-snapshots-cassandra-backup/amp/






      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
        Find details in the below link:
        The DB in question is Apache Cassandra which runs compaction time and again to merge data files and demands backup files to be manually removed
        https://www.google.co.in/amp/s/www.imanisdata.com/limitations-snapshots-cassandra-backup/amp/






        share|improve this answer














        Thank you so much.i found the answer. The database keeps merging original database files into New files and eventually removes the original db files.hence the hardlinks to old original files do start claiming space. A deletion of backups clears up all those old backups (hardlinks earlier created to old data files which are now merged and replaced), hence reclaims space.
        Find details in the below link:
        The DB in question is Apache Cassandra which runs compaction time and again to merge data files and demands backup files to be manually removed
        https://www.google.co.in/amp/s/www.imanisdata.com/limitations-snapshots-cassandra-backup/amp/







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 27 at 2:56

























        answered Sep 26 at 12:34









        RAJSEKHAR

        112




        112



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470655%2fdf-du-hardlinks-and-space-reclaimation%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

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

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?