g2p / blocks

Enable bcache or LVM on existing block devices
GNU General Public License v3.0
375 stars 43 forks source link

cmd_to_bcache: overdetecting a partition #35

Open etbuira opened 7 years ago

etbuira commented 7 years ago

My setup: /dev/sdx1 is EFI boot partition (hence vfat) /dev/sdx2 is luks holding my filesystems

If i read correct, it will be considered a partition in cmd_to_bcache (around line 1743) instead of luks. Moving code around to detect luks first, then partition, i could get rid of the (rather strange) following symptom.

blocks to-bcache /dev/sdx2

Unsupported superblock type: vfat

(remember, sdx2 is luks, the vfat holder is sdx1)

mincrmatt12 commented 5 years ago

I'm pretty sure this happens because to-bcache shifts the partition to the left a bit, and would usually shrink the partition to the left to allow this. If you were to move sdx2 a couple megabytes to the right (which annoyingly takes hours), this would not occur.

ohmstance commented 1 year ago

If anybody gets Unsupported superblock type: vfat, shrink the EFI partition a wee bit using fatresize, go through the bcache conversion process, then expand it back.