I wanted to move my /tmp directory to it’s own partition, first I checked that the systemd tmpfs wasn’t being used, which it wasn’t.
changed to Init 1
I created a new xfs partition
mounted to a temporary mount under /foo
cp -apx /tmp/. /foo
umount /foo
mv /tmp /tmp.old
mkdir /tmp
chmod 1777 /tmp
change /etc/fstab with uuid of new /tmp partition
mount -a
df -h to see if it’s there and right partition, looks good
Init 5
sddm starts fine
login to kde everything is fine
reboot
Now it comes up in tty in read-only mode, I can remount to rw, rem out my fstab change and go back to old /tmp.
I didn’t see anything in partitioner or the docs you linked about moving an existing /tmp. Before I did my almost successful attempt, I had actually tried partitioner and set a mount point to /tmp, I didn’t think it would work, because of the existing /tmp directory that is being used, and the text mode yast in init 1 gave me a ruby error when I tried to launch partitioner. It created the fstab entry but didn’t work at all, which is what I suspected to begin with.
So that’s what I did, though /tmp also needs the chmod.
As I said everything looks good with df -h, even the stat /tmp and everything is fine when I go to init 5, I can even hibernate and power back up completely fine. But on full reboot it comes up read-only with /tmp unmounted, if I remount the system with rw, and do a mount -a, then init 5, I’m all fine again using the new /tmp partition. I have run filesystem check on the new partition, it’s fine, I have also run smartdisk on the drive, it’s fine as well.
So what could cause it to be completely error free when doing mount -a, or power on from hibernate, but cause a problem on full reboot?
Sorry I should have said, I set up my Tumbleweed as all xfs, so there is no btrfs in play. I checked to make sure before everything that it wasn’t tmpfs or setup by systemd to be tmpfs, since systemd doesn’t do it in fstab, and systemd tmp.mount was masked.
Ok fixed it, my last post made me think a bit more about systemd which I am still pretty weak on knowledge wise. The tmp.mount unit was masked probably for the default way opensuse handles /tmp with btrfs, I thought this would be fine, but masking, seems to be a hard off to /dev/null to any kind of mounting of /tmp, not just turning off systemd tmpfs /tmp. So I unmasked tmp.mount and now everything works and is mounted properly.
Yes, the systemd “tmp.mount” service, which doesn’t have a “.service” in the name, is quite surprising, especially when one takes a look at the “big (mount) picture”:
Taking a look at the “generated” services reveals:
# systemctl status -- -.mount tmp.mount var.mount srv.mount home.mount home01.mount
● -.mount - Root Mount
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:24 CEST; 1h 50min ago
Where: /
What: /dev/sda1
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/-.mount
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
● tmp.mount - /tmp
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:27 CEST; 1h 50min ago
Where: /tmp
What: /dev/sdc1
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 754 ExecMount=/usr/bin/mount /dev/disk/by-id/ata-ST3500418AS_Z2AENPNG-part1 /tmp -t ext4 -o defaults,noatime>
Tasks: 0 (limit: 4915)
CGroup: /system.slice/tmp.mount
Jun 06 08:03:27 XXX systemd[1]: Mounting /tmp...
Jun 06 08:03:27 XXX systemd[1]: Mounted /tmp.
● var.mount - /var
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:27 CEST; 1h 50min ago
Where: /var
What: /dev/sdb1
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 688 ExecMount=/usr/bin/mount /dev/disk/by-id/ata-WDC_WD10EZEX-60M2NA0_WD-WCC3F5AYCJL7-part1 /var -t ext4 -o >
Tasks: 0 (limit: 4915)
CGroup: /system.slice/var.mount
Jun 06 08:03:27 XXX systemd[1]: Mounting /var...
Jun 06 08:03:27 XXX systemd[1]: Mounted /var.
● srv.mount - /srv
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:27 CEST; 1h 50min ago
Where: /srv
What: /dev/sdc2
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 686 ExecMount=/usr/bin/mount /dev/disk/by-id/ata-ST3500418AS_Z2AENPNG-part2 /srv -t ext4 -o defaults,noatime>
Tasks: 0 (limit: 4915)
CGroup: /system.slice/srv.mount
Jun 06 08:03:27 XXX systemd[1]: Mounting /srv...
Jun 06 08:03:27 XXX systemd[1]: Mounted /srv.
● home.mount - /home
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:27 CEST; 1h 50min ago
Where: /home
What: /dev/sdc3
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 690 ExecMount=/usr/bin/mount /dev/disk/by-id/ata-ST3500418AS_Z2AENPNG-part3 /home -t xfs -o defaults,noquota>
Tasks: 0 (limit: 4915)
CGroup: /system.slice/home.mount
Jun 06 08:03:27 XXX systemd[1]: Mounting /home...
Jun 06 08:03:27 XXX systemd[1]: Mounted /home.
● home01.mount - /home01
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2019-06-06 08:03:28 CEST; 1h 50min ago
Where: /home01
What: /dev/sdb2
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 692 ExecMount=/usr/bin/mount /dev/disk/by-id/ata-WDC_WD10EZEX-60M2NA0_WD-WCC3F5AYCJL7-part2 /home01 -t xfs ->
Tasks: 0 (limit: 4915)
CGroup: /system.slice/home01.mount
Jun 06 08:03:27 XXX systemd[1]: Mounting /home01...
Jun 06 08:03:28 XXX systemd[1]: Mounted /home01.
#
Meaning that, if you move away from the default Btrfs system partition, you’ll have to remember to unmask the “*.mount” systemd services to enable the systemd mounts generated from “/etc/fstab” …
Or, install without setting up with a Btrfs system partition …