df du hardlinks and space reclaimation
Clash 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.
disk-usage hard-link
add a comment |Â
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.
disk-usage hard-link
1
Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check withls -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 pointsdf
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
add a comment |Â
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.
disk-usage hard-link
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
disk-usage hard-link
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 withls -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 pointsdf
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
add a comment |Â
1
Please edit question with the filesystem you use (ext4? btrfs? something else?) Also, please check withls -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 pointsdf
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
add a comment |Â
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/
add a comment |Â
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/
add a comment |Â
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/
add a comment |Â
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/
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/
edited Sep 27 at 2:56
answered Sep 26 at 12:34
RAJSEKHAR
112
112
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 pointsdf
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