{"id":600,"date":"2020-12-22T07:31:06","date_gmt":"2020-12-22T07:31:06","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=600"},"modified":"2020-12-22T13:23:37","modified_gmt":"2020-12-22T13:23:37","slug":"how-to-remove-dockers-and-configure-with-btrfs","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/","title":{"rendered":"How to Remove Dockers and Configure with Btrfs?"},"content":{"rendered":"<p>Btrfs is the next generation filesystem that supports advanced storage technologies. Btrfs is a good fit for Docker and is included in the Linux kernel.<\/p>\n<p>Btrfs storage driver has many features for image and container management. Some of these features are block-level operations, thin provisioning, copy-on-write snapshots and easy administration. It can easily combine multiple physical block devices into a single Btrfs filesystem<\/p>\n<p>The first step is to install Btrfs and make sure the volume is formatted as Btrfs. The next step is to clean all dockers and images<\/p>\n<p>The following command deletes all containers<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # sudodockerrm $(sudodockerps \u2013a \u2013q)<\/em><\/p>\n<p>The following command deletes all images<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # sudodockerrmi $(sudodocker images \u2013q)<\/em><\/p>\n<p>The next step is to ensure you have Btrfs on your system<\/p>\n<p><em># sudo cat \/proc\/filesystems | grep btrfs<\/em><\/p>\n<p>The next step is to stop the docker service<\/p>\n<p><em># sudo service docker stop<\/em><\/p>\n<p>The next step is to create a backup of your docker settings<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # sudo mv \/var\/lib\/docker \/var\/lib\/docker.bak<\/em><\/p>\n<p>The next step is to create a sub volume from the existing btrfs<\/p>\n<p><em># btrfssubvolume create \/archive\/dockers<\/em><\/p>\n<p><strong>Note: We would recoomend to use dedicated disk for this<\/strong><\/p>\n<p>The next step is to create a symbolic link<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # ln \u2013s \/archive\/dockers \/var\/lib\/docker<\/em><\/p>\n<p>The next step is to copy the backup data to the new location<\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # cp \u2013rp \/var\/lib\/docker.bak\/* \/var\/lib\/docker\/<\/em><\/p>\n<p>The next step is to configure the docker to use the btrfs storage driver. We would need to edit or create the file \/etc\/docker\/daemon.json file even though \/var\/lib\/docker is using btrfs file system<\/p>\n<p>{<\/p>\n<p>\u201cstorage-driver\u201d: \u201cbtrfs\u201d<\/p>\n<p>}<\/p>\n<p>The next step is to save the file and restart the docker service.<\/p>\n<p><em># Start docker service<\/em><\/p>\n<p><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # sudo service docker start<\/em><\/p>\n<p>The following step is to check if docker is running with docker support<\/p>\n<p><em># sudodocker info | grep \u201cStorage Driver\u201d<\/em><\/p>\n<p>The following command checks the volume created<\/p>\n<p># btrfssubvolume list \/var\/liv\/docker | grep dockers | grep docker<\/p>\n<p>At <strong>Velan<\/strong>, our server support engineers can help you remove the dockers and configure with btrfs. We troubleshoot problems like these for our clients every day.\u00a0If you are interested in our service, please fill the <a href=\"https:\/\/velaninfo.com\/contact\"><strong>Quick connect<\/strong><\/a> form to get in touch with us<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Btrfs is the next generation filesystem that supports advanced storage technologies. Btrfs is a good fit for Docker and is included in the Linux kernel. Btrfs storage driver has many features for image and container management. Some of these features are block-level operations, thin provisioning, copy-on-write snapshots and easy administration. It can easily combine multiple&#8230;<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-600","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-dockers","Categories_tech_tip-linux","Categories_tech_tip-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Remove Dockers and Configure with Btrfs | Velan<\/title>\n<meta name=\"description\" content=\"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Remove Dockers and Configure with Btrfs?\" \/>\n<meta property=\"og:description\" content=\"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-22T13:23:37+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-remove-dockers-and-configure-with-btrfs\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-remove-dockers-and-configure-with-btrfs\\\/\",\"name\":\"How to Remove Dockers and Configure with Btrfs | Velan\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"datePublished\":\"2020-12-22T07:31:06+00:00\",\"dateModified\":\"2020-12-22T13:23:37+00:00\",\"description\":\"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-remove-dockers-and-configure-with-btrfs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-remove-dockers-and-configure-with-btrfs\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-remove-dockers-and-configure-with-btrfs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Remove Dockers and Configure with Btrfs?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Remove Dockers and Configure with Btrfs | Velan","description":"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/","og_locale":"en_US","og_type":"article","og_title":"How to Remove Dockers and Configure with Btrfs?","og_description":"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/","og_site_name":"Velan","article_modified_time":"2020-12-22T13:23:37+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/","name":"How to Remove Dockers and Configure with Btrfs | Velan","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"datePublished":"2020-12-22T07:31:06+00:00","dateModified":"2020-12-22T13:23:37+00:00","description":"Steps to remove dockers and configure btrfs | Velan offers Remote Server Support Services","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-remove-dockers-and-configure-with-btrfs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to Remove Dockers and Configure with Btrfs?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=600"}],"version-history":[{"count":2,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/600\/revisions"}],"predecessor-version":[{"id":602,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/600\/revisions\/602"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=600"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}