{"id":372,"date":"2015-10-09T12:33:59","date_gmt":"2015-10-09T17:33:59","guid":{"rendered":"http:\/\/nukeitmike.com\/blog\/?p=372"},"modified":"2015-10-09T12:33:59","modified_gmt":"2015-10-09T17:33:59","slug":"shrinking-volumes","status":"publish","type":"post","link":"https:\/\/blog.nukeitmike.com\/index.php\/2015\/10\/09\/shrinking-volumes\/","title":{"rendered":"Shrinking volumes"},"content":{"rendered":"<p>Sometimes, I find it useful to shrink volumes.&#160; This happens about once every 2 or 3 years.&#160; Since I do it so infrequently, I have to look it up every time.<\/p>\n<p>In my experience, while you can do it from the GUI, it isn\u2019t always successful.&#160; Also, I have not ever seen it work to try and shrink it by the complete amount that is available to shrink.&#160; My experiences are related to very large (larger than 1 TB) volumes.<\/p>\n<p>To shrink via the command line, at an elevated prompt, do the following:<\/p>\n<p><strong>Diskpart<\/strong> \u2013 this is the disk management CLI<\/p>\n<p><strong>List volumes<\/strong> \u2013 this is the diskpart cmd that gives you a list of volumes (not to be confused with the list of disks<\/p>\n<p><strong>select volume &lt;#&gt;<\/strong> \u2013 this is how you select the volume that you want to work on, i.e. \u201c<em>select volume 2<\/em>\u201d<\/p>\n<p><strong>shrink querymax<\/strong> \u2013 this tells you how much space can be trimmed off the volume.&#160; There are several factors that affect this, but the primary things are how big the volume is to begin with, and where on that volume the un-movable system files&#160; are located.<\/p>\n<p><strong>shrink desired=&lt;size in MB&gt;<\/strong> \u2013 this tells the volume to shrink by the amount of space given in MB.&#160; I.e. \u201c<em>shrink desired=102400<\/em>\u201d will shrink the volume by 100GB.<\/p>\n<p><strong>shrink minimum=&lt;size in MB&gt;<\/strong> \u2013 this tells the volume to shrink by the amount specified, but only if it can shrink by that amount<\/p>\n<p>You can use the minimum and desired together if you want.&#160; You can also add a \u201c<strong>NOWAIT<\/strong>\u201d so that the prompt returns and you don\u2019t have to wait to see the results.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, I find it useful to shrink volumes.&#160; This happens about once every 2 or 3 years.&#160; Since I do it so infrequently, I have to look it up every time. In my experience, while you can do it from the GUI, it isn\u2019t always successful.&#160; Also, I have not ever seen it work to&hellip; <a class=\"more-link\" href=\"https:\/\/blog.nukeitmike.com\/index.php\/2015\/10\/09\/shrinking-volumes\/\">Continue reading <span class=\"screen-reader-text\">Shrinking volumes<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10,17],"tags":[75,76,163],"class_list":["post-372","post","type-post","status-publish","format-standard","hentry","category-general-info","category-microsoft","tag-disk-manamgent","tag-diskpart","tag-shrink","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pcW544-60","_links":{"self":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/comments?post=372"}],"version-history":[{"count":0,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/posts\/372\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/media?parent=372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/categories?post=372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nukeitmike.com\/index.php\/wp-json\/wp\/v2\/tags?post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}