* [linux-lvm] getting pe_start right
@ 2011-05-06 14:55 Phillip Susi
2011-05-06 15:05 ` CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI)
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Phillip Susi @ 2011-05-06 14:55 UTC (permalink / raw)
To: linux-lvm
While trying to convert my mdadm raid5 array from metadata format 0.9 to
1.0, I forgot to specify the version and it defaulted to 1.2, which
damaged the lvm metadata. After correcting mdadm to 1.0, I decided to
try to recreate the LVM after managing to locate the volume descriptions
in the metadata after manually dumping it.
The problem I now have is that pvcreate will not use the same pe_start
as before. It was 384 and it is now 3072. I tried using --metadatasize
192k --dataalignmentsize 0 and it did not help. What gives?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] getting pe_start right
2011-05-06 14:55 [linux-lvm] getting pe_start right Phillip Susi
@ 2011-05-06 15:05 ` CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI)
2011-05-06 15:16 ` Milan Broz
2011-05-06 15:21 ` Mike Snitzer
2 siblings, 0 replies; 5+ messages in thread
From: CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI) @ 2011-05-06 15:05 UTC (permalink / raw)
To: LVM general discussion and development
Try "--metadatasize 288k
-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
On Behalf Of Phillip Susi
Sent: Friday, May 06, 2011 10:56 AM
To: linux-lvm@redhat.com
Subject: [linux-lvm] getting pe_start right
While trying to convert my mdadm raid5 array from metadata format 0.9 to
1.0, I forgot to specify the version and it defaulted to 1.2, which
damaged the lvm metadata. After correcting mdadm to 1.0, I decided to
try to recreate the LVM after managing to locate the volume descriptions
in the metadata after manually dumping it.
The problem I now have is that pvcreate will not use the same pe_start
as before. It was 384 and it is now 3072. I tried using --metadatasize
192k --dataalignmentsize 0 and it did not help. What gives?
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] getting pe_start right
2011-05-06 14:55 [linux-lvm] getting pe_start right Phillip Susi
2011-05-06 15:05 ` CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI)
@ 2011-05-06 15:16 ` Milan Broz
2011-05-06 15:21 ` Mike Snitzer
2 siblings, 0 replies; 5+ messages in thread
From: Milan Broz @ 2011-05-06 15:16 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Phillip Susi
On 05/06/2011 04:55 PM, Phillip Susi wrote:
> While trying to convert my mdadm raid5 array from metadata format 0.9 to
> 1.0, I forgot to specify the version and it defaulted to 1.2, which
> damaged the lvm metadata. After correcting mdadm to 1.0, I decided to
> try to recreate the LVM after managing to locate the volume descriptions
> in the metadata after manually dumping it.
>
> The problem I now have is that pvcreate will not use the same pe_start
> as before. It was 384 and it is now 3072. I tried using --metadatasize
> 192k --dataalignmentsize 0 and it did not help. What gives?
Try to set
default_data_alignment = 0
from lvm.conf:
# Default alignment of the start of a data area in MB. If set to 0,
# a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc.
Also, if you use
pvcreate --uuid <pv uuid from metadata> --restorefile <old VG backup>
it should create PV exacltly as needed for olf VG (with --restorefile it uses
offset from metadata backup, overriding default)
Then vgcfgrestore and you should have exactly the same cfg.
Milan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] getting pe_start right
2011-05-06 14:55 [linux-lvm] getting pe_start right Phillip Susi
2011-05-06 15:05 ` CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI)
2011-05-06 15:16 ` Milan Broz
@ 2011-05-06 15:21 ` Mike Snitzer
2011-05-10 14:28 ` Phillip Susi
2 siblings, 1 reply; 5+ messages in thread
From: Mike Snitzer @ 2011-05-06 15:21 UTC (permalink / raw)
To: LVM general discussion and development
On Fri, May 06 2011 at 10:55am -0400,
Phillip Susi <psusi@cfl.rr.com> wrote:
> While trying to convert my mdadm raid5 array from metadata format
> 0.9 to 1.0, I forgot to specify the version and it defaulted to 1.2,
> which damaged the lvm metadata. After correcting mdadm to 1.0, I
> decided to try to recreate the LVM after managing to locate the
> volume descriptions in the metadata after manually dumping it.
>
> The problem I now have is that pvcreate will not use the same
> pe_start as before. It was 384 and it is now 3072. I tried using
> --metadatasize 192k --dataalignmentsize 0 and it did not help. What
> gives?
Would be quite helpful if you shared kernel and lvm2 version info...
chances are lvm2's data_alignment_detection will shift the data start to
the start of the next full stripe of the raid5.
You should be able to specify the old start with:
--dataalignment 192k --dataalignmentoffset 0
(--dataalignmentoffset 0 likely isn't needed, but it just overrides
lvm2's data_alignment_offset detection if it just so happens that
raid5 has alignment_offset!=0)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] getting pe_start right
2011-05-06 15:21 ` Mike Snitzer
@ 2011-05-10 14:28 ` Phillip Susi
0 siblings, 0 replies; 5+ messages in thread
From: Phillip Susi @ 2011-05-10 14:28 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Mike Snitzer
On 5/6/2011 11:21 AM, Mike Snitzer wrote:
> chances are lvm2's data_alignment_detection will shift the data start to
> the start of the next full stripe of the raid5.
That appears to be what was going on. I found entries in lvm.conf to
enable/disable autodetection of the raid stripe width and turned it off.
> You should be able to specify the old start with:
>
> --dataalignment 192k --dataalignmentoffset 0
>
> (--dataalignmentoffset 0 likely isn't needed, but it just overrides
> lvm2's data_alignment_offset detection if it just so happens that
> raid5 has alignment_offset!=0)
The command line switches did not appear to override the autodetection;
I had to shut it off in the conf file. Is this a bug?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-10 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-06 14:55 [linux-lvm] getting pe_start right Phillip Susi
2011-05-06 15:05 ` CHANDRASEKARAN, GIRIDHAR (GIRI) (ATTSI)
2011-05-06 15:16 ` Milan Broz
2011-05-06 15:21 ` Mike Snitzer
2011-05-10 14:28 ` Phillip Susi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).