Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
linux:btrfs [08-07-2019 22:43] edmc73 [Passer de ext4 à btrfs] |
linux:btrfs [28-04-2021 16:16] (Version actuelle) edmc73 |
||
---|---|---|---|
Ligne 128: | Ligne 128: | ||
Mettre à jour grub | Mettre à jour grub | ||
mount /dev/sda2 /mnt | mount /dev/sda2 /mnt | ||
- | mount /dev/sda1 /mnt/boot | + | mount /dev/sda1 /mnt/boot/efi |
for fs in proc sys dev dev/pts; do mount --bind /$fs /mnt/$fs; done | for fs in proc sys dev dev/pts; do mount --bind /$fs /mnt/$fs; done | ||
chroot /mnt | chroot /mnt | ||
Ligne 134: | Ligne 134: | ||
update-grub | update-grub | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | La suite peut aider mais pas nécessaire normalement. | ||
Ligne 159: | Ligne 164: | ||
+ | ----------------------- | ||
+ | |||
+ | Si votre grub est coincé au redémarrage | ||
+ | < | ||
+ | grub>ls #pour lister les partition | ||
+ | set root=(hd0, | ||
+ | linux /vmlinuz root=/ | ||
+ | initrd /initrd.img | ||
+ | boot | ||
+ | </ | ||
+ | |||
+ | ensuite, pour réparer grub | ||
+ | update-grub | ||
+ | |||
+ | |||
+ | ===== Scripts tiers ===== | ||
+ | |||
+ | # btrfs-list: a wrapper to btrfs-progs to show a nice overview of your btrfs subvolumes and snapshots, a la 'zfs list' | ||
+ | # | ||
+ | # Check for the latest version at: | ||
+ | # https:// | ||
+ | # git clone https:// | ||
+ | # or wget https:// | ||
+ | # or curl -L https:// | ||
+ | |||
+ | ===== io disk ===== | ||
+ | |||
+ | -- source: https:// | ||
+ | |||
+ | Disable copy-on-write | ||
+ | |||
+ | Copy-On-write isn’t ideal for workloads that create or modify many small files, such as databases. Without disabling COW, you can heavily fragment the file system as explained above. | ||
+ | |||
+ | The best strategy for successfully running a database in a container is to disable COW on directory/ | ||
+ | |||
+ | The COW setting is stored as a file attribute and is modified with a utility called chattr. To disable COW for a MySQL container’s volume, run: | ||
+ | |||
+ | chattr -R +C / | ||
+ | | ||
+ | The directory / | ||
+ | |||
+ | -R indicates that want to recursively change the file attribute +C means we want to set the NOCOW attribute on the file/ | ||
+ | |||
+ | To verify, we can run: | ||
+ | |||
+ | < | ||
+ | $ lsattr /var/lib/ | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------- / | ||
+ | ---------------C / | ||
+ | </ |