On Tue, Aug 28, 2018 at 12:50 PM, Cerem Cem ASLAN <cerem...@ceremcem.net> wrote: > I've successfully moved everything to another disk. (The only hard > part was configuring the kernel parameters, as my root partition was > on LVM which is on LUKS partition. Here are the notes, if anyone > needs: > https://github.com/ceremcem/smith-sync/blob/master/create-bootable-backup.md) > > Now I'm seekin for trouble :) I tried to convert my new system (booted > with new disk) into raid1 coupled with the problematic old disk. To do > so, I issued: > > sudo btrfs device add /dev/mapper/master-root /mnt/peynir/ > /dev/mapper/master-root appears to contain an existing filesystem (btrfs). > ERROR: use the -f option to force overwrite of /dev/mapper/master-root > aea@aea3:/mnt$ sudo btrfs device add /dev/mapper/master-root /mnt/peynir/ -f > ERROR: error adding device '/dev/mapper/master-root': Input/output error > aea@aea3:/mnt$ sudo btrfs device add /dev/mapper/master-root /mnt/peynir/ > sudo: unable to open /var/lib/sudo/ts/aea: Read-only file system > > Now I ended up with a readonly file system. Isn't it possible to add a > device to a running system?
Yes. The problem is the 2nd error message: ERROR: error adding device '/dev/mapper/master-root': Input/output error So you need to look in dmesg to see what Btrfs kernel messages occurred at that time. I'm gonna guess it's a failed write. You have a few of those in the smartctl log output. Any time a write failure happens, the operation is always fatal regardless of the file system. -- Chris Murphy