Formatar SSD 1Tb fresquinho: afinal quantas e quais partições?

1. Formatar SSD 1Tb fresquinho: afinal quantas e quais partições?

Jansen
Halephy

(usa Linux Mint)

Enviado em 14/12/2022 - 10:56h

Saudações a toda comunidade!
Desde que usava o ruindows, anos atrás, havia dilemas com particionamento de HD ao formatar: no geral, duas: 'sistema' e 'arquivos'. Ao migrar para meu querido Mint (21 atualmente), continuo com algumas dúvidas. Vejam:
- Meu perfil atual. Maquina: notebook dell 15 5566, i5 7th, 8Gb DDR3, SSD 480. Uso doméstico e acadêmico: programas estatisticos como JAMOVI, PSPP, RKWard, games da steam como Dying light, Dirt 4; alguns pacotes de escritório, etc. (nada taaao pesado), não trabalho com edição de vídeos nem streaming etc.
Daí catei um SSD baratin de 1Tb, e volto aos dilemas de particionamento, diante de uma prox formatação nova em folha. A princípio, penso:
A) Partição primária "root" (/), com 100Gb; (atualmente uso 50Gb, com 50% em uso)
B) Partição SWAP, com 8gb; (atualmente não uso)
C) Partição primária /home, com o restante de espaço disponível;


Parecem necessárias outras partições específicas, pra boot, ou pra alocar os backups do timeshift, ou etc.? Ou se a SWAP parece desnecessária nesse contexto, etc.
Fico inseguro de simplesmente ignorar a criação das demais partições mencionadas na lista do gerenciador de formatação do Mint, mas sei que o SO roda mesmo se eu botar tudo numa partição só hehehe.

Vi que a coisa era mais séria quando comecei a pesquisar mais sobre, como no tópico https://www.vivaolinux.com.br/dica/Sugestao-de-particionamento

Boa semana a tds!


  


2. Re: Formatar SSD 1Tb fresquinho: afinal quantas e quais partições?

stoner
storma

(usa Outra)

Enviado em 14/12/2022 - 14:39h

Não precisa de uma partição para /boot se não tiver uma razão específica.. Acho que antigamente era necessário mas hoje em dia não mais pq as outras partições já vão ter sido montadas de qq forma na hora do boot, pois o processo se atualizou um pouco mas de cabeça não me lembro a história exatamente..

Agora eu criaria sim uma SWAP com o dobro da RAM... Tem várias coisas que não dá para fazer sem uma SWAP partição, como por exemplo alguns core dumps não vão ser registrados caso não haja SWAP (ou seja, muito difícil de debugar), e leva a vários tipos de OOM killer crashes. Uma imagem do kernel rodante vai ter que ser gravada no raw device, geralmente a partição swap, daí não tem como saber qual vai ser o tamanho do kernel na hora do pânico. Depois de rebootar, o kernel defeituoso vai embora..

Além disso, você vai querer SWAP para que a RAM seja usada de forma eficiente. Alguns programas são rodados somente na inicialização do sistema ou a cada muitas horas, assim, se não houver SWAP, o kernel não tem escolha a não ser deixar esses programas pouco utilizados carregados na RAM, RAM essa que não poderá ser utilizada para mais nada!

Em caso de erro de memory leak, quando você perceber o sistema estará inutilizável, enquanto que um erro desses demora para travar o kernel quando tem bastante SWAP disponível, e assim, você tem tempo de achar o programa com vazamento de memória.

A mesma partição de SWAP pode ser utilizada por mais de uma distro que esteja instalada no sistema. Cheers!


The kernel dump operation is done right after a panic on a raw device. This raw device is either the swap area or a dedicated partition.

The savecore operation is done when the OS reboots and indeed create files on a filesystem.

The latter operation doesn't happen if the former one didn't so I still assert either a swap or a dedicated partition is required for the kernel crash dump to succeed [or] a filesystem.


[...]


The dump device is where the kernel will write the crash dump when it encounters a panic condition. This is always a raw area on disk. Remember that a panic means that the kernel has malfunctioned. No one would want a malfunctioning kernel to attempt to write a very large file into a file system. The very reason for a panic is to stop I/O to filesystems before they are more badly damaged.

The savecore program runs during a reboot (but after fsck's and thus we are sure that the filesystem can be used). Usually the dump device is not dedicated but is a swap area so we want to crash dumps before swap is needed. savecore reads from the dump area and write to the file system. We clearly need to save an image of the damaged kernel before we reboot. After a reboot, the broken kernel is gone.

[...]

One of the reasons why an option was added to dumpadm to allow not using the swap space was precisely swap space not being allocated large enough for crash dump to succeed.

https://www.unix.com/solaris/76721-coredumps-swap-part-solaris-mem-consumption-4.html


To properly size the swap area, there are two factors to take into account.

1: at the peak virtual memory consumption, all memory reservations need to be backed by either RAM or swap area pages. This doesn't means any activity will necessarily occur on the swap, just the pages have to be there. Solaris isn't doing lazy memory allocation like the Linux kernel does. The free virtual memory can be easily monitored and it is easy to increase its size by adding new swap devices or swap files, so this first point isn't that much of a problem.

2: The default Solaris configuration is to have crash dumps to be written on the swap. Many (but not 99.9% of) Solaris installations are using this standard configuration. In the old Solaris 2.x days, the swap area was very often larger than the RAM size because the (already obsolete) rule of thumb x2 was still followed. There was no risk for the crash dump not to fit. Nowadays, it is not uncommon to have the RAM much larger than the swap. That means there is a risk to miss the invaluable data stored there should a panic happen. I'm not telling this risk cannot be overcome, I'm telling many people are unaware of this risk because it is not common to monitor the kernel size and even less common to check if it would fit in the dump device should a panic occur.

[..]

Swap doesn't slows you down, lack of RAM slows you down when swap is available and crashes your application when no swap is there. I strongly prefer my applications to slow down and the OS to paginate than seeing random applications crashing because of malloc failures.

https://www.unix.com/solaris/76721-coredumps-swap-part-solaris-mem-consumption-6.html


3. Re: Formatar SSD 1Tb fresquinho: afinal quantas e quais partições?

Clodoaldo Santos
clodoaldops

(usa Linux Mint)

Enviado em 14/12/2022 - 21:33h

Meu laptop tem três partições
Boot + Raíz + Home
Eu não uso swap no SSD
Mas há quem use







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts