Does extending an APFS partition erase/affect data on it?

Hi,

I have a macbook pro with an internal 128g ssd, currently split into 2 partitions: one APFS partition with macos catalina, and another with a different filesystem (ext4). However, since i no longer need the ext4 partition, i want to delete it and extend the APFS partition accordingly. Am i right in thinking this operation won't affect the data currently stored on the APFS partition?

Posted on Mar 21, 2020 2:57 AM

Reply
6 replies

Mar 22, 2020 6:44 AM in response to aueuaio

Do you have two partitions? I would imagine so as I can't see a way or shoehorning ext4 into an APFS container. However, that may be how it is configured. You would have to look at Disk Utility to tell. Set the View to "All Devices." That should show the SSD with all of its physical volumes including Containers within the APFS file system.


If you have two partitions, Disk Utility should show them on the Partition tab. If your APFS partition appears before the ext4 partition, you should be able to delete the ext4 partition and them recover the free space into the APFS partition.


If the first partition is the ext4, then you cannot merge them. You would have to backup, completely erase the drive, then restore the APFS data to the newly formatted drive.


Here is the support guide for creating and modifying partitions with Disk Utility: Partition a physical disk in Disk Utility on Mac - Apple Support


Nowhere in that article does it suggest setting the View to "All Devices," but I think that would be necessary. You would then select the SSD device in the list, then Partition tab.


I haven't partitioned a drive in nearly forever, and the last time was well before CoreStorage and APFS. So, a lot has changed.

Mar 22, 2020 9:42 AM in response to aueuaio

aueuaio wrote:

there is no actual risk of data loss/corruption, right?

Even if the documentation guaranteed no data loss I would not do it without a good verified working backup. The system still has to make modifications to the container/volume and if those modifcations are interrupted or fail for whatever reason all your data may disappear and be very difficult to impossible to retrieve. As @leroydouglas mentions APFS is a very new file system with very little accurate information available about it.


As @Barney-15E pointed out the EXT volume is most likely a separate partition which will incur even more risk to combine it with the main container if it is even possible. This forum is filled with threads where users could not recombine a BootCamp partition without losing data and erasing & reinstalling macOS.


I'm amazed if your data is important that you don't have regular backups in place which would negate the need for this thread. I can tell you from personal experience that SSDs can fail at any time without any warning signs. I've seen it happen with all major brands of SSDs. Data recovery is very difficult to impossible and it would be expensive. The cost of time and money maintaining your own backups is trivial compared to a professional data recovery service which may not be successful anyway.


However, you can use and maintain your system as you feel is best.

Mar 21, 2020 5:10 AM in response to aueuaio

aueuaio wrote:

Hi,
I have a macbook pro with an internal 128g ssd, currently split into 2 partitions: one APFS partition with macos catalina, and another with a different filesystem (ext4). However, since i no longer need the ext4 partition, i want to delete it and extend the APFS partition accordingly. Am i right in thinking this operation won't affect the data currently stored on the APFS partition?


Working with APFS volume groups

https://bombich.com/kb/ccc5/working-apfs-volume-groups


When you erase a volume, all the data on the volume is permanently erased, and the empty volume remains in the container.

Add, delete, or erase APFS volumes in Disk Utility on Mac - Apple Disk Utility User Guide




I would still encourage having a current back up plan in place.

Mar 22, 2020 2:09 AM in response to leroydouglas

Thanks for the reply, i read both resources but there is no mention on what happens when an APFS partition (which, if i understood correctly, is actually called a container) is extended. I assume this means that, since i am neither initializing nor erasing any APFS volumes, but rather merely extending the container, there is no actual risk of data loss/corruption, right? The partitioning scheme on my ssd is very similar to the example of the first link you posted, the only difference is that instead of having a second APFS container, i have an ext4 partition that i want to delete, and then use the free space to extend the first APFS container.

Mar 22, 2020 6:18 AM in response to aueuaio

aueuaio wrote:

Thanks for the reply, i read both resources but there is no mention on what happens when an APFS partition (which, if i understood correctly, is actually called a container) is extended. I assume this means that, since i am neither initializing nor erasing any APFS volumes, but rather merely extending the container, there is no actual risk of data loss/corruption, right? The partitioning scheme on my ssd is very similar to the example of the first link you posted, the only difference is that instead of having a second APFS container, i have an ext4 partition that i want to delete, and then use the free space to extend the first APFS container.



Well this makes sense— no data lose in extending the volume count within a container.


The documentation is scant to no existent on the new apfs for corroborating insights.


Anytime you start making changes to a drive/container/volumes/partitions always have a current backup plan..in the event something goes sideways—Only if you value your User data.




3-2-1 Backup Strategy: three copies of your data, two different methods, and one offsite.


Boot clone https://discussions.apple.com/docs/DOC-10081

How to use Time Machine to back up or restore your Mac: https://support.apple.com/en-us/HT201250

Use DiskUtility Restore feature  https://support.apple.com/guide/disk-utility/restore-a-disk-dskutl14062/mac

note: >System Preferences>Security & Privacy >Privacy>Full Disk Access

unlock the  padlock,  press the + button and add Disk Utility 



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Does extending an APFS partition erase/affect data on it?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.