{"id":1234,"date":"2016-03-12T00:09:39","date_gmt":"2016-03-11T22:09:39","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=1234"},"modified":"2016-03-12T00:09:39","modified_gmt":"2016-03-11T22:09:39","slug":"kvm-raw-imaj-dosyasini-yeniden-sparse-dosya-haline-getirmek","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2016\/03\/12\/kvm-raw-imaj-dosyasini-yeniden-sparse-dosya-haline-getirmek\/","title":{"rendered":"kvm .raw imaj dosyasini yeniden sparse dosya haline getirmek"},"content":{"rendered":"<p>daha once bu konu hakkinda yazmistim.<\/p>\n<p>bir daha yazmak icap etti.<\/p>\n<p>kvm lerde kullandigim .raw imaj dosyalari sparse degiller.<\/p>\n<p>halbuki sparse olsalar aktarirken 200GB yerin 20Gb aktaracagim.<\/p>\n<p>haydi .raw imajlari sparse edelim.<\/p>\n<p>1- ilgili virtual makinaya gir ve diskin heryerini 0 larla doldur:<\/p>\n<p>dd if=\/dev\/zero of=\/tmp\/zerotxt bs=1M<\/p>\n<p>islem bitince sync et<\/p>\n<p>sync<\/p>\n<p>zerotxt yi sil<\/p>\n<p>rm \/tm\/zerotxt<\/p>\n<p>2- simdi virtual makinadan cik ve makinayi kapat.<\/p>\n<p>imaj dosyanin bulundugunu dizine git. en hizli ve en kolay yontem imaji copy edecegiz.<\/p>\n<p>cp &#8211;sparse=always vm-foo.raw vm-foo.raw-sparse<\/p>\n<p>3- simdi elimizde sparse dosyamiz oldu.<\/p>\n<p>\/var\/lib\/vz\/images\/101# ls -lash<br \/>\ntotal 252G<br \/>\n4,0K drwxr-xr-x  2 root root 4,0K Mar 11 08:04 .<br \/>\n4,0K drwxr-xr-x 12 root root 4,0K Ara  6 09:54 ..<br \/>\n201G -rw-r&#8211;r&#8211;  1 root root 200G Mar 11 23:40 vm-101-disk-1.eski.raw<br \/>\n 51G -rw-r&#8211;r&#8211;  1 root root 200G Mar 11 07:55 vm-101-disk-1.raw<\/p>\n<p>hemen yeni sunucuya transfer edelim \ud83d\ude42<\/p>\n<p>gule gule kullanalim.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>daha once bu konu hakkinda yazmistim. bir daha yazmak icap etti. kvm lerde kullandigim .raw imaj dosyalari sparse degiller. halbuki sparse olsalar aktarirken 200GB yerin 20Gb aktaracagim. haydi .raw imajlari sparse edelim. 1- ilgili virtual makinaya gir ve diskin heryerini 0 larla doldur: dd if=\/dev\/zero of=\/tmp\/zerotxt bs=1M islem bitince sync et sync zerotxt yi sil [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1234","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1234"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1234\/revisions"}],"predecessor-version":[{"id":1235,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1234\/revisions\/1235"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}