Linux LVM silliness

While attempting to create a 2-way LVM mirror this weekend on my Fedora Core 5 workstation, I received the following error:

$ lvcreate -L1024 -m 1 vgdata

  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.

Since the two devices were initialized specifically for this purpose and contained no other data, I was confused by this error message. After scouring Google for answers, I found a post that indicated that I needed a log LV for this to work, and the log LV had to be on it’s own disk. I am not sure about most people, but who on earth orders a box with three disks? Ugh!

3 thoughts on “Linux LVM silliness”

  1. It’s probably a bit late to be mentioning this, since it was months ago when this post was made, but anyway…

    There’s a –mirrorlog argument which can either be disk or core.The default is disk, which uses a small LV on a third physical device to hold the log file which tracks the synchronization between the mirrors. If you specify core (“–corelog” is a deprecated synonym for “–mirrorlog core”), the log is stored in memory. The “drawback” is that there’s no persistant log, then, so every time you reboot, the mirrored drive is rebuilt from the master.

    Also, be aware that doing things like mounting by label or uuid are less than fun with the mirrors, since there end up being two devices with the same id (the filesystems are mirrored, after all) and you get odd results. Not that you’d mount by uuid if you’re using lvm anyway, but it seemed worth mentioning…

Leave a Reply

Your email address will not be published. Required fields are marked *