Atualizar Criar zpool com ZIL e CACHE

2025-10-10 08:15:53 -03:00
parent 6b57741e31
commit 644cb1afd9

@@ -1,22 +1,24 @@
Add cache and log to an existing pool Adicionar cache e log a um pool existente
If you have a pool without cache and log you can still add both, or just one of them, at any time.
For example, lets assume you got a good enterprise SSD with power-loss protection that you want to use for improving the overall performance of your pool. Se você tiver um pool sem cache e log, ainda poderá adicionar ambos — ou apenas um deles — a qualquer momento.
As the maximum size of a log device should be about half the size of the installed physical memory, it means that the ZIL will most likely only take up a relatively small part of the SSD, the remaining space can be used as cache. Por exemplo, vamos supor que você tenha um bom SSD corporativo com proteção contra perda de energia, que deseja usar para melhorar o desempenho geral do seu pool.
First you have to create two GPT partitions on the SSD with parted or gdisk. Como o tamanho máximo de um dispositivo de log deve ser aproximadamente a metade da memória física instalada, isso significa que o ZIL provavelmente usará apenas uma parte relativamente pequena do SSD. O espaço restante pode ser usado como cache.
Then you are ready to add them to a pool: Primeiro, você precisa criar duas partições GPT no SSD com o parted ou o gdisk.
Add both, a separate log device and a second-level cache, to an existing pool Depois disso, você estará pronto para adicioná-las ao pool:
` zpool add -f <pool> log <device-part1> cache <device-part2>` Adicionar ambos — um dispositivo de log separado e um cache de segundo nível — a um pool existente
`zpool add -f <pool> log <dispositivo-part1> cache <dispositivo-part2>`
Just replace , and with the pool name and the two /dev/disk/by-id/ paths to the partitions.
You can also add ZIL and cache separately. Basta substituir <pool>, <dispositivo-part1> e <dispositivo-part2> pelo nome do pool e pelos caminhos dos dispositivos em /dev/disk/by-id/ correspondentes às partições.
Add a log device to an existing ZFS pool Você também pode adicionar o ZIL e o cache separadamente.
`zpool add <pool> log <log-device>` Adicionar um dispositivo de log a um pool ZFS existente
`zpool add <pool> log <dispositivo-log>`
ou
`zpool add <pool> cache <dispositivo-part2>`