I recently ran through an install of Nix on a fresh laptop with Big Sur with no problems. While attempting to help a coworker get nix set up on his Big Sur iMac, we ran into an issue.
Nix install output
Creating volume and mountpoint /nix.
------------------------------------------------------------------
| This installer will create a volume for the nix store and |
| configure it to mount at /nix. Follow these steps to uninstall. |
------------------------------------------------------------------
1. Remove the entry from fstab using 'sudo vifs'
2. Destroy the data volume using 'diskutil apfs deleteVolume'
3. Remove the 'nix' line from /etc/synthetic.conf or the file
Configuring /etc/synthetic.conf...
Password:
nix
Creating mountpoint for /nix...
Creating a Nix Store volume...
Will export new APFS Volume "Nix Store" from APFS Container Reference disk2
Started APFS operation on disk2
Preparing to add APFS Volume to APFS Container disk2
Creating APFS Volume
Created new APFS Volume disk2s8
Mounting disk
Setting volume permissions
Disk from APFS operation: disk2s8
Finished APFS operation on disk2
Configuring /etc/fstab...
123
164
performing a single-user installation of Nix...
copying Nix to /nix/store..............................cp: /nix/store/./hg222lrawfg79yqplqypsfawnywsxhpr-ICU-osx-10.10.5.81234/include/unicode/basictz.h: No space left on device
cp: /nix/store/./hg222lrawfg79yqplqypsfawnywsxhpr-ICU-osx-10.10.5.81234/include/unicode/udata.h: No space left on device
[snip many many more "No space left on device" lines]
There is plenty of space left on his computer (~950G). We uninstalled nix following the instructions in the installer and tried again, but same outcome. Anyone else run into this issue or have any suspicions about what might be going on?
One big difference here is that the iMac has two physical disks. Here is the output of diskutil list
:
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *28.0 GB disk0
1: EFI āØEFIā© 314.6 MB disk0s1
2: Apple_APFS āØContainer disk2ā© 27.7 GB disk0s2
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk1
1: EFI āØEFIā© 209.7 MB disk1s1
2: Apple_APFS āØContainer disk2ā© 1000.0 GB disk1s2
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1.0 TB disk2
Physical Stores disk0s2, disk1s2
1: APFS Volume āØMacintosh HD - Dataā© 1.0 MB disk2s1
2: APFS Volume āØPrebootā© 481.6 MB disk2s2
3: APFS Volume āØRecoveryā© 613.8 MB disk2s3
4: APFS Volume āØVMā© 3.2 GB disk2s4
5: APFS Volume āØMacintosh HD - Dataā© 125.1 GB disk2s5
6: APFS Volume āØMacintosh HDā© 15.1 GB disk2s6
7: APFS Snapshot āØcom.apple.os.update-...ā© 15.1 GB disk2s6s1
8: APFS Volume āØNix Storeā© 45.0 MB disk2s8
What do df -H
and df -i
say?
@abathur, thanks for taking a look! Hereās df -H
. df -i
shows exactly the same info.
$ df -H
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk2s6s1 1.0T 15G 879G 2% 568975 10035373545 0% /
devfs 198k 198k 0B 100% 668 0 100% /dev
/dev/disk2s4 1.0T 3.2G 879G 1% 3 10035942517 0% /System/Volumes/VM
/dev/disk2s2 1.0T 482M 879G 1% 1648 10035940872 0% /System/Volumes/Preboot
/dev/disk2s7 1.0T 2.2M 879G 1% 15 10035942505 0% /System/Volumes/Update
/dev/disk2s5 1.0T 125G 879G 13% 901064 10035041456 0% /System/Volumes/Data
/dev/disk2s1 1.0T 1.0M 879G 1% 84 10035942436 0% /Volumes/Macintosh HD - Data
map auto_home 0B 0B 0B 100% 0 0 100% /System/Volumes/Data/home
/dev/disk2s8 1.0T 45M 879G 1% 2421 10035940099 0% /nix
No problemāthough Iām not sure Iāll be tons of help⦠I donāt think Iāve seen this message when it didnāt derive from a simple lack of space or inodes. I tried a single-user install on a fresh Big Sur install (without the second disk) and it ran okay.
AFAIK this is a fairly low-level message from the OS, so I will be a little surprised if this is anything nix-specific. I skimmed a few threads but didnāt find an obvious match. Iāll just barf out some troubleshooting thoughts?
- reboot, if you havenāt?
- look at
diskutil info disk2s8
and confirm
- whether ownership is enabled
- reported container free space aligns with what df reported
- doesnāt report as read-only?
- look into whether there are any storage space quotas set up? (Iām not sure how these would report/manifest; I havenāt used the feature)
- try manually copying files into /nix (with both cp and finder) to see if you can reproduce the same error reliably?
- open the system console (or stream/log to file with the log command?), and either manually trigger the error or try to install again and search it for more context about/around the storage error
- if compression is enabled, try without?
I also saw a number of posts mention the possibility of corruption and suggest rebooting to recovery to scan/repair with disk utility. At least one mentioned the chance of data loss with this.
Fantastic troubleshooting advice, Iāll go through that with them and see what happens. Iāll report back, but I agree that it doesnāt seem nix specific based on the No space left on device
message, just wasnāt sure if there was some configuration thing in the nix installer that I just donāt know about maybe causing issues.
Thanks again and Iāll check back in ASAP!
Alright, after all of that, it turns out that my coworker didnāt add the --darwin-use-unencrypted-nix-store-volume
switch when running the installation instructions thinking that it was just a comment or something. Granted, heās a UI designer not a developer so I shouldāve double-checked his entire log! We ran through all of the troubleshooting suggested here, restarted the computer, and I sent him the exact string to copy into terminal, and it worked flawlessly!
I guess itās good to know that this is a clue for anyone running into this issue in the future? 
Thanks again for your help @abathur !
1 Like