{"id":100,"date":"2008-02-25T00:00:00","date_gmt":"2008-02-25T00:00:00","guid":{"rendered":"http:\/\/netexpertise\/en\/?p=100"},"modified":"2021-10-31T08:36:51","modified_gmt":"2021-10-31T06:36:51","slug":"avoid-reboot-after-partition-change-with-fdisk","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html","title":{"rendered":"Avoid Reboot after Partition Change with Fdisk"},"content":{"rendered":"\n<p>When modifying the partition table, fdisk usually returns &#8220;Device or resource busy&#8221; error messages such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">WARNING: Re-reading the partition table failed with error 16: Device or resource busy.\nThe kernel still uses the old table.\nThe new table will be used at the next reboot.\nSyncing disks.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">WARNING: re-reading the partition table failed.: device or resource busy<\/code><\/pre>\n\n\n\n<p><br>Partprobe from the &#8220;parted&#8221; package helps fixing this issue, avoiding a useless reboot. From the man page:<br>&#8220;partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.&#8221;<br><br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"\/uploads\/hard-disk-hard-drive-hdd-5793073.jpg\" alt=\"device or resource busy fdisk\"\/><figcaption><a href=\"https:\/\/pixabay.com\/users\/manseok_Kim\">manseok_Kim<\/a> \/ Pixabay<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><br>Device Busy and Fdisk<\/h3>\n\n\n\n<p>Let&#8217;s add a new partition on the Linux server with fdisk. \/dev\/cciss\/c0d0 could of course be \/dev\/sda or anything else.<br><br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@linux ~]$ fdisk \/dev\/cciss\/c0d0\nThe number of cylinders for this disk is set to 8854.\nThere is nothing wrong with that, but this is larger than 1024,\nand could in certain setups cause problems with:\n1) software that runs at boot time (e.g., old versions of LILO)\n2) booting and partitioning software from other OSs\n   (e.g., DOS FDISK, OS\/2 FDISK)\n\nCommand (m for help): p\n\nDisk \/dev\/cciss\/c0d0: 72.8 GB, 72833679360 bytes\n255 heads, 63 sectors\/track, 8854 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\n\n           Device Boot      Start         End      Blocks   Id  System\n\/dev\/cciss\/c0d0p1   *           1          16      128488+  83  Linux\n\/dev\/cciss\/c0d0p2              17        1060     8385930   8e  Linux LVM\n\/dev\/cciss\/c0d0p3            1061        2104     8385930   8e  Linux LVM\n\/dev\/cciss\/c0d0p4            2105        8854    54219375    5  Extended\n\/dev\/cciss\/c0d0p5            2105        5144    24418768+  8e  Linux LVM\n\nCommand (m for help): n\nFirst cylinder (5145-8854, default 5145):\nUsing default value 5145\nLast cylinder or +size or +sizeM or +sizeK (5145-8854, default 8854): +1000M\n\nCommand (m for help):w\nThe partition table has been altered!\n\nCalling ioctl() to re-read partition table.\n\nWARNING: Re-reading the partition table failed with error 16: Device or resource busy.\nThe kernel still uses the old table.\nThe new table will be used at the next reboot.\nSyncing disks.<\/code><\/pre>\n\n\n\n<p><br>The new partition here is not not visible on the system. fdisk -l would show the same thing.<br>I create <a href=\"\/en\/tag\/lvm\">LVM<\/a> partitions but the message would be similar with ext3 or ext4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@linux ~]$ ls \/dev\/cciss\/\nc0d0  c0d0p1  c0d0p2  c0d0p3  c0d0p4  c0d0p5<\/code><\/pre>\n\n\n\n<p><br>Running partprobe reloads the partition table and brings the partition up:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@linux ~]$ partprobe\n[root@linux ~]$ ls \/dev\/cciss\/\nc0d0  c0d0p1  c0d0p2  c0d0p3  c0d0p4  c0d0p5  c0d0p6<\/code><\/pre>\n\n\n\n<p><br>It is now possible to format and mount the partition without rebooting the server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When modifying the partition table, fdisk usually returns &#8220;Device or resource busy&#8221; error messages such as: Partprobe from the &#8220;parted&#8221; package helps fixing this issue, avoiding a useless reboot. From the man page:&#8220;partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[11],"tags":[386,76],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Avoid Reboot after Partition Change with Fdisk<\/title>\n<meta name=\"description\" content=\"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Avoid Reboot after Partition Change with Fdisk\" \/>\n<meta property=\"og:description\" content=\"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2008-02-25T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-31T06:36:51+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html\",\"name\":\"Netexpertise - Avoid Reboot after Partition Change with Fdisk\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2008-02-25T00:00:00+00:00\",\"dateModified\":\"2021-10-31T06:36:51+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk\",\"breadcrumb\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Avoid Reboot after Partition Change with Fdisk\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Avoid Reboot after Partition Change with Fdisk","description":"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk","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":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Avoid Reboot after Partition Change with Fdisk","og_description":"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk","og_url":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html","og_site_name":"Netexpertise","article_published_time":"2008-02-25T00:00:00+00:00","article_modified_time":"2021-10-31T06:36:51+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html","url":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html","name":"Netexpertise - Avoid Reboot after Partition Change with Fdisk","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2008-02-25T00:00:00+00:00","dateModified":"2021-10-31T06:36:51+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Device or resource busy: how to avoid rebooting Linux after partition changes on your disks with fdisk","breadcrumb":{"@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/avoid-reboot-after-partition-change-with-fdisk.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Avoid Reboot after Partition Change with Fdisk"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/100"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=100"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/100\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=100"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}