0

Currently my MacOS Catalina is installed onto my SSD. I have 128GB SSD and 3TB HDD. Half space of the SSD and large part of the HDD will be used for Linux that I am going to install. For MacOS I have around 60GB available on SSD and around 1.2TB on HDD.

I am looking for the best way (or all possible ways) to make my MacOS saving content of my VM partition (kernelcore, sleepimage and swap files) on my HDD. I am looking for a way to either:

  1. remove VM partition completely, force system to use /vm folder instead (not disk) as it used to be in the past, save /vm on HDD and make symlink to it on SSD in /private/var/
  2. remove VM partition completely, make another VM partition on my HDD (disk3s1), and use that one instead
  3. remove VM partition completely, use my whole MacOS partition (that is already being used for my user account - disk1s2) that resides on my HDD to save virtual memory files onto it

My disks list:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk2         60.5 GB    disk0s2
   3:           Linux Filesystem                         60.6 GB    disk0s3

/dev/disk1 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *3.0 TB disk1 1: EFI NO NAME 536.9 MB disk1s1 2: Apple_HFS MacOS HDD 1.2 TB disk1s2 3: Apple_APFS Container disk3 29.5 GB disk1s6 4: Linux Filesystem 1.3 TB disk1s3 5: Linux Filesystem 500.1 GB disk1s4

/dev/disk2 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +60.5 GB disk2 Physical Store disk0s2 1: APFS Volume MacOS SSD – dane 5.5 GB disk2s1 2: APFS Volume Preboot 86.1 MB disk2s2 3: APFS Volume Recovery 529.0 MB disk2s3 4: APFS Volume VM 2.1 GB disk2s4 5: APFS Volume MacOS SSD 11.2 GB disk2s5

/dev/disk3 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +29.5 GB disk3 Physical Store disk1s6 1: APFS Volume VM 897.0 KB disk3s1

I found similar question here, however I can't make it working with the "UPDATE: Simpler method". I can't mount anything by using the fstab - when I did as it was described in the question from the link, my disk appears as unmounted and can't be mounted due to an error (Error com.apple.DiskManagement.disenter: 49218). Also I can't unmount the original VM disk:

diskutil unmount /dev/disk2s4
Volume VM on disk2s4 failed to unmount: dissented by PID 0 (kernel_task)

With sudo prefix, it just freezes the terminal.

Also mounting a volume didn't work when I tried:

sudo diskutil mount -mountPoint /volumes/ disk3s1  
Volume on disk3s1 failed to mount
Perhaps the operation is not allowed by the invoking user (kDAReturnNotPrivileged)
This appears to be an APFS Volume; note that locked APFS volumes
will not mount unless unlocked (e.g. "diskutil apfs unlockVolume")

I also tried to mount to /private/var/vm with the same result. Volume is not locked - when I tried unlockVolume.

At the end I can add that when I eddied fstab by adding this line:

UUID=<disk2s4 UUID here> none hfs rw,noauto

it still mounted to /private/var/vm.

PaweX3
  • 1
  • 2
  • 2
    Why not just create a fusion container and let macOS decide which disk to use? – David Anderson Feb 07 '22 at 06:50
  • I presume this is an iMac. Won't putting all the VM on the mechanical hard drive have a significant effect on performance? It would be much simpler to buy an external SSD and boot Linux off that. – benwiggy Feb 07 '22 at 09:56
  • I don't want to use any external drivers. Yes, it is upgraded iMac, I don't think it's an good idea to put Virtual Memory on its build-in SSD, I read its not very fast to save data. But anyway, I have 24GB of RAM (added), I don't want to save the sleepimage on partition that has 60GB. Disabling sleepimage would be one of very last options. I am not sure if I can put half of SSD and 1/3 of HDD into fusion. I don't want to give all the space of SSD and HDD to MacOS. – PaweX3 Feb 07 '22 at 22:32
  • After experimenting with the system files, I went to a point where I had to reinstall everything from scratch. I took this opportunity to see if I can make a Fusion Drive only using part of my SSD and part of HDD. I looks like it is working, however I read somewhere it's not recommended. Officially Fusion Drive is supposed to be made of single platter-based HDD and SSD. I have 3TB HDD, I doubt it is single platter-based. I am wondering, why it's not recommended, what may go wrong, technically. – PaweX3 Feb 10 '22 at 05:06

0 Answers0