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

Re: /etc/fstab question (problem)?



On Tue, 2023-04-18 at 13:03 -0700, David Christensen wrote:
> 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,pi
> > pe_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,sho
> > rtna
> > me=mixed,utf8,errors=remount-ro)
> > tmpfs on /run/user/1000 type tmpfs
> > (rw,nosuid,nodev,relatime,size=788496k,nr_inodes=197124,mode=700,ui
> > d=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
> 

I did indeed install a kernel from backports, since the sound would not
work on my computer running any earlier kernel. Otherwise, the system
is an updated Debian Stable 11.6 (Bullseye).

>From Ls -lahFi /boot:
total 121M
1305601 drwxr-xr-x  4 root root 4.0K Feb 20 11:51 ./
      2 drwxr-xr-x 19 root root 4.0K Feb 19 11:06 ../
      1 drwx------  3 root root 4.0K Dec 31  1969 efi/
1318571 drwxr-xr-x  5 root root 4.0K Apr 17 11:53 grub/
1306753 -rw-r--r--  1 root root 231K Jan 21 09:35 config-5.10.0-21-
amd64
1318578 -rw-r--r--  1 root root 252K Dec 19 09:14 config-6.0.0-
0.deb11.6-amd64
1318434 -rw-r--r--  1 root root  45M Feb 19 09:35 initrd.img-5.10.0-21-
amd64
1318576 -rw-r--r--  1 root root  61M Feb 19 11:06 initrd.img-6.0.0-
0.deb11.6-amd64
1306752 -rw-r--r--  1 root root   83 Jan 21 09:35 System.map-5.10.0-21-
amd64
1318577 -rw-r--r--  1 root root   83 Dec 19 09:14 System.map-6.0.0-
0.deb11.6-amd64
1306754 -rw-r--r--  1 root root 6.7M Jan 21 09:35 vmlinuz-5.10.0-21-
amd64
1318579 -rw-r--r--  1 root root 7.4M Dec 19 09:14 vmlinuz-6.0.0-
0.deb11.6-amd64

And this is from the (current) ls -lahFi /tmp:
total 80K
130561 drwxrwxrwt 16 root       root       4.0K Apr 18 16:46  ./
     2 drwxr-xr-x 19 root       root       4.0K Feb 19 11:06  ../
402051 drwxrwxrwt  2 root       root       4.0K Apr 18 14:44  .font-
unix/
399211 drwxrwxrwt  2 root       root       4.0K Apr 18 14:44  .ICE-
unix/
402078 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-colord.service-51WIZe/
402064 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-ModemManager.service-fdBA5h/
402060 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-switcheroo-control.service-
el9DGh/
402062 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-systemd-logind.service-sIXjpi/
402055 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-systemd-timesyncd.service-
UtAMlf/
402072 drwx------  3 root       root       4.0K Apr 18 14:44  systemd-
private-9df1dff59a9240c4a708cb146e08a36c-upower.service-yLsogf/
402052 drwxrwxrwt  2 root       root       4.0K Apr 18 14:44  .Test-
unix/
402080 drwx------  2 [user]    [user]    4.0K Apr 18 14:44  tracker-
extract-files.1000/
402071 drwx------  2 Debian-gdm Debian-gdm 4.0K Apr 18 14:44  tracker-
extract-files.116/
399209 drwxrwxrwt  2 root       root       4.0K Apr 18 14:44  .X11-
unix/
402049 drwxrwxrwt  2 root       root       4.0K Apr 18 14:44  .XIM-
unix/
136530 srwxrwxrwx  1 root       root          0 Apr 18 14:55  dbus-
3cgiNF1x8f=
136016 srwxrwxrwx  1 root       root          0 Apr 18 14:55  dbus-
9nSrGDn5m4=
136531 srwxrwxrwx  1 [user]    [user]       0 Apr 18 14:44  dbus-
ZLiotP4WWe=
136532 -r--r--r--  1 [user]    [user]      11 Apr 18 14:44  .X0-lock
136017 -r--r--r--  1 Debian-gdm Debian-gdm   11 Apr 18 14:44  .X1024-
lock
136018 -r--r--r--  1 Debian-gdm Debian-gdm   11 Apr 18 14:44  .X1025-
lock
136533 -r--r--r--  1 [user]    [user]      11 Apr 18 14:44  .X1-lock

And . . . 

cat /etc/debian_version ; uname -a
11.6
Linux dogen 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 | grep tmp:
udev on /dev type devtmpfs
(rw,nosuid,relatime,size=3907040k,nr_inodes=976760,mode=755,inode64)
tmpfs on /run type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=788500k,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
tmpfs on /run/user/1000 type tmpfs
(rw,nosuid,nodev,relatime,size=788496k,nr_inodes=197124,mode=700,uid=10
00,gid=1000,inode64)

stat -c %d / /tmp
66306
66306
(I am not sure what that means - is that saying that /tmp is mounted
under / on the / partition?)

(And BTW, the current /etc/fstab must have been written by some
program, not manually by me.  I would never have edited /etc/fstab to
look like that!) My best guess is that I may have done a system restore
using Timeshift on 2023-04-03, to back out of some unremembered
problem, and the current /etc/fstab results from that.

I COULD just continue as is with the current setup, but I would REALLY
prefer not to!

Maybe I should just start by using Clonezilla to do a full image of the
drive. Actual data of course, not the entire 256 Gb!

More later . . . 





Reply to: