0

I'm stuck on figuring out whether this is (1) a NixOS problem, (2) a Vultr problem, (3) something particular to my image.

I have a Vultr VPS running custom Nix image (18.09 Jellyfish), and the console shows an allocated space of 80G.

Meanwhile, df -h shows me this:

[agam@nixos:~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        198M     0  198M   0% /dev
tmpfs           2.0G  4.0K  2.0G   1% /dev/shm
tmpfs           989M  3.0M  986M   1% /run
tmpfs           2.0G  456K  2.0G   1% /run/wrappers
tmpfs           2.0G  401M  1.6G  21% /
/dev/root       1.1G  1.1G     0 100% /iso
/dev/loop0      1.1G  1.1G     0 100% /nix/.ro-store
tmpfs           2.0G  2.0G     0 100% /nix/.rw-store
unionfs         3.0G  3.0G     0 100% /nix/store
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           396M     0  396M   0% /run/user/0
tmpfs           396M     0  396M   0% /run/user/1000

Where is the rest of the allocated space?

mount shows:

[agam@nixos:~]$ mount
devtmpfs on /dev type devtmpfs (rw,nosuid,size=202364k,nr_inodes=504154,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=3,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,size=2023628k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=1011816k,mode=755)
ramfs on /run/keys type ramfs (rw,nosuid,nodev,relatime,mode=750)
tmpfs on /run/wrappers type tmpfs (rw,nodev,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on / type tmpfs (rw,relatime,mode=755)
/dev/sr0 on /iso type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
/iso/nix-store.squashfs on /nix/.ro-store type squashfs (ro,relatime)
tmpfs on /nix/.rw-store type tmpfs (rw,relatime,mode=755)
unionfs on /nix/store type fuse.unionfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other)
unionfs on /nix/store type fuse.unionfs (ro,relatime,user_id=0,group_id=0,default_permissions,allow_other)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=404724k,mode=700)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=404724k,mode=700,uid=1000,gid=100)

I think I just have to manually install partition on the VPS-provided storage and somehow move / on to it:

fdisk shows:

Disk /dev/vda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
  • Root on tmpfs... not meant to last long? Likely needs a proper install. – xenoid Apr 2 at 0:07
  • 1
    tmpfs 2.0G 401M 1.6G 21% / and /dev/root 1.1G 1.1G 0 100% /iso make me think you've booted into a rescue image and not an installed OS. – Stephen Harris Apr 2 at 0:18
0

Thanks to the commenters, turns out I was being stupid after all, I had forgotten to actually install NixOS from the attached ISO (!)

After fdisk /dev/vda, creating a partition there, setting up /etc/nixos/configuration.nix the right way and then sudo nixos-install, everything is as it should be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.