Closed greatquux closed 11 years ago
The conversion strategy for partitions doesn't work if there isn't either free space or a shrinkable filesystem before the partition you want to convert. You still have the option of converting to bcache over lvm
blocks to-lvm /dev/sda1; blocks to-bcache /dev/<newVG>/<newVol>
I'll try to make the messages clearer; the "-1" in the path name for unnamed partitions is bogus.
Ah, that explains it. I guess I could also use gparted to shrink my root and move it 'forward' but that will probably take a while. But if I can convert to LVM then bcache that sounds better. Thanks!
Getting this error when trying to LVMify my root partition:
root@ubuntu:~# blocks to-lvm /dev/sda1
Traceback (most recent call last):
File "/usr/local/bin/blocks", line 9, in
I may try to create some free space in front of my /dev/sda1. How much is required?
If you shift it by 1MiB it should be fine. I've just fixed the assert that you hit.
Thanks. I actually wound up shifting it by like 500MB because I saw this update later. But hopefully I can wind up moving that back later (I imagine parted needs to be updated to handle bcache volumes though). After booting from a daily Saucy image, turning off swap, and installing blocks and bcache-tools, I can convert my /dev/sda1 to bcache:
root@ubuntu:~/bcache-tools# blocks to-bcache /dev/sda1 Command ['dmsetup', 'remove', '--noudevsync', '--', 'rozeros-4b55d6e4-f21d-11e2-a461-5404a6efae19'] has failed with status 1 Standard output:
Standard error: device-mapper: remove ioctl on rozeros-4b55d6e4-f21d-11e2-a461-5404a6efae19 failed: Device or resource busy Command failed
Copying the bcache superblock... ok Shifting partition to start on the bcache superblock... ok
Not sure what those other errors are though. I can mount /dev/bcache0 and I can attach my cache device. I've already installed bcache-tools into my root FS so I think I'll be good to go when I reboot. I might have forgotten to rebuild the initramfs though... :)
Yep, rebooted and now I'm working great! I suppose I might have some issues later on when upgrading but hopefully by the time saucy is released any issues will be ironed out. Thanks for all your help on this!
After booting with the raring USB and taking the recommended steps to get blocks working, I attempt to convert my /dev/sda1 filesystem. However I get the error: blocks to-bcache /dev/sda1 The range we want to reserve overlaps with the start of partition /dev/sda-1 (metadata), the shrinking strategy will not work.
Any ideas why I get it and how I can get my / filesystem to convert to bcache?