LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   LVM and disk alignment questions. (https://www.linuxquestions.org/questions/linux-server-73/lvm-and-disk-alignment-questions-4175419869/)

x3nn3x 08-01-2012 08:05 PM

LVM and disk alignment questions.
 
Hi All,

So, I'm running RHEL 5.x (physical) and I have a few questions that I hope you can help me with.

Is it true that if I set /etc/lvm/lvm.conf : data_alignment_detection to '1', the LVM partition will automagically align itself on my pv even if the pv is misaligned?
As I have a number of servers that are using LVM for all partitions.
(RHEL 6, I believe, aligns all partitions to a number divisible by 8, is this correct?)

Another thing... Is it possible that anyone knows of, if I can realign the root partition on the fly? Or is the only way to boot into a live disc and realign from there? (physical and, or, virtual)

Thanks for your assistance, and I appreciate it a LOT.

X3N.

ferricoxide 08-15-2012 08:28 PM

Quote:

Originally Posted by x3nn3x (Post 4743603)
Hi All,

So, I'm running RHEL 5.x (physical) and I have a few questions that I hope you can help me with.

Is it true that if I set /etc/lvm/lvm.conf : data_alignment_detection to '1', the LVM partition will automagically align itself on my pv even if the pv is misaligned?
As I have a number of servers that are using LVM for all partitions.
(RHEL 6, I believe, aligns all partitions to a number divisible by 8, is this correct?)

Going through RedHat's documentation, you probably need to be running RHEL 5.8 (in which case, the is the default behavior is similar/identical to RHEL 6's).
Quote:

Originally Posted by x3nn3x (Post 4743603)
Another thing... Is it possible that anyone knows of, if I can realign the root partition on the fly? Or is the only way to boot into a live disc and realign from there? (physical and, or, virtual)

I'm pretty sure you'd crash the machine for much the same reason that if you do a mbralign (or similar) after building on an unaligned disk you have to do a rescue-boot: you're making all of the currently mapped pointers and indexes invalid. Bout the only "on the fly" method I can think of would be to add an already-aligned PV to the root volume group, mirror your volumes onto the new PV and detach the original PV from the root volume group. You'd need to also make sure that GRUB knew where to find the boot-info post-reboot.


All times are GMT -5. The time now is 07:56 PM.