Linux & Storage

Linux drives explained: UUIDs, mountpoints and permissions

Inspect drives and permissions locally

These checks read local device information. Labels and paths can contain personal details. A local mount needs no upload; applications using the drive can make their own connections.

In this article
  1. Separate devices, filesystems and mountpoints
  2. Identify the drives first
  3. Begin with a read-only ext4 mount
  4. Verify the result and unmount cleanly
  5. Understand my Games and Homelab entries
  6. Use fstab or NixOS appropriately
  7. ext4 permissions are stored in the filesystem
  8. References

A second drive appears in the file manager, yet an application cannot find its folder. Or an ext4 drive is mounted but you cannot write to it. Linux storage becomes clearer when you separate the device, the filesystem on it and the place where its contents join the directory tree.

My Cthulhu configuration mounts three ext4 filesystems for Games and Homelab. We will read those entries and begin with a read-only exercise using your own cleanly unmounted ext4 test drive. This guide contains no formatting or partitioning commands.

Separate devices, filesystems and mountpoints

Term Example and meaning
Device A partition such as /dev/sdb1
UUID Identifier of a particular filesystem
Label Readable name such as Games.Vol1
Mountpoint Directory such as /mnt/Games.Vol1

Mounting makes the filesystem's content visible at the mountpoint. Files already in that directory are covered, rather than automatically deleted. Use a new, empty location for an exercise.

Device names can change between boots or after connecting drives. UUIDs and unique labels are more suitable for persistent entries. Check those too: a cloned filesystem can retain an identifier, and labels can be duplicated.

Identify the drives first

Show a selected overview:

lsblk -o NAME,SIZE,FSTYPE,LABEL,UUID,MOUNTPOINTS

Compare size, filesystem and current mountpoints against the actual drive you intend to use. Replace YOUR-EXT4-UUID in this guide with your verified identifier. It is a placeholder, not an identifier taken from my machine.

A drive automatically mounted under /run/media/... or /media/... is already mounted. Use your own test device and unmount it cleanly through the normal interface first. Do not experiment on an active root or system drive.

Begin with a read-only ext4 mount

Create a dedicated mountpoint:

sudo mkdir -p /mnt/mount-tutorial

Check that the exercise directory is empty:

ls -la /mnt/mount-tutorial

Check for an existing mount there:

findmnt --mountpoint /mnt/mount-tutorial

When no exact mount exists, findmnt can produce no output and a nonzero exit status. If something is already mounted there, do not use it for this exercise.

For your own cleanly unmounted ext4 filesystem:

sudo mount -t ext4 -o ro,noload /dev/disk/by-uuid/YOUR-EXT4-UUID /mnt/mount-tutorial

ro requests read-only access. For ext4, noload prevents journal replay, which can otherwise cause writes even during a read-only mount. On an unclean filesystem this can expose an inconsistent state; that situation needs a separate recovery procedure. The option is not a universal recipe for other filesystems.

Verify the result and unmount cleanly

Inspect source, filesystem and options:

findmnt --mountpoint /mnt/mount-tutorial -o SOURCE,FSTYPE,OPTIONS

Expect the selected ext4 filesystem and read-only mounting. Open or list known files without editing them. A write failure here is expected because of ro; it does not itself establish a permission problem.

Leave the mountpoint in your terminals and close programs using it. Then unmount:

sudo umount /mnt/mount-tutorial

If it is busy, investigate open files and working directories first. Forced or lazy unmounting is outside this beginner exercise.

Understand my Games and Homelab entries

One real excerpt is:

fileSystems."/mnt/Games.Vol1" = {
  device = "/dev/disk/by-label/Games.Vol1";
  fsType = "ext4";
  options = [ "noatime" "nofail" "x-systemd.device-timeout=1s" ];
};

Similar entries exist for Games.Vol2 and Homelab. An older comment still describes activating them later, but the actual definitions are active. Effective syntax is what matters when reading configuration.

noatime avoids normal access-time updates. nofail allows boot to continue when an optional drive is missing. The short device timeout limits waiting. It does not make an absent drive usable: an application can still fail when its data path is missing.

Use fstab or NixOS appropriately

Many distributions describe persistent mounts in /etc/fstab. An adaptable template for an optional ext4 data drive is:

UUID=YOUR-EXT4-UUID /mnt/Data ext4 defaults,noatime,nofail,x-systemd.device-timeout=5s 0 2

Back up the existing file, use the actual mountpoint and replace the identifier. nofail suits an optional data drive; it is not automatically appropriate for every required system filesystem.

Check the structure:

sudo findmnt --verify

This does not replace functional or boot testing. NixOS normally manages these entries through fileSystems in its configuration. Do not additionally edit a generated fstab as a competing source of truth.

ext4 permissions are stored in the filesystem

ext4 records ownership and permissions on the filesystem. Adding a uid= mount option, as used with some other filesystems, does not explain or fix ext4 ownership. Inspect your identity and the affected directory:

id
stat -c '%U %G %a' /mnt/Games.Vol1

The second path is appropriate only if you actually use that mount. Inspect the particular subdirectory you need. Rather than recursively assigning the whole drive to another user, determine which folders should belong to you and who else uses them. A blanket chmod 777 does not explain the problem.

References

Sources checked on 8 October 2026. These commands target your own ext4 exercise device, rather than provide a universal storage-repair procedure.