Re: Any way in LVM to deal with 512e vs 4Kn physical devices?

Ilia Zykov <[email protected]> Wed, 17 Jan 2024 22:05:02 +0300
Newsgroups gmane.linux.lvm.general
Message-ID <[email protected]>
On 17.01.2024 17:24, Phillip Susi wrote:
> Ilia Zykov <[email protected]> writes:
> 
>> Hello.
>>
>> Sorry, I could be wrong, but I was encountered this problem a long time ago.
>> You cannot transfer ext4 from a device with a phys sector 512 bite to a
>> device with phys 4k sector device.
>> As far as I remember, ext4 uses this size to perform atomic operations.
>> Because on the new disk it is not possible to perform an atomic
>> operation with data of 512 bytes,
>> then it is impossible to transfer such a FS.
>> See ENVIROMENTS for mkfs.ext4: "MKE2FS_DEVICE_SECTSIZE",
>> "MKE2FS_DEVICE_PHYS_SECTSIZE".
> 
> Ext[234] does IO in units of blocks.  In the days of 80 MB hard disks,
> it could use a block size of 1 or 2 KB.  These days it pretty much
> always uses 4 KB.  I'm almost certain that those environment variables
> are to override what the kernel detects for testing purposes, and the
> only thing mkfs does with this information is to force a 4K block size (
> when that is the sector size ), even if the fs is small enough that it
> otherwise would use 1 or 2.
> 
> 

Yes, Andy confirmed that there are no problems with 4k blocks, without 
partition tables. And now I think so too )
Thank you.

----