{"id":28654,"date":"2023-06-25T10:00:40","date_gmt":"2023-06-25T17:00:40","guid":{"rendered":"https:\/\/www.podfeet.com\/blog\/?p=28654"},"modified":"2023-06-25T07:42:35","modified_gmt":"2023-06-25T14:42:35","slug":"apfs-test-volume","status":"publish","type":"post","link":"https:\/\/www.podfeet.com\/blog\/2023\/06\/apfs-test-volume\/","title":{"rendered":"Create a Test Volume to Diagnose Your Mac with APFS"},"content":{"rendered":"<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2023\/06\/Battery-Graph-from-iStat-Menus-Showing-Massive-Battery-Loss-Over-Night.jpg\" alt=\"Battery Graph from iStat Menus Showing Massive Battery Loss Over Night\"  title=\"Battery Graph from iStat Menus Showing Massive Battery Loss Overnight.jpg\" width=\"400 \" height=\"333\"><figcaption style=\"text-align:center\">Battery Graph from iStat Menus Showing Massive Battery Loss Overnight<\/figcaption><\/figure>\n<p>As you probably know, my 14\u201d MacBook Pro has been plagued by battery life well below the advertised numbers pretty much since the day I got it in late 2020.  Apple continue to work with me to try to figure out the root cause and we\u2019ve yet to figure out how to fix it. In the process though, Apple Engineering added a very interesting tool for my tool belt for diagnosing problems.<\/p>\n<p>One of the first things that\u2019s always suggested when having issues on your Mac (or I imagine on your PC), is to create a clean user account and see if the problem persists.  This is a good diagnostic step because it ensures that none of the preference files that have been created for your main account will be present on the clean account.  It\u2019s a good idea to create a clean user account when nothing is wrong so you\u2019ll have it ready for testing when something inevitably goes belly up.<\/p>\n<p>While the clean user account is a great first step, it doesn\u2019t eliminate all of the variables. All the software you have installed is still available with this clean user account.  Additionally, if you\u2019ve said \u201cyes\u201d to the request on whether to install particular apps for all users, they will even launch by default. For example, I evidently agreed to have all users be able to run iStat Menus, because it comes up automatically when I log into my clean user account.  In any case, \u201cclean\u201d is a matter of interpretation.<\/p>\n<p>Another diagnostic step is to boot into Safe Mode. <a href=\"https:\/\/support.apple.com\/en-us\/HT201262\">Apple\u2019s support article about Safe Mode<\/a> explains that it can help you determine whether an issue is caused by software that loads as your Mac starts up. Safe Mode doesn\u2019t run login items, avoids system extensions not required by macOS, and doesn\u2019t install any fonts not installed by macOS.  I\u2019ve always been fascinated by the fact that fonts can bork an operating system, but that\u2019s a discussion for another day.<\/p>\n<p>While Safe Mode can eliminate software factors, it\u2019s virtually impossible to actually use your system in Safe Mode. The graphics are weird, and you don\u2019t have access to the things you need in order to work with your Mac. If you can\u2019t use it, it\u2019s kind of hard to test to see if many kinds of problems have gone away.  Safe mode does do a basic check of your startup disk and deletes some system caches so that might actually fix the problem you\u2019ve been having. I have to point out that it clears out those pesky font caches too. However, it\u2019s never fixed a problem for me.<\/p>\n<p>So a clean user account might help you diagnostically, and booting into safe mode might actually fix the problem. But sometimes (as in my case with the battery drain issue), you might need to do a clean install.  And I mean the squeaky-clean install that I do where you install every app from scratch.<\/p>\n<p>But obviously, that\u2019s a terribly annoying step and if it doesn\u2019t solve the problem you\u2019ve wasted a huge amount of time. When I got my Mac back from Apple last August after replacing the battery, they had helpfully erased my drive. I reinstalled everything from scratch and the battery drain problem came back with it.<\/p>\n<p>And here\u2019s where Apple Engineering gave me what I think is a brilliant diagnostic idea.<\/p>\n<p>If you have a disk formatted as APFS, you can create separate Volumes on that single disk.  They act like separate drives but they\u2019re all on the same physical drive.  Unlike the old concept of creating partitions, you don\u2019t have to decide ahead of time how big to make them. APFS Volumes automatically resize as required.<\/p>\n<figure style=\"float: center; margin: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2023\/06\/Test-Volume-Creation-with-APFS-Using-Disk-Utility.png\" alt=\"Test Volume Creation with APFS Using Disk Utility\"  title=\"Test Volume Creation with APFS Using Disk Utility.png\" width=\"599 \" height=\"393\"><figcaption style=\"text-align:center\">Test Volume Creation with APFS Using Disk Utility<\/figcaption><\/figure>\n<p>Creating a new Volume is super easy. Open Disk Utility, which is inside the Utilities folder inside your Applications folder. In the toolbar, there&#8217;s a + button that says Volume. After selecting to add a new Volume, you&#8217;ll be prompted to name the Volume and set the format to APFS.  The popup will remind you that APFS Volumes share storage space within the container. Simply hit the Add button and voil\u00e0! You have a new Volume.<\/p>\n<p>Apple engineering had me create this new test Volume and then they had me install macOS Ventura onto the Volume. It never occurred to me before that you could do this.  It&#8217;s a brilliant way to do a clean install on your Mac without disrupting your real working installation with all your apps and settings.<\/p>\n<p>Inside System Settings, General, you&#8217;ll see Startup Disk at the bottom. In this setting, you tell your Mac to boot from the test Volume. When you&#8217;re done playing in the test Volume, open Startup Disk again and switch to your real Volume. Isn&#8217;t that an awesome idea?<\/p>\n<h3>How\u2019s that Battery Problem Going?<\/h3>\n<p>You might be wondering, did this cool trick help Apple diagnose my battery problem?  I\u2019ll give you a recap to date, but the short version is that we still have no idea what&#8217;s causing my MacBook Pro&#8217;s battery drain.  Everyone at Apple agrees it\u2019s not working as designed, so Apple hasn\u2019t given up, but the hardware people are convinced it&#8217;s not that and we can&#8217;t prove it&#8217;s the software either.  For three solid months I\u2019ve been meeting with Margo from Apple on a near-weekly basis as we run every test Apple engineering asks us to run. We&#8217;ve become quite close &#8211; I know she has a 20-something son who&#8217;s adorable and her air conditioning went out last week during a heat wave.<\/p>\n<p>After Apple Engineering had me create the test Volume, they had me run two battery tests where my Mac wasn\u2019t connected to any peripherals, and the lid was closed and asleep for a full night. In the first test, I was logged into iCloud, and in the second I was logged out of iCloud.<\/p>\n<p>On the test account on the new Volume, while logged into iCloud, the battery lost 15% overnight just like it did when logged into my real account with all my data and apps installed. This is definitely <em>not<\/em> expected behavior.  The results suggest that nothing I\u2019ve done in adding third-party apps is the root cause of the problem.<\/p>\n<p>We also thought maybe this proved it was hardware until I ran the second test. I logged out of iCloud and overnight while logged into the clean Volume, my MacBook Pro lost no battery charge at all.<\/p>\n<p>So\u2026that means it\u2019s iCloud, right?  Well \u2026 maybe.<\/p>\n<p>You may recall that I bought an M2 MacBook Air recently. I was doing so many experiments for Apple that I couldn\u2019t really use my MacBook Pro. The MacBook Air has been indispensable for me and made me a lot more patient dealing with Apple. Also, I love the machine!<\/p>\n<p>It occurred to me that there was a third experiment I could run that could help verify whether it was iCloud chewing up my battery.  I created a clean test Volume on the MacBook Air, logged into iCloud, and put the machine to sleep overnight.  And \u2026 drum roll please \u2026 it did not lose any battery charge in 12 hours.<\/p>\n<p>So we\u2019ve determined it\u2019s not the hardware. We\u2019ve determined it\u2019s not the third-party software. We\u2019ve determined it\u2019s not iCloud <em>unless<\/em> it\u2019s on my MacBook Pro.<\/p>\n<h3>Another Fun Use of the Test Volume<\/h3>\n<p>While I haven\u2019t figured out why my $4000 laptop gets half the battery life that Apple says I should expect, I found another cool use of the test Volume idea.  You can safely run a beta operating system using a new APFS Volume! Volumes don\u2019t talk to each other in any way so it\u2019s like having an external disk on which you run the betas.<\/p>\n<p>I\u2019m happily running the macOS Sonoma developer build on my M2 MacBook Air in its own little volume. I\u2019m having fun with no risks! When the beta is over, I can simply delete the Volume and upgrade my real Volume to macOS Sonoma.<\/p>\n<h3>Bottom Line<\/h3>\n<p>The bottom line is that creating a test Volume on a Mac using APFS is a great way to diagnose problems without doing a clean install. It\u2019s also a great way to test new operating system versions. In theory, it should have given us a strong indicator of my battery problems, but I wasn\u2019t that lucky.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Battery Graph from iStat Menus Showing Massive Battery Loss Overnight As you probably know, my 14\u201d MacBook Pro has been plagued by battery life well below the advertised numbers pretty much since the day I got it in late 2020. Apple continue to work with me to try to figure out the root cause and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":28656,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"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":[147],"tags":[5934,3608,5935,572,167,5937,5936],"class_list":["post-28654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts","tag-apfs","tag-apfs-volumes","tag-battery-problems","tag-diagnostics","tag-icloud","tag-macos-sonoma","tag-sonoma"],"jetpack_featured_media_url":"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2023\/06\/Test-Volume-Creation-with-APFS-Using-Disk-Utility-1040x520-1.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=28654"}],"version-history":[{"count":1,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28654\/revisions"}],"predecessor-version":[{"id":28655,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28654\/revisions\/28655"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media\/28656"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=28654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=28654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=28654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}