I am most of the way through converting a raid1 mdadm with lvm on top to a btrfs system. the two disks/partitions involved are on /dev/sdb and /dev/sdc.

In the original configuration both disks had 3 partitions and device /dev/md1 was made up of /dev/sdb3 and /dev/sdc3. The conversion process was as follows

  1. fail and then remove /dev/sdb3
  2. use fdisk to repartition /dev/sdb into 4 partitions - I couldn't sync kernel to new partiion layout so rebooted
  3. made a btrfs filesystem on /dev/sdb4 (also on /dev/sdb2 but thats not important here) size 1.7TB
  4. created a mount point on /mnt/sdb4 created subvolumes to correspond to each of my logical volumes on my (now degraded) raid device. One of these (vbox) was to hold virtual box images, so I did chattr +C /mnt/sdb4/vbox
  5. User rsync to copy each of my logical volumes on the raid device to the appropriate subvolume on btrfs. As each completed I unmounted the raid volume, adjusted /etc/fstab to now mount using the btrfs subvolume and then mounted it. When all this completed I rebooted to be sure it all came up properly.
  6. I then removed all the logical volumes and finally the volume group from the raid array, and then stopped and deleted the raid device. Rebooted once more
  7. Used fdisk to repartition /dev/sdc to the similar 4 partitions on /dev/sdb I made and independant btrfs filesystem in /dev/sdc2
  8. I mounted /dev/sdb4 (subvol=/) on /mnt/sdb4 and then issued the following command btrfs device add -f /dev/sdc4 /mnt/sdb4
  9. Finally I issued this command btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/sdb4 HOWEVER this failed with "ERROR: error during balancing '/mnt/sdb4': No space left on device There may be more info in syslog - try dmesg | tail"

I tried looking in syslog as recommended, but that doesn't help [ 634.536221] BTRFS info (device sdb4): disk added /dev/sdc4 [ 671.472167] BTRFS info (device sdb4): relocating block group 12582912 flags 1 [ 671.934540] BTRFS info (device sdb4): found 946 extents [ 672.622029] BTRFS info (device sdb4): found 946 extents [ 672.913928] BTRFS info (device sdb4): 379 enospc errors during balance The output from btrfs fi show is

``` Label: 'raid' uuid: c3356f85-4b40-409d-a775-72e9c6735ed8 Total devices 2 FS bytes used 377.08GiB devid 1 size 1.71TiB used 379.02GiB path /dev/sdb4 devid 2 size 1.00KiB used 0.00B path /dev/sdc4

Label: 'debianb' uuid: 94a949e0-b815-4dce-812d-7000f4654a10 Total devices 1 FS bytes used 285.25MiB devid 1 size 100.00GiB used 3.02GiB path /dev/sdb2

Label: 'debianc' uuid: 02ed1d78-8501-4940-ac61-fa9dcf084b56 Total devices 1 FS bytes used 112.00KiB devid 1 size 100.00GiB used 2.02GiB path /dev/sdc2 ```

Which shows plenty of space.

I am doing all of this on debian stretch

So why is the no space left on device being reported, and what can I do to get this filesystem properly converted to raid1?

closed as too broad by Jeff Schaller, thrig, GAD3R, countermode, slm Feb 26 '17 at 1:01

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

My fault I think. I screwed up partitioning /dev/sdc so the 4th partition was zero length.

Not the answer you're looking for? Browse other questions tagged or ask your own question.