On Fri, 28 Aug 2015, Andrei Borzenkov wrote:
Отправлено с iPhone
28 авг. 2015 г., в 4:28, Xen <list@xenhideout.nl> написал(а):
Hey,
I am having trouble reinstalling Grub2.
I am in a live session of Kubuntu. I used it to backup my LVM volumes, and then to recreate them using thin volumes. I've done this two times before without thin-provisioned volumes and never got a problem.
Now I get this error:
grub2-probe: error: disk `lvmid/URtZA3-OgVA-rFoA-xjlw-BOsX-iVMd-U5iWJy/2fa6lw-4f4q-c20g-0Ry8-t02S-CMry-iI6jed' not found.
Grub2 does not include support for thin volumes. So it sees reference to LV when scanning devices but cannot really access them.
Someone will need to implement for them ...
All the same it will boot from a thin volume just fine. OpenSUSE's initrd supports it (much to my luck!) and even the tools for thin volume manipulation is included in the distribution (thin_check and all that). I have just hand-crafted a grub.cfg (for grub2) which is perfect imo. Grub2-install installs it without issue. The boot partition is not on LVM, so grub really doesn't have to deal with it I guess. It passes the root that I want to the kernel and the kernel has no issue with loading it. Here I thought this would be such a fine solution ;-). But actually OpenSUSE is the only thing that works on my computer right now ;-). Kubuntu won't run (due to thin volumes) and I can't even chroot into it (due to weird errors) and Windows likes to install updates for such a long time that the insistment of "Don't turn off your computer" readily falls on deaf ears with me. Which of course renders the whole thing unusable as safe mode won't even boot any more and now... Yeah. Here I thought thin volumes was a very much supported thing, but I only looked at Red Hat documentation. Anyway, auto-generating a grub.cfg is the least of my concerns right now. It seems such a nice solution to the "fixed volume size" problem. I don't want to use btrfs because of the added complexity and I can do much of the same things btrfs does. I can create a thin-snapshot of a thin-volume out of the thin-pool and although it seems a bit of a headache to do 'volume creation' as a form of doing backups it means you can snapshot without needing extra space apart from the space that is already available in the thin pool. It will do copy-on-write (I think) and copy the changed files (their original versions) (more like blocks) into the snapshot volume to keep the snapshot (at time of creation) intact while not changing the original volume in any way. Then it's easy backup and then you discard the snapshot volume. The only downside is that you do need to watch the available space in the thin-pool if you are really thin-provisioning (which I am doing, a bit, just to make better use of free space). This is my volume list for what it's worth, if it interests anyone: LV VG Attr LSize Pool Origin Data% home linux Vwi-aotz- 32.00g hpthin 2.80 hpthin linux twi-a-tz- 51.43g 32.38 kubuntu linux Vwi-aotz- 8.00g hpthin 51.95 squid linux Vwi-aotz- 1.00g hpthin 28.16 suse linux Vwi-aotz- 16.00g hpthin 70.77 swap linux -wc-ao--- 4.00g The virtual size in total is 57G which is ~5.5G more than what's really there. As long as "suse" doesn't fill up, "home" has more leeway, and as long as "home" doesn't fill up, everything else has more leeway. I think it's pretty nice, maybe not perfect, but it's what I love right now. Kudos, Bart