[Bug 1908843] [NEW] fstrim spins up HDDs
V33m
1908843 at bugs.launchpad.net
Mon Dec 21 00:09:31 UTC 2020
Public bug reported:
Issue: fstrim.timer is enabled and trigger "/sbin/fstrim --fstab
--verbose --quiet" which spins up hard drives mounted in fstab. How can
one ignore or specify which drives to use fstrim on for fstrim? Or could
this be related to that I've symbolic links between SD card and drives?
If the latter might be the case, is there a way to ignore folders and
paths? Or shouldn't symbolic links be ignored by default as they are of
no relevance given the data is placed elsewhere?
- - - More information - - -
I've fstrim.timer enabled on Ubuntu 20.04.1 LTS (Focal Fossa) using util-linux 2.34-0.1ubuntu9.1. My setup consist of an eMMC (/), micro SD card (/mnt/SD) and two hard drives. All drives are mounted in fstab:
LABEL=BOOT /media/boot vfat umask=0077 0 1
UUID=REMOVED / ext4 errors=remount-ro 0 1
UUID=REMOVED /mnt/SD ext4 noatime,nofail,defaults 0 1
UUID=REMOVED /mnt/USB1 ext4 noatime,nofail,defaults 0 2
UUID=REMOVED /mnt/USB2 ext4 noatime,nofail,defaults 0 2
# Bind Mounts
/mnt/SD/FOLDER /FOLDER none bind,nobootwait 0 2
/mnt/SD/home/USER /home/USER none bind,nobootwait 0 2
- - - fstrim.timer triggers every week - - -
● fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
Active: inactive (dead) since Mon 2020-12-14 00:00:09 CET; 1 weeks 0 days ago
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
Process: 997644 ExecStart=/sbin/fstrim --fstab --verbose --quiet (code=exited, status=0/SUCCESS)
Main PID: 997644 (code=exited, status=0/SUCCESS)
Dec 14 00:00:00 HOST systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab...
Dec 14 00:00:09 HOST fstrim[997644]: /mnt/SD: 5.4 GiB (5763649536 bytes) trimmed on /dev/mmcblk1p1
Dec 14 00:00:09 HOST fstrim[997644]: /: 4.3 GiB (4591874048 bytes) trimmed on /dev/mmcblk0p2
Dec 14 00:00:09 HOST systemd[1]: fstrim.service: Succeeded.
Dec 14 00:00:09 HOST systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab.
- - - Drives spin up every week - - -
● hd-idle.service - hd-idle - spin down idle hard disks
Loaded: loaded (/lib/systemd/system/hd-idle.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-12-06 15:26:09 CET; 2 weeks 0 days ago
Docs: man:hd-idle(8)
Main PID: 2281 (hd-idle)
Tasks: 10 (limit: 3840)
Memory: 4.1M
CGroup: /system.slice/hd-idle.service
└─2281 /usr/sbin/hd-idle -i 0 -c ata -s 1 -l /var/log/hd-idle.log -a /dev/disk/by-label/...
Dec 07 00:00:57 HOST hd-idle[2281]: sda spinup
Dec 07 00:00:57 HOST hd-idle[2281]: sdb spinup
Dec 07 00:15:57 HOST hd-idle[2281]: /dev/sda spindown
Dec 07 00:15:58 HOST hd-idle[2281]: /dev/sdb spindown
Dec 14 00:00:14 HOST hd-idle[2281]: sda spinup
Dec 14 00:00:14 HOST hd-idle[2281]: sdb spinup
Dec 14 00:15:14 HOST hd-idle[2281]: /dev/sda spindown
Dec 14 00:15:14 HOST hd-idle[2281]: /dev/sdb spindown
I know that the drives spin up as you can hear it. Simply disabling
fstrim.timer did not make the drives spin up, however, I loose the
benefits of using the service.
** Affects: util-linux (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1908843
Title:
fstrim spins up HDDs
Status in util-linux package in Ubuntu:
New
Bug description:
Issue: fstrim.timer is enabled and trigger "/sbin/fstrim --fstab
--verbose --quiet" which spins up hard drives mounted in fstab. How
can one ignore or specify which drives to use fstrim on for fstrim? Or
could this be related to that I've symbolic links between SD card and
drives? If the latter might be the case, is there a way to ignore
folders and paths? Or shouldn't symbolic links be ignored by default
as they are of no relevance given the data is placed elsewhere?
- - - More information - - -
I've fstrim.timer enabled on Ubuntu 20.04.1 LTS (Focal Fossa) using util-linux 2.34-0.1ubuntu9.1. My setup consist of an eMMC (/), micro SD card (/mnt/SD) and two hard drives. All drives are mounted in fstab:
LABEL=BOOT /media/boot vfat umask=0077 0 1
UUID=REMOVED / ext4 errors=remount-ro 0 1
UUID=REMOVED /mnt/SD ext4 noatime,nofail,defaults 0 1
UUID=REMOVED /mnt/USB1 ext4 noatime,nofail,defaults 0 2
UUID=REMOVED /mnt/USB2 ext4 noatime,nofail,defaults 0 2
# Bind Mounts
/mnt/SD/FOLDER /FOLDER none bind,nobootwait 0 2
/mnt/SD/home/USER /home/USER none bind,nobootwait 0 2
- - - fstrim.timer triggers every week - - -
● fstrim.service - Discard unused blocks on filesystems from /etc/fstab
Loaded: loaded (/lib/systemd/system/fstrim.service; static; vendor preset: enabled)
Active: inactive (dead) since Mon 2020-12-14 00:00:09 CET; 1 weeks 0 days ago
TriggeredBy: ● fstrim.timer
Docs: man:fstrim(8)
Process: 997644 ExecStart=/sbin/fstrim --fstab --verbose --quiet (code=exited, status=0/SUCCESS)
Main PID: 997644 (code=exited, status=0/SUCCESS)
Dec 14 00:00:00 HOST systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab...
Dec 14 00:00:09 HOST fstrim[997644]: /mnt/SD: 5.4 GiB (5763649536 bytes) trimmed on /dev/mmcblk1p1
Dec 14 00:00:09 HOST fstrim[997644]: /: 4.3 GiB (4591874048 bytes) trimmed on /dev/mmcblk0p2
Dec 14 00:00:09 HOST systemd[1]: fstrim.service: Succeeded.
Dec 14 00:00:09 HOST systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab.
- - - Drives spin up every week - - -
● hd-idle.service - hd-idle - spin down idle hard disks
Loaded: loaded (/lib/systemd/system/hd-idle.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-12-06 15:26:09 CET; 2 weeks 0 days ago
Docs: man:hd-idle(8)
Main PID: 2281 (hd-idle)
Tasks: 10 (limit: 3840)
Memory: 4.1M
CGroup: /system.slice/hd-idle.service
└─2281 /usr/sbin/hd-idle -i 0 -c ata -s 1 -l /var/log/hd-idle.log -a /dev/disk/by-label/...
Dec 07 00:00:57 HOST hd-idle[2281]: sda spinup
Dec 07 00:00:57 HOST hd-idle[2281]: sdb spinup
Dec 07 00:15:57 HOST hd-idle[2281]: /dev/sda spindown
Dec 07 00:15:58 HOST hd-idle[2281]: /dev/sdb spindown
Dec 14 00:00:14 HOST hd-idle[2281]: sda spinup
Dec 14 00:00:14 HOST hd-idle[2281]: sdb spinup
Dec 14 00:15:14 HOST hd-idle[2281]: /dev/sda spindown
Dec 14 00:15:14 HOST hd-idle[2281]: /dev/sdb spindown
I know that the drives spin up as you can hear it. Simply disabling
fstrim.timer did not make the drives spin up, however, I loose the
benefits of using the service.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1908843/+subscriptions
More information about the foundations-bugs
mailing list