Query regarding tmp-xxxx files in ../named/zones

Rajnish Kamboj rajnish.kamboj at ericsson.com
Mon Oct 4 04:24:41 UTC 2021


Hi All

Any update on my queries below?
Sharing my queries again

Query#1
What is the purpose of these tmp-xxxx files and when are these generated?
I added and updated the data for about 1 hour but no tmp-xxxx files was generated.

The answer below says that "Named uses temporary files to create new versions of files then renames them to replace existing files atomically"
It seems that, Named always generate temporary files and uses then for creating new versions of files. [This contradicts my observation above]

Query#2
If the tmp-xxxx files are generated due to some errors (improper shutdown etc.) then does Named uses these tmp-xxxx files to correct its database after restart?


Regards
Rajnish Kamboj

-----Original Message-----
From: bind-users <bind-users-bounces at lists.isc.org> On Behalf Of Rajnish Kamboj via bind-users
Sent: Wednesday, September 29, 2021 9:30 AM
To: bind-users at lists.isc.org
Subject: RE: Query regarding tmp-xxxx files in ../named/zones

Hello All

Please help me in my below queries

Query#1
------------
What is the purpose of these tmp-xxxx files and when are these generated?
I added and updated the data for about 1 hour but no tmp-xxxx files was generated.

The answer below says that "Named uses temporary files to create new versions of files then renames them to replace existing files atomically"
It seems that, Named always generate temporary files and uses then for creating new versions of files. [This contradicts my observation above]

Query#2
------------
If the tmp-xxxx files are generated due to some errors (improper shutdown etc.) then does Named uses these tmp-xxxx files to correct its database after restart?


 

Regards
Rajnish Kamboj

-----Original Message-----
From: Mark Andrews <marka at isc.org>
Sent: Thursday, September 16, 2021 11:53 AM
To: Rajnish Kamboj <rajnish.kamboj at ericsson.com>
Cc: bind-users at lists.isc.org
Subject: Re: Query regarding tmp-xxxx files in ../named/zones

You are in the best place to answer what they are by looking at them.

Named uses temporary files to create new versions of files then renames them to replace existing files atomically. This includes zone files, journals and any other file where a partial instance would be problematic.

Now if something goes wrong in there generation the error handling is supposed to remove them but there can alway be omissions on error paths.  Similarly if you don’t shutdown named cleanly there can be temporary files left around if named was in the process of updating a file.  Similarly if named happens to die unexpectedly and it was in the process of writing out a file they will be left behind.

Mark

> On 16 Sep 2021, at 13:44, Rajnish Kamboj via bind-users <bind-users at lists.isc.org> wrote:
> 
> Hello All,
>  
> We have a query with the tmp-<> file generation in ../named/zones in 
> BIND 9 Over a period of time the tmp files grows and disk usage was full.
>  
> What is the purpose of these tmp files and when are these generated.??
> This will help us to take our internal decision on handling (delete etc.) these temp files.
>  
>  
> Regards
> Rajnish Kamboj
>  
> _______________________________________________
> Please visit
> https://protect2.fireeye.com/v1/url?k=dd901376-820b2a5b-dd9053ed-8692d
> c8284cb-a025d4d7bb5d67b7&q=1&e=43293d7e-b3c0-4db0-9da7-6bd2a53090de&u=
> https%3A%2F%2Flists.isc.org%2Fmailman%2Flistinfo%2Fbind-users to 
> unsubscribe from this list
> 
> ISC funds the development of this software with paid support subscriptions. Contact us at https://protect2.fireeye.com/v1/url?k=cd791955-92e22078-cd7959ce-8692dc8284cb-0a6698108ac4fe63&q=1&e=43293d7e-b3c0-4db0-9da7-6bd2a53090de&u=https%3A%2F%2Fwww.isc.org%2Fcontact%2F for more information.
> 
> 
> bind-users mailing list
> bind-users at lists.isc.org
> https://protect2.fireeye.com/v1/url?k=31523138-6ec90815-315271a3-8692d
> c8284cb-424e67fa7c640a26&q=1&e=43293d7e-b3c0-4db0-9da7-6bd2a53090de&u=
> https%3A%2F%2Flists.isc.org%2Fmailman%2Flistinfo%2Fbind-users

--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: marka at isc.org
_______________________________________________
Please visit https://protect2.fireeye.com/v1/url?k=126816bb-4df32f90-12685620-866038973a15-46c7f423f992abad&q=1&e=b75ce197-bc95-4a0a-9106-5318ac4364ef&u=https%3A%2F%2Flists.isc.org%2Fmailman%2Flistinfo%2Fbind-users to unsubscribe from this list

ISC funds the development of this software with paid support subscriptions. Contact us at https://protect2.fireeye.com/v1/url?k=2b9b6d61-7400544a-2b9b2dfa-866038973a15-94bb20a5fbf696cb&q=1&e=b75ce197-bc95-4a0a-9106-5318ac4364ef&u=https%3A%2F%2Fwww.isc.org%2Fcontact%2F for more information.


bind-users mailing list
bind-users at lists.isc.org
https://protect2.fireeye.com/v1/url?k=48dc34b7-17470d9c-48dc742c-866038973a15-327d26b16eb2ae9c&q=1&e=b75ce197-bc95-4a0a-9106-5318ac4364ef&u=https%3A%2F%2Flists.isc.org%2Fmailman%2Flistinfo%2Fbind-users


More information about the bind-users mailing list