[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-lvm
Subject:    [linux-lvm] [PATCH LVM2 0/2] fix alloc anywhere and addition of
From:       "Jun'ichi Nomura" <j-nomura () ce ! jp ! nec ! com>
Date:       2006-09-22 22:27:19
Message-ID: 45146347.3070804 () ce ! jp ! nec ! com
[Download RAW message or body]

Hi,

Following patches will fix 2 problems:
  - 'lvcreate --alloc anywhere' cannot allocates log
    on the same PV with mimage. This prevents us to create a mirror LV
    on a VG with 2 PVs.
  - 'lvconvert' from corelog allocates log from the same PV
    with other image. It spoils redundancy.
(See attached metadata for examples)

This patch does the following changes:
  (1/2) fix-mirror-alloc-anywhere.patch
          - split log specific parts from _find_parallel_space() and
            _alloc_parallel_area()
          - determine log PV before doing other allocation
          - use constraints correctly
             * log allocation should avoid all PVs used by other parts of the LV
             * other allocation should avoid log PV and parallel PVs of
               corresponding lv segment (unchanged)
  (2/2) fix-lvconvert-allocate-disklog.patch
          - lvconvert to setup constraints properly

The 2nd patch itself is trivial and depends on the 1st patch for
the allocation logic to work correctly.

The patch has no effects on non-mirror allocation.
The patch was tested on the combinations of following scenarios:
  - normal or anywhere allocation policy
  - creation, corelog to disklog conversion, or linear to mirror conversion
  - VG with 2 PVs or more than 2 PVs

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America

["testvg0-lvconvert-corelog.vg" (text/plain)]

# Generated by LVM2: Fri Sep 15 01:52:07 2006

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing 'lvconvert -m 1 testvg0/lv0'"

creation_host = "tetsuo.lab"	# Linux tetsuo.lab 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
creation_time = 1158299527	# Fri Sep 15 01:52:07 2006

testvg0 {
	id = "a5E2Nr-71Z7-YhaJ-PPto-QJaO-UwVR-Xux2tO"
	seqno = 2
	status = ["RESIZEABLE", "READ", "WRITE"]
	extent_size = 8192		# 4 Megabytes
	max_lv = 0
	max_pv = 0

	physical_volumes {

		pv0 {
			id = "1W9Pf5-JK1B-1zdo-qayI-lIch-4rPc-Dr6X8J"
			device = "/dev/dm-0"	# Hint only

			status = ["ALLOCATABLE"]
			pe_start = 384
			pe_count = 4	# 16 Megabytes
		}

		pv1 {
			id = "hMbR7i-RqtC-PpKK-2iZD-CMnX-yytR-S2mrH6"
			device = "/dev/dm-1"	# Hint only

			status = ["ALLOCATABLE"]
			pe_start = 384
			pe_count = 4	# 16 Megabytes
		}

		pv2 {
			id = "guSc2r-Tw4k-akM5-tjZ5-6V9m-hwCB-faY10J"
			device = "/dev/dm-2"	# Hint only

			status = ["ALLOCATABLE"]
			pe_start = 384
			pe_count = 4	# 16 Megabytes
		}
	}

	logical_volumes {

		lv0 {
			id = "y13S23-cGCp-NcJU-45vy-yQuz-v231-lNkFi1"
			status = ["READ", "WRITE", "VISIBLE"]
			segment_count = 1

			segment1 {
				start_extent = 0
				extent_count = 1	# 4 Megabytes

				type = "mirror"
				mirror_count = 2
				region_size = 1024

				mirrors = [
					"lv0_mimage_0", 0,
					"lv0_mimage_1", 0
				]
			}
		}

		lv0_mimage_0 {
			id = "vi2BZp-1W9W-T42S-AX6w-kIqC-bMtn-bOtxdQ"
			status = ["READ", "WRITE"]
			segment_count = 1

			segment1 {
				start_extent = 0
				extent_count = 1	# 4 Megabytes

				type = "striped"
				stripe_count = 1	# linear

				stripes = [
					"pv0", 0
				]
			}
		}

		lv0_mimage_1 {
			id = "G0SqFV-YW3K-C33U-zl2I-PvG8-QGus-i0ivzn"
			status = ["READ", "WRITE"]
			segment_count = 1

			segment1 {
				start_extent = 0
				extent_count = 1	# 4 Megabytes

				type = "striped"
				stripe_count = 1	# linear

				stripes = [
					"pv1", 0
				]
			}
		}
	}
}

["testvg0-lvcreate-anywhere.vg" (text/plain)]

# Generated by LVM2: Fri Sep 15 01:53:14 2006

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing 'lvcreate -l1 -m1 -n lv0 testvg0'"

creation_host = "tetsuo.lab"	# Linux tetsuo.lab 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
creation_time = 1158299594	# Fri Sep 15 01:53:14 2006

testvg0 {
	id = "UxVVG5-H6xQ-VSBn-2RLF-xKKX-R0e6-XIRZ7j"
	seqno = 1
	status = ["RESIZEABLE", "READ", "WRITE"]
	extent_size = 8192		# 4 Megabytes
	max_lv = 0
	max_pv = 0

	physical_volumes {

		pv0 {
			id = "b3vmJK-Ez6R-ZemQ-7IMp-Xid3-PXXu-pqzIEc"
			device = "/dev/dm-0"	# Hint only

			status = ["ALLOCATABLE"]
			pe_start = 384
			pe_count = 4	# 16 Megabytes
		}

		pv1 {
			id = "UkeYvg-AR5E-soSC-PImG-upyk-O11S-fkfANu"
			device = "/dev/dm-1"	# Hint only

			status = ["ALLOCATABLE"]
			pe_start = 384
			pe_count = 4	# 16 Megabytes
		}
	}

}


_______________________________________________
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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic