Este conteúdo não está disponível no idioma selecionado.

Chapter 4. Trim options on an LVM-VDO volume


The following are different available trim options for an LVM-VDO volume:

discard
Performs online block discard operations to automatically discard unused blocks. For immediate discarding, use the mount -o discard command.
fstrim
Performs periodic discarding. The admin needs to schedule and monitor an additional process.
Note

It is currently recommended to use fstrim application to discard unused blocks rather than the discard mount option because the performance impact of this option can be quite severe. For this reason, nodiscard is the default.

4.1. Enabling discard mount option on an LVM-VDO volume

You can enable the discard option on your LVM-VDO volume.

Prerequisites

  • An LVM-VDO volume exists on your system.

Procedure

  • Enable the discard option on your volume:

    # mount -o discard /dev/vg-name/vdo-name mount-point

Additional resources

  • xfs(5), mount(8), and lvmvdo(7) man pages on your system

4.2. Setting up periodic TRIM operation

You can enable a scheduled TRIM operation on your system.

Prerequisites

  • An LVM-VDO volume exists on your system.

Procedure

  • Enable and start the timer:

    # systemctl enable --now fstrim.timer

Verification

  • Verify that the timer is enabled:

    # systemctl list-timers fstrim.timer
    NEXT                         LEFT         LAST  PASSED  UNIT         ACTIVATES
    Mon 2021-05-10 00:00:00 EDT  5 days left  n/a   n/a     fstrim.timer fstrim.service
Note

You will not see any reference to a VDO volume, because the fstrim.timer runs across all mounted file systems.

Additional resources

  • fstrim(8) man page on your system
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.