[linux-lvm] lvchange not being able to change read/write permission !!!

Sharad Tiwari sharad.tiwari at wipro.com
Wed Apr 2 05:13:05 UTC 2003


Hi all, 

	Is this a bug ? When I do an lvchange to change the read/write
permission and then do the lvdisplay the changes are not reflected,
whereas the file in /etc/lvm/backup/testvg shows the permission changed
to read only. Other changes are reflected. ( I have checked with the
read ahead sectors )

Does this mean there is some inconsistency in the various metadata.
Where does lvdisplay  and its family read the information from ?? Apart
from the disk and the files in /etc/lvm/backup or /etc/lvm/archive, is
there any other place where the metadata information is stored.

I have reproduced the operations performed and also the content of
/etc/lvm/backup/testvg.

Thanks in advance,
Sharad.

[root at volts root]# vgdisplay
  --- Volume group ---
  VG Name               testvg
  System ID             volts1048777986
  VG Access             read/write
  VG Status             resizable
  MAX LV                255
  Cur LV                2
  Max PV                255
  Cur PV                2
  VG Size               692.00 MB
  PE Size               4.00 MB
  Total PE              173
  Alloc PE / Size       100 / 400.00 MB
  Free  PE / Size       73 / 292.00 MB
  VG UUID               NzLsW6-92uE-ssdu-wbl5-7w53-l6Gz-JrgM77

[root at volts root]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/testvg/testvol
  VG Name                testvg
  LV UUID                000000-0000-0000-0000-0000-0000-000000
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                200.00 MB
  Current LE             50
  Segments               2
  Allocation             next free
  Read ahead sectors     0
  Block device           254:0

[root at volts root]# lvchange -p r /dev/testvg/testvol
  Logical volume "testvol" changed

[root at volts root]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/testvg/testvol
  VG Name                testvg
  LV UUID                000000-0000-0000-0000-0000-0000-000000
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                200.00 MB
  Current LE             50
  Segments               2
  Allocation             next free
  Read ahead sectors     0
  Block device           254:0


[root at volts root]# cat /etc/lvm/backup/testvg
# This file was originally generated by the LVM2 library
# Generated: Mon Mar 31 09:22:33 2003


description = "Created *after* executing 'lvchange -p r
/dev/testvg/testvol'"
creation_time = 1049082753
testvg {
        id = "NzLsW6-92uE-ssdu-wbl5-7w53-l6Gz-JrgM77"
        seqno = 0
        status = ["RESIZEABLE", "READ", "WRITE"]
        system_id = "volts1048777986"
        extent_size = 8192              # 4 Megabytes
        max_lv = 255
        max_pv = 255

        physical_volumes {

                pv0 {
                        id = "5bMwLT-NYR2-Uzoy-pMPu-0pm1-FrvD-tyCYNr"
                        device = "/dev/hdb5"    # Hint only

                        status = ["ALLOCATABLE"]
                        pe_start = 256
                        pe_count = 49   # 196 Megabytes
                }

                pv1 {
                        id = "U51jx4-8okp-SoV3-lygT-W2PT-xww4-Bp0fO2"
                        device = "/dev/hdb6"    # Hint only

                        status = ["ALLOCATABLE"]
                        pe_start = 256
                        pe_count = 124  # 496 Megabytes
                }
        }

        logical_volumes {

                testvol {
                        id = "000000-0000-0000-0000-0000-0000-000000"
                        status = ["READ", "ALLOC_SIMPLE"]
                        read_ahead = 0
                        segment_count = 2

                        segment1 {
                                start_extent = 0
                                extent_count = 49       # 196 Megabytes
                                stripes = 1

                                areas = [
                                        "pv0", 0
                                ]
                        }
                        segment2 {
                                start_extent = 49
                                extent_count = 1        # 4 Megabytes
                                stripes = 1

                                areas = [
                                        "pv1", 0
                                ]
                        }
                }

                testvol_1 {
                        id = "000000-0000-0000-0000-0000-0000-000001"
                        status = ["READ", "WRITE", "ALLOC_SIMPLE"]
                        read_ahead = 0
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 50       # 200 Megabytes
                                stripes = 1

                                areas = [
                                        "pv1", 1
                                ]
                        }
                }
        }

}




More information about the linux-lvm mailing list