meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:fs:btrfs_as_root2 [2017/01/19 20:49] – [Add 2nd disc] niziak | linux:fs:btrfs_as_root2 [2025/03/24 08:32] (current) – ↷ Links adapted because of a move operation niziak | ||
|---|---|---|---|
| Line 52: | Line 52: | ||
| **NOTE:** Create subvolumes for things which shouldn' | **NOTE:** Create subvolumes for things which shouldn' | ||
| + | |||
| + | [[https:// | ||
| <code bash> | <code bash> | ||
| Line 119: | Line 121: | ||
| Create subvolumes: | Create subvolumes: | ||
| - | < | + | < |
| cd /mnt | cd /mnt | ||
| btrfs subvolume create @pool | btrfs subvolume create @pool | ||
| Line 130: | Line 132: | ||
| </ | </ | ||
| + | [[https:// | ||
| ===== Add 2nd disc ===== | ===== Add 2nd disc ===== | ||
| - | Copy partition layouts from sdb to sda drive: | + | See [[.btrfs:multidisk]] |
| - | <code bash> | + | |
| - | sudo sfdisk -d /dev/sdb > parts | + | |
| - | sudo sfdisk | + | |
| - | </ | + | |
| - | Recreate LVM layout. | ||
| - | |||
| - | Add 2nd disc to btrfs: | ||
| - | <code bash> | ||
| - | btrfs device add / | ||
| - | btrfs device usage / | ||
| - | btrfs balance start -v -dconvert=raid1 -mconvert=raid1 / | ||
| - | btrfs device usage / | ||
| - | </ | ||
| - | |||
| - | Let system boot without one disc: | ||
| - | <file | / | ||
| - | GRUB_CMDLINE_LINUX_DEFAULT=" | ||
| - | </ | ||
| - | <code bash> | ||
| - | |||
| - | Install grub | ||
| - | <code bash> | ||
| - | sudo grub-install /dev/sdb | ||
| - | sudo grub-install /dev/sdc | ||
| - | reboot | ||
| - | </ | ||
| - | |||
| - | ==== Issues ==== | ||
| - | |||
| - | === Grub === | ||
| - | **PROBLEM** | ||
| - | **'' | ||
| - | < | ||
| - | | ||
| - | / | ||
| - | </ | ||
| - | More here: [[https:// | ||
| - | **SOLUTION** | ||
| - | Fixed in Debian Stretch (testing) version **grub-pc_2.02~beta3-3** | ||
| - | Now UUID is used multiple roots. UUID of btrfs filesystem placed on 2 disc is the same: | ||
| - | <code bash> | ||
| - | / | ||
| - | / | ||
| - | </ | ||
| - | So, kernel cmdline parameter **'' | ||
| - | |||
| - | === no symbol table === | ||
| - | **PROBLEM** | ||
| - | Grub says: | ||
| - | < | ||
| - | **SOLUTION** | ||
| - | Grub was not reinstalled after update | ||
| - | <code bash> | ||
| - | grub-install /dev/sda | ||
| - | grub-install /dev/sdb | ||
| - | update-grub | ||
| - | </ | ||
| - | |||
| - | === ALERT! Dropping to shell! === | ||
| - | **PROBLEM** | ||
| - | Grub loads kernel and initramfs correctly, but: | ||
| - | '' | ||
| - | After some while, initramfs shell is available. | ||
| - | < | ||
| - | ALERT! | ||
| - | Dropping to shell! | ||
| - | </ | ||
| - | |||
| - | Unfortunatelly initramfs cannot activate LVM volumes when kernel cmdline '' | ||
| - | <code bash> | ||
| - | lvm lvscan | ||
| - | </ | ||
| - | To boot manually: | ||
| - | <code bash> | ||
| - | lvm vgchange -ay | ||
| - | mount / | ||
| - | exit | ||
| - | </ | ||
| - | System should start - but once. | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | <code bash> | ||
| - | vgchange -a y | ||
| - | update-initramfs -k all -u | ||
| - | btrfs scrub / | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | Also '' | ||
| - | |||
| - | |||
| - | <file | / | ||
| - | BINARIES="/ | ||
| - | </ | ||
| - | <code bash> | ||
| - | |||
| - | ===== Replace bad disc ===== | ||
| - | |||
| - | <code bash> | ||
| - | btrfs device add / | ||
| - | btrfs device delete missing / | ||
| - | btrfs fi balance / | ||
| - | </ | ||
| - | |||
| - | <code bash> | ||
| - | btrfs filesystem show | ||
| - | btrfs replace start 6 / | ||
| - | </ | ||
| - | ==== TODO ==== | ||
| - | * backup GPT header | ||
| - | * backup LVM header | ||
| - | * backup LUKS header | ||