[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/fstab question (problem)?



On 4/18/23 07:59, Default User wrote:
Hey, I have a strange situation!

I just realized that my /tmp partition is not being mounted at startup.
Instead, I think the filesystem may be allocating space in another
partition (maybe /root?) for tmp stuff.

I would like to return to the prior setup, where the /tmp partition is
mounted at startup, and is used for the tmp stuff.

Can I do so without trashing my system, and having to reinstall from
scratch.

Note: I have current system bakups using Timeshift, and current data
(/home/[user]) backups using Borgbackup.

And I can image the ssd with Clonezilla, or even dd, if I have to. But
I would prefer not to go through the hassle of doing so, if it is not
really needed.

I am running Debian 11 Stable (Bullseye).
My computer has a single internal 256 Gb ssd.
I am using Gnome Version 3.38.5 as my desktop environment.

uname -a:
Linux [host name] 6.0.0-0.deb11.6-amd64 #1 SMP PREEMPT_DYNAMIC Debian
6.0.12-1~bpo11+1 (2022-12-19) x86_64 GNU/Linux

mount:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs
(rw,nosuid,relatime,size=3907040k,nr_inodes=976760,mode=755,inode64)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=788500k,mode=755,inode64)
/dev/nvme0n1p2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs
(rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_i
no=786)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs
(rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs
(rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs
(rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl
(rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on /var type ext4 (rw,relatime)
/dev/nvme0n1p6 on /home type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat
(rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortna
me=mixed,utf8,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs
(rw,nosuid,nodev,relatime,size=788496k,nr_inodes=197124,mode=700,uid=10
00,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

Current /etc/fstab:
# <file system> <mount point> <type> <options> <dump> <pass>

UUID=4fdd4399-6267-404a-a292-
cdc7761df3c9	/	ext4	errors=remount-ro	0	1
UUID=26EE-0EF5	/boot/efi	vfat	umask=0077	0	1
UUID=00f0c2db-0490-4354-b949-
f9af11a7f001	/home	ext4	defaults	0	2
UUID=8bfeee23-9c09-45b7-a73e-
bd2ff43e207c	/var	ext4	defaults	0	2
UUID=e2a56ec3-99d4-4b40-9aa4-
24975143cdc7	none	swap	sw	0	0

Original /etc/fstab:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name
devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see
systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=4fdd4399-6267-404a-a292-cdc7761df3c9 /               ext4
errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=26EE-0EF5  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/nvme0n1p6 during installation
UUID=00f0c2db-0490-4354-b949-f9af11a7f001 /home           ext4
defaults        0       2
# /tmp was on /dev/nvme0n1p5 during installation
UUID=6a105a72-f5d5-441b-b926-1e405151ee84 /tmp            ext4
defaults        0       2
# /var was on /dev/nvme0n1p3 during installation
UUID=8bfeee23-9c09-45b7-a73e-bd2ff43e207c /var            ext4
defaults        0       2
# swap was on /dev/nvme0n1p4 during installation
UUID=e2a56ec3-99d4-4b40-9aa4-24975143cdc7 none            swap    sw
0       0

ls -lahFi /etc/fstab:
522243 -rw-r--r-- 1 root root 368 Apr  3 17:01 /etc/fstab

ls -lahFi /etc/fstab.original:
522547 -rw-r--r-- 1 root root 1.3K Mar 11 12:02 /etc/fstab.original

lsblk:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
├─nvme0n1p2 259:2    0  23.3G  0 part /
├─nvme0n1p3 259:3    0   9.3G  0 part /var
├─nvme0n1p4 259:4    0   977M  0 part [SWAP]
├─nvme0n1p5 259:5    0   1.9G  0 part
└─nvme0n1p6 259:6    0 202.6G  0 part /home

blkid:
/dev/nvme0n1p1: UUID="26EE-0EF5" BLOCK_SIZE="512" TYPE="vfat"
PARTUUID="c0b4b1bb-bdf3-4066-b75a-f3cf56186e27"
/dev/nvme0n1p2: UUID="4fdd4399-6267-404a-a292-cdc7761df3c9"
BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="706ab20c-ea65-4c25-a632-
b7858550f966"
/dev/nvme0n1p3: UUID="8bfeee23-9c09-45b7-a73e-bd2ff43e207c"
BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="0831f4bf-98fc-4189-a3cb-
fc2781e580fb"
/dev/nvme0n1p4: UUID="e2a56ec3-99d4-4b40-9aa4-24975143cdc7" TYPE="swap"
PARTUUID="b32e1385-6518-4d1d-9181-66d31929c7ab"
/dev/nvme0n1p5: UUID="6a105a72-f5d5-441b-b926-1e405151ee84"
BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="834502f5-08b3-42ad-a322-
cf86732f8155"
/dev/nvme0n1p6: UUID="00f0c2db-0490-4354-b949-f9af11a7f001"
BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="40721dda-02ba-49a1-abfc-
b624fc739d9f"

What to do?

And if further information is needed, please let me know, and I will
try to get it for you.

Thanks!


I have a 2.5" SATA SSD with an installation of debian-11.6.0-amd64-netinst via Debian GNU/Linux UEFI Installer menu -> Install. I tried to KISS and OOTB:

2023-04-18 12:42:22 root@taz ~
# cat /etc/debian_version ; uname -a
11.6
Linux taz 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux


Our kernels are different.  Did you install a backports kernel?


2023-04-18 12:52:49 root@taz ~
# mount | grep tmp
udev on /dev type devtmpfs (rw,nosuid,relatime,size=16328088k,nr_inodes=4082022,mode=755) tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3271028k,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/user/13250 type tmpfs (rw,nosuid,nodev,relatime,size=3271024k,nr_inodes=817756,mode=700,uid=13250,gid=13250) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=3271024k,nr_inodes=817756,mode=700)

2023-04-18 12:53:32 root@taz ~
# grep tmp /etc/fstab

2023-04-18 12:53:50 root@taz ~
#


My / (root) and /tmp directories are on the same file system -- the root filesystem:

2023-04-18 12:46:41 root@taz ~/taz.tracy.holgerdanske.com
# stat -c %d / /tmp
65024
65024


Your root filesystem is on the NVMe drive, and your /tmp appears to be on the root filesystem. Run 'stat -c %d / /tmp' to confirm.


I would leave /tmp where it is, unless you have some specific need (such as a server or application than uses /tmp heavily).


That said, I keep my FOSS OS images small enough to fit onto a "16 GB" device -- typically an SSD, but also HDD or USB flash drive. When I want to do audio/ video editing and the SSD has leftover space, I frequently create a "scratch" partition and filesystem in the free space and configure the app to use that for temporary files.


David


Reply to: