Files, sizes, mounts, tmpfs, loop devices and recovering from a full disk.
- Add a Sized tmpfs to fstabeasy · in-browser
Write /etc/fstab: add ONE line mounting a tmpfs at /var/cache/app. Device tmpfs, mount point /var/cache/app, type tmpfs, with options that cap the size at 512M, set nosuid and nodev, and set mode=1777. Use dump 0 and pass 0.
(Authored config, graded structurally — the engine isn't run here.)
- Bind-Mount a Directory in fstabeasy · in-browser
Write /etc/fstab: add ONE line that bind-mounts the existing directory /srv/shared onto /home/team/shared. The first field is the source path, the second the target, type none, and the options field must contain bind. Use dump 0 and pass 0.
(Authored config, graded structurally — the engine isn't run here.)
- Create a 5 MiB fileeasy
Create /opt/blob.dat exactly 5 MiB (5242880 bytes).
- Create a tarballeasy
Archive the directory /srv/app into /opt/app.tar.gz (gzip).
- Enable a Swap File in fstabeasy · in-browser
Write /etc/fstab: add ONE line activating the swap file /swapfile at boot. Device /swapfile, mount point none, type swap, options sw and a priority pri=10. Use dump 0 and pass 0.
(Authored config, graded structurally — the engine isn't run here.)
- Extract an archiveeasy
Extract /opt/bundle.tgz so that /srv/unpacked/marker exists.
- Find the largest fileeasy
Find the single largest regular file anywhere under /var/data and write its absolute path to /home/player/big.txt.
- Is it a mount point?easy
Write 1 to /home/player/v.txt if /proc is a mount point, else 0.
- Mount a Disk by UUID in fstabeasy · in-browser
Write /etc/fstab: add ONE line mounting an ext4 filesystem identified by UUID at /data. Use the UUID= form for the device, mount point /data, type ext4, mount options defaults,nofail so a missing disk does not block boot, dump 0 and fsck pass 2.
(Authored config, graded structurally — the engine isn't run here.)
- Raise the Open-File Limiteasy · in-browser
Write /etc/security/limits.d/90-nofile.conf raising the open-file descriptor cap. Add two lines applying to all users (the * domain): a soft nofile limit of 65535 and a hard nofile limit of 65535.
(Authored config, graded structurally — the engine isn't run here.)
- Remove the backup fileeasy
Somewhere under /var/data there is exactly one *.bak file. Delete it.
- Repoint a broken symlinkeasy
The symlink /srv/app/current is dangling. Point it at the real release /srv/app/releases/v2.
- Truncate to 1 MiBeasy
Resize /opt/big.dat down to exactly 1 MiB.
- Add an autofs Master Map Entrymedium · in-browser
Write /etc/auto.master.d/data.autofs: an autofs master-map drop-in. Add ONE line that associates the indirect mount-point base /mnt/auto with the map file /etc/auto.data and passes the options --timeout 120 and --ghost.
(Authored config, graded structurally — the engine isn't run here.)
- Add swap spacemedium
Create a 128 MiB swap file and enable it (it must show in swapon).
- Attach a loop devicemedium
Create an 8 MiB image file at /opt/blk.img and attach it as a loop device using losetup.
- Author a systemd .mount Unitmedium · in-browser
Write /etc/systemd/system/srv-data.mount: a systemd mount unit that mounts /dev/sdb1 at /srv/data as an XFS filesystem with the noatime option. Include a [Unit] section, a [Mount] section with What, Where, Type and Options, and an [Install] section wanting it under multi-user.target.
(Authored config, graded structurally — the engine isn't run here.)
- Configure log rotationmedium
Create /etc/logrotate.d/app that rotates /var/log/app.log daily and keeps 7 rotations.
- Count empty filesmedium
Write the number of zero-byte regular files under /var/scan to /home/player/n.txt.
- Create a bind mountmedium
Bind-mount /srv/data onto /mnt/data so the same files appear at both paths.
- Create a hard linkmedium
Make /opt/link.txt a hard link to /opt/orig.txt (same inode, link count 2).
- Declare a RAID Array in mdadm.confmedium · in-browser
Write /etc/mdadm.conf describing a software RAID array. Add a DEVICE line scanning /dev/sd* members, and an ARRAY line for /dev/md0 specifying level=raid1, num-devices=2, and a UUID= identifier so the array is assembled deterministically.
(Authored config, graded structurally — the engine isn't run here.)
- Define a LUKS Volume in crypttabmedium · in-browser
Write /etc/crypttab: add ONE line that unlocks a LUKS volume. The mapped name is sdb1_crypt, the backing device is given by UUID=, the key file field is none (prompt for the passphrase), and the options field must request the luks type and enable discard (TRIM) passthrough.
(Authored config, graded structurally — the engine isn't run here.)
- Extract stripping a componentmedium
Extract /opt/bundle.tgz into /srv/out so files land WITHOUT the archive's top 'pkg/' directory (use --strip-components).
- Largest subdirectorymedium
Write the absolute path of the largest immediate subdirectory of /var/data to /home/player/big.txt.
- Mount a tmpfsmedium
Mount a tmpfs filesystem at /mnt/cache.
- Mount a tmpfsmedium
Mount a tmpfs (size 32M) at /mnt/scratch. Create the mount point if needed.
- Mount a tmpfs cachemedium
Mount a tmpfs at /mnt/cache.
- Preallocate spacemedium
Preallocate /opt/pre.dat to 8 MiB.
- Reclaim disk spacemedium
/var/log/bigjunk.log is wasting space. Reduce it to under 1 MiB (truncate or delete it).
- Resolve a symlink chainmedium
Create /opt/a that ultimately resolves to /opt/real (via at least one intermediate symlink /opt/b).
- Tune an ext4 Filesystem Scriptmedium · in-browser
Write /home/player/tune.sh: a bash script that retunes the ext4 filesystem on /dev/sdb1 with tune2fs. Set the reserved-blocks percentage to 1 (-m 1), set the maximum mount count to 30 (-c 30), and add the dir_index feature (-O dir_index). Start with a bash shebang and set -euo pipefail.
(Authored config, graded structurally — the engine isn't run here.)
- Write a logrotate Drop-Inmedium · in-browser
Write /etc/logrotate.d/myapp rotating /var/log/myapp/*.log. Inside one stanza for that glob, rotate daily, keep 14 rotations, compress old logs, and use missingok and notifempty so empty or absent logs do not error.
(Authored config, graded structurally — the engine isn't run here.)
- Write an autofs NFS Map Entrymedium · in-browser
Write /etc/auto.data: an autofs map file. Add ONE entry whose key is backup, whose mount options are -fstype=nfs,ro,soft, and whose location is the NFS export fileserver:/export/backup.
(Authored config, graded structurally — the engine isn't run here.)
- Author a systemd .automount Unitpro · in-browser
Write /etc/systemd/system/srv-data.automount: a systemd automount unit that lazily mounts /srv/data on first access. Include a [Unit] section, an [Automount] section with Where=/srv/data and an idle-unmount TimeoutIdleSec of 120, and an [Install] section wanting it under multi-user.target. (A matching srv-data.mount unit is assumed to exist.)
(Authored config, graded structurally — the engine isn't run here.)
- Big sparse filepro
Create /opt/sparse.img with apparent size >= 200 MiB but tiny actual allocation.
- Delete stale filespro
Under /var/junk, delete every regular file older than 5 days (keep newer ones).
- Extract and verify a bundlepro
Extract /opt/bundle.tar.gz into /srv/app so every file matches the checksums recorded in the bundle's SHA256SUMS.
- Format and Label an XFS Volumepro · in-browser
Write /home/player/mkxfs.sh: a bash script that creates an XFS filesystem on /dev/sdb1, labelled data, then verifies it. Use set -euo pipefail, run mkfs.xfs with the -f force flag and -L data label on /dev/sdb1, and afterwards print the geometry with xfs_info on the same device. Start with a bash shebang.
(Authored config, graded structurally — the engine isn't run here.)
- Make a sparse filepro
Create a sparse file /opt/sparse.img with an apparent size of 100 MiB but little actual disk allocation.
- Persistent Disk Symlink via udevpro · in-browser
Write /etc/udev/rules.d/99-data-disk.rules: a udev rule that gives a disk a stable name regardless of enumeration order. Match block devices (SUBSYSTEM=="block") whose serial ENV{ID_SERIAL_SHORT} equals a specific serial string, and create the persistent symlink /dev/data-disk by adding SYMLINK+="data-disk".
(Authored config, graded structurally — the engine isn't run here.)
- Read-only bind mountpro
Bind-mount /etc onto /mnt/etcview read-only.
- Recover from a full diskpro
Service 'writer' fails because /srv/data is stuffed with junk. Free space by removing /srv/data/fill, then start writer so it creates /srv/data/written.ok.
- Restrict LVM Device Scanningpro · in-browser
Write /etc/lvm/lvm.conf.d/filter.conf: an LVM config snippet that restricts which block devices LVM scans. Inside a devices { } block set a filter array that accepts /dev/sd* devices (an a| rule) and rejects everything else (a trailing r|.*| rule).
(Authored config, graded structurally — the engine isn't run here.)
- Split a big filepro
Split /opt/data.bin into 1 MiB pieces named /opt/part_* (split default prefix is fine if it matches part_).