Re: LVM thinp, mkfs "device is not properly aligned"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 15, 2017 at 5:07 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> On Wed, Nov 15, 2017 at 04:20:59PM -0700, Chris Murphy wrote:
>> # mkfs.xfs /dev/mapper/vg-timemachine
>> warning: device is not properly aligned /dev/mapper/vg-timemachine
>> Use -f to force usage of a misaligned device
>
> That is emitted when blikid tells XFS that the device it is about to
> format is not correctly aligned.
>
> The check that is failing:
>
>          if (blkid_topology_get_alignment_offset(tp) != 0)
>
> From here:
>
> https://www.kernel.org/pub/linux/utils/util-linux/v2.21/libblkid-docs/libblkid-Topology-information.html
>
> ALIGNMENT_OFFSET: indicates how many bytes the beginning of the
> device is offset from the disk's natural alignment.
>
> ....
>> $ lsblk -t
>>
> (Trimmed for brevity and readability)
> .....
>> NAME                      ALIGNMENT MIN-IO   OPT-IO
>> sda                               0   4096        0
>>   sda1                            0   4096        0
>>   sda2                            0   4096        0
>>     brick1                      512   4096        0
>>   sda3                            0   4096        0
>>   sda4                            0   4096        0
>>   sda5                            0   4096        0
>>     vg-cryptoswap               512   4096        0
>>       swap                      512   4096        0
>>     vg-thintastic_tmeta         512   4096        0
>>       vg-thintastic-tpool       512 524288   524288
>>         vg-thintastic           512 524288   524288
>>         vg-timemachine          512 524288   524288
>>     vg-thintastic_tdata         512   4096        0
>>       vg-thintastic-tpool       512 524288   524288
>>         vg-thintastic           512 524288   524288
>>         vg-timemachine          512 524288   524288
>>
>
> What you can see here is that all the volume groups have a non-zero
> alignment - they are all off by one sector - and that's what
> mkfs.xfs is warning you about. i.e. something's not quite right at
> the LVM layer....


Something else is screwy here. Look under sda2/brick1 which is a
dm-crypt volume created with cryptsetup, not lvm. It also has this
alignment value of 512.



-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux