I have a RAID-0 setup on two identical hard disks (same brand and model). The partition table is identical on both (I have cloned it). However, /dev/md0 occupies only part of the disks, because I had to do some juggling with data I had on a previous installation, so I could not just wipe out everything.

Anyway, I set up LVM on md0, and created some logical volumes, including one for swap. But when I use mkswap, it complains about the partition being misaligned:

sudo mkswap /dev/vg000/swap
mkswap: warning: /dev/vg000/swap is misaligned
Setting up swapspace version 1, size = 8 GiB (8589930496 bytes)

Am I supposed to worry about this? If it only means some Mb of swap won't be usable, that's fine. But if it means I may have memory corruption because swapping won't work properly, then, obviously, I'd like to know how to fix it!

1 Answer 1


This is a warning based on information provided by the kernel. Misalignment mostly has performance impacts; on SSDs it may result in additional wear. It won't cause corruption!

Software RAID 10 + LVM on mixed drives, sector alignment? has lots of useful information on this, including recipes to set things up correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .