Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a headless server running Debian Linux currently.

Linux vault 3.2.0-3-686-pae #1 SMP Mon Jul 23 03:50:34 UTC 2012 i686 GNU/Linux

The root filesystem is located on an ext3 partition on the main harddrive.
My data is located on multiple harddrives that are bundled to a storage pool running with btrfs.

UUID=072a7fce-bfea-46fa-923f-4fb0827ae428 /               ext3    errors=remount-ro 0       1
UUID=b50965f1-a2e1-443f-876f-578b5f93cbf1 none            swap    sw              0       0
UUID=881e3ad9-31c4-4296-ae60-eae6c98ea45f none        swap    sw          0       0
UUID=30d8ae34-e2f0-44b4-bbcc-22d761a128f6 /data btrfs defaults,compress,autodefrag 0 0

What I'd like to do is to place / into the btrfs pool too.
The ideal solution would provide the flexibility to boot from any disk in the system alike, so if the main drive fails I'd just need to swap another one into the main slot and it would be bootable like the main one.

My main problem is, everything I do needs to result in a bootable system that is open to ssh logins via network as this server is 100% headless so there is no possibility to boot it from a live cd or anything like that. So I'd like to be extra sure everything works out fine :)

How would I best go about this? Can anybody hint me to guides or whip something up for these tasks? Anything I forgot to think about?

  1. Copy root-data into btrfs pool, adjust mountpoints,...
  2. Adjust GRUB to boot from btrfs pool UUID or the local device where GRUB is installed
  3. Sync GRUB to all harddrives so every drive is equally bootable (is this even possible without destroying the btrfs partitions on the drives or would I need to disconnect the drives, install grub on them and then connect them back with a slightly smaller partition?)
share|improve this question
    
probably you are asking for trouble :P i would start by checking that grub can boot a kernel off the btrfs volume (maybe make a separate /boot partition?) and that your kernel can mount btrfs volume as root (btrfs module in initrd?) –  Raber Dec 11 '12 at 17:57
    
Probably yes. Well GRUB (non-legacy) should be able to boot from btrfs, i was told so by google and the web. And I'm pretty sure using btrfs as root should be possible since ubuntu and arch support booting from btrfs, I haven't found a Debian specific guide just now but it should be possible. My main issue is, the guides are for new installations only. And I'm trying to move to a different filesystem/partition :D –  bardiir Dec 11 '12 at 23:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.