Hallo Arch-Community,
Ich bin ein Neuling 🙂. Bisher habe ich Windows 7 benutzt. Natürlich habe ich dort schon Archlinux in einer Virtuellen-Maschine betrieben. Inzwischen bin ich aber mit meinem Hauptsystem endlich auf Archlinux umgezogen. Deshalb bin ich noch nicht so erfahren.
Folgendes Problem habe ich:
In meinem Computer sind eine SSD (/dev/sda) und eine HDD (/dev/sdb) verbaut. Der systemctl fstrim.timer wurde von mir aktiviert.
Beim überprüfen des fstrim.services mit journalctl konnte ich keine Informationen darüber finden, welche Laufwerke getrimmt wurden:
$ journalctl -u fstrim.service
-- Logs begin at Sat 2020-01-25 12:22:38 CET, end at Mon 2020-02-03 11:33:05 CET. --
Jan 27 08:33:08 Panther systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab...
Jan 27 08:33:08 Panther systemd[1]: fstrim.service: Succeeded.
Jan 27 08:33:08 Panther systemd[1]: Started Discard unused blocks on filesystems from /etc/fstab.
-- Reboot --
Feb 03 08:30:52 Panther systemd[1]: Starting Discard unused blocks on filesystems from /etc/fstab...
Feb 03 08:30:53 Panther systemd[1]: fstrim.service: Succeeded.
Feb 03 08:30:53 Panther systemd[1]: Started Discard unused blocks on filesystems from /etc/fstab.
Im englischen Archlinux Forum konnte ich dazu folgendes Thema finden:
https://bbs.archlinux.org/viewtopic.php?id=252451
Mit folgender Lösung:
swipe schriebThis is fixed by commenting out
ProtectSystem=strict
swipe schriebHmm... It seems they fixed a variable in the check for read-only fileystems. I wonder if that "fixed" the detection of read-only bindmounts that systemd uses in strict mode.
https://git.kernel.org/pub/scm/utils/ut … a345e6b409
/* FITRIM on read-only filesystem can fail, and it can fail */
if (access(tgt, W_OK) != 0) {
if (errno == EROFS)
continue;
if (errno == EACCES)
continue;
}
Folgendes habe ich dort leider nicht verstanden:
- Wurde bisher der fstrim Befehl auf meiner SSD angewendet?
- Bringt es irgendwelche Nachteile mit sich, ProtectSystem=strict auszukommentieren?
Zusätzlich interessiert mich noch folgendes:
Im englischen Archlinux Wiki wird discard auf der Swap Partition empfohlen.
https://wiki.archlinux.org/index.php/Swap#Swap_partition
Soll ich discard auf meiner Swap Partition aktivieren?
Vielen Dank schon mal an alle die sich, die Zeit genommen haben meinen Beitrag zu lesen. Ich hoffe, dass Ihr mir helfen könnt 🙂
Nochfolgend noch evtl. benötigte Informationen:
$ lsblk -o NAME,SIZE,FSTYPE,LABEL,UUID,MOUNTPOINT
NAME SIZE FSTYPE LABEL UUID MOUNTPOINT
sda 232,9G
├─sda1 512M vfat p_efi D52D-4B8E /efi
├─sda2 228,4G btrfs p_arch e818806e-2cd5-413b-b5f1-278b7dbb0775 /var/log
└─sda3 4G swap p_swap ea92a887-157f-4385-af9e-b896125846af [SWAP]
sdb 2,7T
└─sdb1 2,7T btrfs p_daten a898d97e-b92b-4c18-b76a-44416d45d441 /home/samuel/Dokumente
sr0 1024M
$ cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch / btrfs rw,noatime,compress=lzo,ssd,space_cache=v2,subvol=@ 0 0
# /dev/sda1 UUID=D52D-4B8E
LABEL=p_efi /efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /home btrfs rw,nosuid,nodev,noatime,compress=lzo,ssd,space_cache=v2,subvol=@home 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Bilder btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Bilder 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Dokumente btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Dokumente 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Downloads btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Downloads 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Musik btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Musik 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Videos btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Videos 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Vorlagen btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Vorlagen 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/Mixed btrfs rw,nosuid,nodev,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Mixed 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /home/samuel/.Datensnap btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvol=@Datensnap,user,noauto,nofail 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /root btrfs rw,noatime,compress=lzo,ssd,space_cache=v2,subvol=@root 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /root/arch_pool btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvolid=5,subvol=/,noauto,nofail 0 0
# /dev/sdb1 UUID=a898d97e-b92b-4c18-b76a-44416d45d441
LABEL=p_daten /root/daten_pool btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,autodefrag,subvolid=5,subvol=/,noauto,nofail 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /srv btrfs rw,noatime,compress=lzo,ssd,space_cache=v2,subvol=@srv 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /.snapshots btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvol=@snapshots,noauto,nofail 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/cache btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvol=@cache 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/log btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvol=@log 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/spool btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvol=@spool 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/tmp btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,ssd,space_cache=v2,subvol=@tmp 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/lib/machines btrfs rw,noatime,compress=lzo,ssd,space_cache=v2,subvol=@machines 0 0
# /dev/sda2 UUID=e818806e-2cd5-413b-b5f1-278b7dbb0775
LABEL=p_arch /var/lib/portables btrfs rw,noatime,compress=lzo,ssd,space_cache=v2,subvol=@portables 0 0
# /dev/sda3 UUID=ea92a887-157f-4385-af9e-b896125846af
LABEL=p_swap none swap defaults 0 0
# Backup HD-Festplatte
LABEL=SAMUEL_BACKUP /media/HD_Backup btrfs rw,nosuid,nodev,noexec,noatime,compress=lzo,space_cache=v2,subvolid=5,subvol=/,user,noauto,nofail 0 0
$ sudo hdparm -I /dev/sda | grep TRIM
* Data Set Management TRIM supported (limit 8 blocks)
* Deterministic read ZEROs after TRIM