Hi Thomas,

On Sun, Jan 14, 2024 at 02:33:37PM +0100, Thomas Schmitt wrote:
> I wonder, though, why fdisk would misrepresent the total disk size,
> which i would expect to come from the storage device.
> Maybe fdisk is more confused than i expect.
> 
> Can you show the whole output of fdisk from the new logical device ?

Sorry, I've deleted it now as I've been preparing to try hdparm to
set the underlying HDDs to 512e.

However, what I meant was that fdisk showed a single partition of
3.2TB size, while the entire disk being only the 400G, which is as
you would expect if it thinks the sector count is for 4K sectors,
not 512b ones.

> The start address and the number of sectors is integer divisible by 8.
> You could change the partition start and size so that the block numbers
> address the correct bytes with the 8 fold larger logical block size.
> 
> But given that this could still create an unusual situation in the
> filesystem driver, i would try to create a device with a logical block
> size of 512.

I did try using fdisk on the destination to delete the partition and
recreate it with the correct numbers, but the ext4 driver and fsck
and other filesystem tools were still totally unable to work with
it. Yet, a sha256sum of the disk image file at both sides showed the
same value, so it is the same data.

Is it actually possible to create an LVM volume that thinks it has 512b logical 
sectors, on an underlying device that is 4Kn?

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Reply via email to