Hi Stefan, On Sun, Jan 14, 2024 at 11:32:37PM -0500, Stefan Monnier wrote: > Do you need a partition table?
These are other people's virtual machines so to some extent I don't have a say on what they put inside them. It is always nice to understand what is going on though! > What happens if you use diskimages that contain directly a filesystem > without going through the trouble of using a partition table? > Does `ext4` also get tripped by the different underlying block size? I believe it will also fail but I haven't directly experimented. On the target host I was able to use fdisk (or gdisk or parted or whatever…) to change the partition table to be "correct", which enabled me to then use "kpartx" to expose the partition out of the disk image as a loop device as usual. However, the ext4 driver and fsck.ext4 were still unable to find superblocks on this. This despite a sha256sum of the loop device coming back with the same hash as a sha256sum of the partition on the source. So, I believe that the existence or type of a partition table doesn't matter and similar problems would be encountered if an ext4 filesystem were directly put on the LV. It's just that with there being a partition table I see problems sooner as the geometry of the drive is all wrong and tools like kpartx can't work. Unless there is some way to fiddle this at the LVM PV level, I think I must try using hdparm to convert the target HDDs to 512 byte sectors. I will try asking the LVM folks. Thanks, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting