Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Rozwiązane trim nie dzała na partycji home
#1
0
Trim coś mi się zdaje że nie działa na ssd w pc z linux mint 20 cinnamon czy możecie zobaczyć? jakie komendy wpisać?
#2
0
Trim jest domyślnie włączony i działa raz na tydzień. To polecenie pokaże kiedy zadziałał i na których partycjach:

Kod:
journalctl | grep trimmed
#3
0
(18-12-2020, 01:58)magnus napisał(a): Trim jest domyślnie włączony i działa raz na tydzień. To polecenie pokaże kiedy zadziałał i na których partycjach:

Kod:
journalctl | grep trimmed

Kod:
gru 16 09:43:52 linuxmint20 fstrim[12437]: /boot/efi: 279,7 MiB (293261312 bytes) trimmed on /dev/sdc1
gru 16 09:43:52 linuxmint20 fstrim[12437]: /: 22 GiB (23659622400 bytes) trimmed on /dev/sdc2
gru 17 19:53:25 linuxmint20 fstrim[40753]: /boot/efi: 279,7 MiB (293261312 bytes) trimmed on /dev/sdc1
gru 17 19:53:25 linuxmint20 fstrim[40753]: /: 29,1 GiB (31224840192 bytes) trimmed on /dev/sdc2
A jeszcze nie powinna być partycja /home czy tylko to systemową trim czyści?
#4
0
Sprawdź czy takową w ogóle posiadasz
Kod:
df -h
#5
0
(18-12-2020, 09:31)dedito napisał(a): Sprawdź czy takową w ogóle posiadasz
Kod:
df -h
Mam ją na pewno oddzielną partycje /home
#6
0
Dobrze by było abyś to pokazał, bo różne "przypadki" tu mamy.
Przyda się też zawartość pliku
Kod:
cat /lib/systemd/system/fstrim.service
#7
0
(18-12-2020, 09:48)dedito napisał(a): Dobrze by było abyś to pokazał, bo różne "przypadki" tu mamy.


Kod:
System plików  rozm. użyte dost. %uż. zamont. na
udev            7,8G     0  7,8G   0% /dev
tmpfs           1,6G  3,3M  1,6G   1% /run
/dev/sdc2        49G   19G   27G  42% /
tmpfs           7,9G     0  7,9G   0% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           7,9G     0  7,9G   0% /sys/fs/cgroup
/dev/nvme0n1p2  477G  354G  124G  75% /mnt/0CA6DF99A6DF821E
/dev/sda2       2,8T  2,6T  158G  95% /mnt/787EB1547EB10BBE
/dev/sdb1       916G  257G  614G  30% /mnt/cce94876-f0f7-47d6-a553-0ee836bcf74f
/dev/sdc4       171G   60G  103G  37% /home
/dev/sdc1       499M  220M  280M  44% /boot/efi
/dev/sdd2       1,4T  786G  612G  57% /mnt/3290BFBD90BF863F
tmpfs           1,6G   24K  1,6G   1% /run/user/1000
#8
0
Przyda się też zawartość pliku
Kod:
cat /lib/systemd/system/fstrim.service
#9
0
(18-12-2020, 09:51)dedito napisał(a): Przyda się też zawartość pliku
Kod:
cat /lib/systemd/system/fstrim.service

Kod:
[Unit]
Description=Discard unused blocks on filesystems from /etc/fstab
Documentation=man:fstrim(8)
ConditionVirtualization=!container

[Service]
Type=oneshot
ExecStart=/sbin/fstrim --fstab --verbose --quiet
ProtectSystem=strict
ProtectHome=yes
PrivateDevices=no
PrivateNetwork=yes
PrivateUsers=no
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
MemoryDenyWriteExecute=yes
SystemCallFilter=@default @file-system @basic-io @system-service
#10
0
https://www.freedesktop.org/software/sys....exec.html
Cytat:ProtectHome=

    Takes a boolean argument or the special values "read-only" or "tmpfs". If true, the directories /home/, /root, and /run/user are made inaccessible and empty for processes invoked by this unit.
If set to "read-only", the three directories are made read-only instead. If set to "tmpfs", temporary file systems are mounted on the three directories in read-only mode. The value "tmpfs" is useful to hide home directories not relevant to the processes invoked by the unit, while still allowing necessary directories to be made visible when listed in BindPaths= or BindReadOnlyPaths=.

    Setting this to "yes" is mostly equivalent to set the three directories in InaccessiblePaths=. Similarly, "read-only" is mostly equivalent to ReadOnlyPaths=, and "tmpfs" is mostly equivalent to TemporaryFileSystem= with ":ro".

    It is recommended to enable this setting for all long-running services (in particular network-facing ones), to ensure they cannot get access to private user data, unless the services actually require access to the user's private data. This setting is implied if DynamicUser= is set. This setting cannot ensure protection in all cases. In general it has the same limitations as ReadOnlyPaths=, see below.

    This option is only available for system services and is not supported for services running in per-user instances of the service manager.
Na początek ustawiłbym ProtectHome=no


Skocz do:




Użytkownicy przeglądający ten wątek: 1 gości