Announcement
Collapse
No announcement yet.
Essential and strongly recommended things to do directly after a Kubuntu 24.04 LTS installation
Collapse
X
-
Last edited by lednyk; Aug 14, 2024, 01:29 PM.CPU Intel Core i7-4790, 8 GB RAM DDR3, 2014 Asus motherboard, Mesa Intel HD Graphics 4600, 500 GB SSD Samsung EVO 850, LG BD-RE burner, Qualcomm Atheros AR9485 Wireless Network Adapter, Audio Device Intel Corporation 9 Series Chipset Family HD Audio Controller.
- Top
- Bottom
-
wonder why some installs have the discard option set still, and zero of mine have it except for the one I did during pre-release testing, which was fixed before the final release.
I did one yesterday, even.
- Top
- Bottom
Comment
-
jlittle
In my Kubuntu 24.04 (installed from scratch) the fstab does have a 'discard' option.
# systemctl status fstrim.timer
fstrim.timer - Discard unused filesystem blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; preset: enabled)
Active: active (waiting) since Thu 2024-08-15 15:16:39 CEST; 16min ago
Trigger: Mon 2024-08-19 00:28:06 CEST; 3 days left
Triggers: fstrim.service
Docs: man:fstrim
ago 15 15:16:39 kubuntu systemd[1]: Started fstrim.timer
Discard unused filesystem blocks once a week.
If Kubuntu 24.04 discards unused filesystem blocks once a week (with fstrim.timer), why should be present the option 'discard' in '/etc/fstab'?Last edited by lednyk; Aug 15, 2024, 07:46 AM.CPU Intel Core i7-4790, 8 GB RAM DDR3, 2014 Asus motherboard, Mesa Intel HD Graphics 4600, 500 GB SSD Samsung EVO 850, LG BD-RE burner, Qualcomm Atheros AR9485 Wireless Network Adapter, Audio Device Intel Corporation 9 Series Chipset Family HD Audio Controller.
- Top
- Bottom
Comment
-
I found this post:
Automatic TRIM (Deprecated, Slow)
Automatic TRIM has been supported since Ubuntu 10.10 (kernel 2.6.33) with the EXT4 file system. However, sending TRIM commands to the SSD in real-time - after every delete - has been recognized to make deletion much slower than usual on some drives. Therefore a weekly scheduled TRIM via a cron job (described above) is recommended.
To enable automatic TRIM on a drive or partition, they need to be mounted with the discard option in fstab. Firstly backup your fstab then open it for editing:
sudo cp /etc/fstab ~/fstab-backup
gksudo gedit /etc/fstab
Add 'discard' to the fstab options entry (comma separated) for the SSD drive or each partition:
UUID=00000000-0000-0000-0000-000000000000 / ext4 discard 0 1CPU Intel Core i7-4790, 8 GB RAM DDR3, 2014 Asus motherboard, Mesa Intel HD Graphics 4600, 500 GB SSD Samsung EVO 850, LG BD-RE burner, Qualcomm Atheros AR9485 Wireless Network Adapter, Audio Device Intel Corporation 9 Series Chipset Family HD Audio Controller.
- Top
- Bottom
Comment
-
Mine 24.04 installed from scratch enabled discard option in fstab too.
What the OP said in his post was:
replace the "discard" option with "defaults", because a systemd timer for fstrim is already running
so, i checked this, and it is really true:
systemctl status fstrim.timer
● fstrim.timer - Discard unused filesystem blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; preset: enabled)
Active: active (waiting) since Sat 2024-08-10 01:31:50 -03; 5 days ago
Trigger: Mon 2024-08-19 00:22:47 -03; 3 days left
Triggers: ● fstrim.service
Docs: man:fstrim
system systemd[1]: Started fstrim.timer - Discard unused filesystem blocks once a week.
So, both are running: fstrim.timer and discard. I need to replace my fstab, but the question is why 24.04 still use discard option? Still a bug ?
- Top
- Bottom
Comment
-
Originally posted by jlittle View PostI think discard is the default. On my 24.04 the fstab doesn't have any discard options, and mount says both SATA and NVMe SSDs have been mounted with discard=async.
https://www.phoronix.com/news/Btrfs-...iscard-Default
Unrelated to the discard option for mounting, as well as ext4, I think.Last edited by claydoh; Aug 15, 2024, 07:23 PM.
- Top
- Bottom
Comment
-
Originally posted by Virginio Miranda View PostSo, both are running: fstrim.timer and discard. I need to replace my fstab, but the question is why 24.04 still use discard option? Still a bug ?
My guess is zero people have reported it since release?
Kubuntu's Calamares setup did have this as part of its default fstab setting while in pre-release, but this was removed before the final release.
But, how are you determining that you have the discard mount option being used? Nothing you show actually indicates this at all.
Note the mount option called discard is not the same thing as the description used for the fstrim.timer systemd service.
My freshly installed Noble does not have it in the fstab:
Code:# /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). # # <file system> <mount point> <type> <options> <dump> <pass> UUID=5BE0-1D23 /boot/efi vfat defaults 0 2 UUID=b0b23e67-a876-4250-ab86-eeba890613b6 / ext4 defaults 0 1 /swapfile swap swap defaults 0 0
Nor is discard used as a defualt mount option by *buntu.
Code:$ mount | grep sda /dev/sda2 on / type ext4 (rw,relatime) /dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,io charset=iso8859-1,shortname=mixed,errors=remount-ro)
Originally posted by lednyk View PostIn my Kubuntu 24.04 (installed from scratch) the fstab does have a 'discard' option.
# systemctl status fstrim.timer
The terminal output you show does not show discard being physically included in the fstab file which was the original pre-release bug.
I really really do think that Schwarzer Kater might look at removing this suggestion since in my strong opinion, it is not valid, since the fstab no longer has the 'discard' text erroneously included in the text file.
- Top
- Bottom
Comment
-
Originally posted by claydoh View Post
But, how are you determining that you have the discard mount option being used? Nothing you show actually indicates this at all.
/swapfile swap swap defaults 0 0
tmpfs /tmp tmpfs noatime,mode=1777,size=8G 0 0
UUID=8c158569-882b-4039-9199-9c9a00e34c62 /media/LVM ext4 defaults 0 0
UUID=db8fc645-13b9-49c7-92f6-2efb18d47344 /media/virginio/Linux\0401TB\040A ext4 defaults 0 0
UUID=39e38ed5-aa6a-40ce-9bbd-79425f496a91 /media/virginio/Linux\0401TB\040B ext4 defaults 0 0
UUID=DCBAD118BAD0F04E /media/virginio/Seagate\040Expansion\040Drive ntfs defaults 0 0
And my install is not a pre release. It is a official release.
mount | grep sdh
/dev/sdh1 on / type ext4 (rw,relatime,discard)
/dev/sdh1 on /var/snap/firefox/common/host-hunspell type ext4 (ro,noexec,noatime,discard)
systemctl status fstrim.timer
● fstrim.timer - Discard unused filesystem blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; preset: enabled)
Active: active (waiting) since Sat 2024-08-10 01:31:50 -03; 5 days ago
Trigger: Mon 2024-08-19 00:22:47 -03; 3 days left
Triggers: ● fstrim.service
Docs: man:fstrim
system systemd[1]: Started fstrim.timer - Discard unused filesystem blocks once a week.
So, fstrim.timer is enabled by default running once a week and fstab has discard by default.Last edited by Virginio Miranda; Aug 16, 2024, 05:00 AM.
- Top
- Bottom
Comment
-
I downloaded my 24.04 ISO shortly after its release announcement. It came directly from the Kubuntu page, and this is the fstab:
cat 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).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=D912-B405 /boot/efi vfat defaults 0 2
UUID=ac5a72f4-8003-4890-8f0e-6176ee726d12 / ext4 defaults 0 1
UUID=870436af-1189-421f-8240-e35613dba718 /home ext4 defaults 0 2
UUID=93e084bc-dac6-4d6e-bb72-608fbdb1ed53 swap swap defaults 0 0
# /swapfile swap swap defaults 0 0
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
The next brick house on the left
Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11| Kubuntu 24.04 | 6.8.0-31-generic
- Top
- Bottom
Comment
-
Kubuntu 24.04.1 LTS (re-installed from scratch in a UEFI pc): I have again the option 'discard' in '/etc/fstab' and I replaced it by hand with 'defaults'.
[...]
A popular method used in the past, not recommended today, was to enable automatic TRIM by adding the discard option in the /etc/fstab file.
Although apparently effective, this method is not convenient or even disadvantageous because:- Forces the system to run TRIM continuously and with the system booted, after every single file deletion (in most cases it is sufficient to run it once a week or a day).
- For the previous reason, it can cause significant resource usage, with frequent system slowdowns.
- In recent versions of Ubuntu, the command is already run automatically handled by systemd.
Check if 'discard' is enabled with the command:
Code:cat /etc/fstab
CPU Intel Core i7-4790, 8 GB RAM DDR3, 2014 Asus motherboard, Mesa Intel HD Graphics 4600, 500 GB SSD Samsung EVO 850, LG BD-RE burner, Qualcomm Atheros AR9485 Wireless Network Adapter, Audio Device Intel Corporation 9 Series Chipset Family HD Audio Controller.
- Top
- Bottom
Comment
-
I'm confused about this.
My /etc/fstab does not mention discard, but findmnt --real shows discard=async for both mounted SSDs, an NVMe and a SATA SSD. Various forum posts say discard=async became the default for btrfs from Linux kernel 6.2.
So the default is discard=async; do you think we should explicitly add nodiscard?Regards, John Little
- Top
- Bottom
Comment
-
Originally posted by jlittle View PostSo the default is discard=async; do you think we should explicitly add nodiscard?
It might be useful to disable the fstrim timer, but that wouldn't actually harm anything, I'd think.
https://btrfs.readthedocs.io/en/latest/Trim.html
https://man.archlinux.org/man/fstrim.8.en
https://www.reddit.com/r/btrfs/comme..._fstrim_since/
- Top
- Bottom
Comment
-
Originally posted by jglen490 View PostIs your SSD always attached and mounted at boot? Or is it only attached to an already booted system when you feel the need for some Linux?
It's always attached. I have Window installed on PC but for some reason couldn't install Linux on it so I had to use an enclosure instead. Bottom line is I try to not even use Windows, but every now and then Linux doesn't want to boot until I update Windows first so I still have to get into Windows sometimes
- Top
- Bottom
Comment
Comment