{"id":169,"date":"2011-02-13T23:48:16","date_gmt":"2011-02-14T03:48:16","guid":{"rendered":"http:\/\/blogs.tulsalabs.com\/?p=169"},"modified":"2025-11-12T02:24:50","modified_gmt":"2025-11-12T06:24:50","slug":"hole-punching-not-an-option-on-os-x","status":"publish","type":"post","link":"http:\/\/blogs.tulsalabs.com\/?p=169","title":{"rendered":"Sparse file creation not an option on OS X"},"content":{"rendered":"<p>We can see that when we try to create a sparse file a file under OS X (10.6) that the OS writes out the intervening pages.<\/p>\n<pre>\r\nKinMage:src thomas$ uname -a\r\nDarwin KinMage 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3\/RELEASE_I386 i386\r\nKinMage:src thomas$ python punch.py \r\nKinMage:src thomas$ ls -la p*out\r\n-rw-r--r--  1 thomas  staff    1023 Feb 13 21:44 p1023.out\r\n-rw-r--r--  1 thomas  staff    1024 Feb 13 21:44 p1024.out\r\n-rw-r--r--  1 thomas  staff    1025 Feb 13 21:44 p1025.out\r\n-rw-r--r--  1 thomas  staff   10250 Feb 13 21:44 p10250.out\r\n-rw-r--r--  1 thomas  staff  102500 Feb 13 21:44 p102500.out\r\n-rw-r--r--  1 thomas  staff      64 Feb 13 21:44 p64.out\r\nKinMage:src thomas$ du -sh p*out\r\n4.0K\tp1023.out\r\n4.0K\tp1024.out\r\n4.0K\tp1025.out\r\n 12K\tp10250.out\r\n104K\tp102500.out\r\n4.0K\tp64.out\r\n<\/pre>\n<p>They should all be a multiple of a block size if there are sparse files. Since<br \/>\nthey are not, we can conclude no sparse files were created.<\/p>\n<p>Hmm, I wonder what happens over NFS?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can see that when we try to create a sparse file a file under OS X (10.6) that the OS writes out the intervening pages.&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,25],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-macs","category-python"],"_links":{"self":[{"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169"}],"version-history":[{"count":5,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":366,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=\/wp\/v2\/posts\/169\/revisions\/366"}],"wp:attachment":[{"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.tulsalabs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}