[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] snapshots can't be deactivated



Hello,

I got some more debug output from the lvchange command.
I noticed, that sometimes lvchange -an vg0/daily-snap-opt worked and after that I was able to really remove the snapshot.

But most of the times it doesn't work. It seems that system need several minutes do free the snapshot because when I wait some minutes an retry, I can deactivate and remove the snapshot to reuse the name.

root konrad:~# lvchange -vvv -an vg0/daily-snap-opt
        Processing: lvchange -vvv -an vg0/daily-snap-opt
        O_DIRECT will be used
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
    Using logical volume(s) on command line
      Locking /var/lock/lvm/V_vg0 WB
        /dev/ram0: Not using O_DIRECT
        Opened /dev/ram0 RW
        /dev/ram0: block size is 1024 bytes
      /dev/ram0: No label detected
        Closed /dev/ram0
        Opened /dev/vg0/root RW O_DIRECT
        /dev/vg0/root: block size is 512 bytes
      /dev/vg0/root: No label detected
        Closed /dev/vg0/root
        /dev/ram1: Not using O_DIRECT
        Opened /dev/ram1 RW
        /dev/ram1: block size is 1024 bytes
      /dev/ram1: No label detected
        Closed /dev/ram1
        Opened /dev/cciss/c0d0p1 RW O_DIRECT
        /dev/cciss/c0d0p1: block size is 1024 bytes
      /dev/cciss/c0d0p1: No label detected
        Closed /dev/cciss/c0d0p1
        Opened /dev/mapper/vg0-home-real RW O_DIRECT
        /dev/mapper/vg0-home-real: block size is 4096 bytes
      /dev/mapper/vg0-home-real: No label detected
        Closed /dev/mapper/vg0-home-real
        /dev/ram2: Not using O_DIRECT
        Opened /dev/ram2 RW
        /dev/ram2: block size is 1024 bytes
      /dev/ram2: No label detected
        Closed /dev/ram2
        Opened /dev/cciss/c0d0p2 RW O_DIRECT
        /dev/cciss/c0d0p2: block size is 4096 bytes
      /dev/cciss/c0d0p2: No label detected
        Closed /dev/cciss/c0d0p2
        Opened /dev/vg0/home RW O_DIRECT
        /dev/vg0/home: block size is 512 bytes
      /dev/vg0/home: No label detected
        Closed /dev/vg0/home
        /dev/ram3: Not using O_DIRECT
        Opened /dev/ram3 RW
        /dev/ram3: block size is 1024 bytes
      /dev/ram3: No label detected
        Closed /dev/ram3
        Opened /dev/cciss/c0d0p3 RW O_DIRECT
        /dev/cciss/c0d0p3: block size is 512 bytes
      /dev/cciss/c0d0p3: lvm2 label detected
        lvmcache: /dev/cciss/c0d0p3: now orphaned
        /dev/cciss/c0d0p3: Found metadata at 156160 size 2511 for vg0 (Lw0OiY-teNf-jRuy-Ck2s-mqv7-A4BL-8EIzBo)
        lvmcache: /dev/cciss/c0d0p3: now in VG vg0
        lvmcache: /dev/cciss/c0d0p3: setting vg0 VGID to Lw0OiYteNfjRuyCk2smqv7A4BL8EIzBo
        lvmcache: /dev/cciss/c0d0p3: VG vg0: Set creation host to konrad.
        Opened /dev/vg0/opt RW O_DIRECT
        /dev/vg0/opt: block size is 512 bytes
      /dev/vg0/opt: No label detected
        Closed /dev/vg0/opt
        /dev/ram4: Not using O_DIRECT
        Opened /dev/ram4 RW
        /dev/ram4: block size is 1024 bytes
      /dev/ram4: No label detected
        Closed /dev/ram4
        Opened /dev/vg0/video RW O_DIRECT
        /dev/vg0/video: block size is 512 bytes
      /dev/vg0/video: No label detected
        Closed /dev/vg0/video
        /dev/ram5: Not using O_DIRECT
        Opened /dev/ram5 RW
        /dev/ram5: block size is 1024 bytes
      /dev/ram5: No label detected
        Closed /dev/ram5
        Opened /dev/disk/by-label/opt RW O_DIRECT
        /dev/disk/by-label/opt: block size is 4096 bytes
      /dev/disk/by-label/opt: No label detected
        Closed /dev/disk/by-label/opt
        /dev/ram6: Not using O_DIRECT
        Opened /dev/ram6 RW
        /dev/ram6: block size is 1024 bytes
      /dev/ram6: No label detected
        Closed /dev/ram6
        Opened /dev/mapper/vg0-daily--snap--home-cow RW O_DIRECT
        /dev/mapper/vg0-daily--snap--home-cow: block size is 4096 bytes
      /dev/mapper/vg0-daily--snap--home-cow: No label detected
        Closed /dev/mapper/vg0-daily--snap--home-cow
        /dev/ram7: Not using O_DIRECT
        Opened /dev/ram7 RW
        /dev/ram7: block size is 1024 bytes
      /dev/ram7: No label detected
        Closed /dev/ram7
        Opened /dev/vg0/daily-snap-home RW O_DIRECT
        /dev/vg0/daily-snap-home: block size is 512 bytes
      /dev/vg0/daily-snap-home: No label detected
        Closed /dev/vg0/daily-snap-home
        /dev/ram8: Not using O_DIRECT
        Opened /dev/ram8 RW
        /dev/ram8: block size is 1024 bytes
      /dev/ram8: No label detected
        Closed /dev/ram8
        /dev/ram9: Not using O_DIRECT
        Opened /dev/ram9 RW
        /dev/ram9: block size is 1024 bytes
      /dev/ram9: No label detected
        Closed /dev/ram9
        Opened /dev/vg0/daily-snap-opt RW O_DIRECT
        /dev/vg0/daily-snap-opt: block size is 4096 bytes
      /dev/vg0/daily-snap-opt: No label detected
        Closed /dev/vg0/daily-snap-opt
        /dev/ram10: Not using O_DIRECT
        Opened /dev/ram10 RW
        /dev/ram10: block size is 1024 bytes
      /dev/ram10: No label detected
        Closed /dev/ram10
        /dev/ram11: Not using O_DIRECT
        Opened /dev/ram11 RW
        /dev/ram11: block size is 1024 bytes
      /dev/ram11: No label detected
        Closed /dev/ram11
        /dev/ram12: Not using O_DIRECT
        Opened /dev/ram12 RW
        /dev/ram12: block size is 1024 bytes
      /dev/ram12: No label detected
        Closed /dev/ram12
        /dev/ram13: Not using O_DIRECT
        Opened /dev/ram13 RW
        /dev/ram13: block size is 1024 bytes
      /dev/ram13: No label detected
        Closed /dev/ram13
        /dev/ram14: Not using O_DIRECT
        Opened /dev/ram14 RW
        /dev/ram14: block size is 1024 bytes
      /dev/ram14: No label detected
        Closed /dev/ram14
        /dev/ram15: Not using O_DIRECT
        Opened /dev/ram15 RW
        /dev/ram15: block size is 1024 bytes
      /dev/ram15: No label detected
        Closed /dev/ram15
      /dev/cciss/c0d0p3: lvm2 label detected
        /dev/cciss/c0d0p3: Found metadata at 156160 size 2511 for vg0 (Lw0OiY-teNf-jRuy-Ck2s-mqv7-A4BL-8EIzBo)
      /dev/cciss/c0d0p3: lvm2 label detected
        /dev/cciss/c0d0p3: Found metadata at 156160 size 2511 for vg0 (Lw0OiY-teNf-jRuy-Ck2s-mqv7-A4BL-8EIzBo)
        Read vg0 metadata (153) from /dev/cciss/c0d0p3 at 156160 size 2511
        /dev/cciss/c0d0p3 0:      0   2560: root(0:0)
        /dev/cciss/c0d0p3 1:   2560  25600: home(0:0)
        /dev/cciss/c0d0p3 2:  28160  25600: opt(0:0)
        /dev/cciss/c0d0p3 3:  53760 204800: video(0:0)
        /dev/cciss/c0d0p3 4: 258560  87040: NULL(0:0)
        /dev/cciss/c0d0p3 5: 345600   5120: daily-snap-home(0:0)
        /dev/cciss/c0d0p3 6: 350720   5120: daily-snap-opt(0:0)
        /dev/cciss/c0d0p3 7: 355840 119136: NULL(0:0)
  Can't change snapshot logical volume "daily-snap-opt"
      Unlocking /var/lock/lvm/V_vg0
        Closed /dev/cciss/c0d0p3

Unfortunatly these debug messages doesn't give me a clue why the snapshot can't be deactivated.


---

Falko Zurell
Head of Application Management
Mobil +49 (0)160 - 3 62 52 77

/i-d media AG
Ohlauer Straße 43
D-10999 Berlin

Tel +49 (0)30 - 2 59 47 - 357
Fax +49 (0)30 - 2 59 47 - 471
www.idmedia.com

_______________________________________________

Board: Regine Haschka-Helmer (CEO), Franz Klose (CFO)
Chairman of the Supervisory Board: Christian A. Hufnagl
Headquarters: Berlin, Place of Jurisdiction: Berlin HRB 76342
UST-Id. DE812698340
_______________________________________________


This message may contain confidential information and must not be copied, disclosed or used by anybody other than the intended recipient. If you have received this message in error, please notify us immediately by reply e-mail and delete all records of the message from your computer. The views represented in this message are solely those of the author. Neither the author nor I-D Media AG accepts any liability for the contents of this message.


Am 19.07.2007 um 23:50 schrieb David Timms:

Stuart D. Gathman wrote:
> On Wed, 18 Jul 2007, Joachim Banzhaf wrote:
>
>>> Are my steps right in principle? Did I forget to do something before or
>>> after removing?
>> I am by no means an expert on lvm, so dont take this too seriously: shouldn't
>> there be an lvchange -an yourlv before lvremove? Maybe this active status is
>> still hanging around somewhere although you can force the remove?
>
> When I try lvchange -an C4_SNAP, it always fails.  So I have had to force
> the lvremove in the backup script.  I am nervous about this, and already asked
> why this is the case.  When reading about the "active" flag, it seems
> to have something to do with shared SAN storage volume groups, so perhaps we
> are not supposed to deactivate LVs for simple single machine systems.  But the
> error from lvremove is disconcerting.  If I force it, what if there is
> a *different* error that I really *don't* want to force?
Perhaps the command produces an errorlevel that you could test against,
and only continue when you get the expected error ?

DaveT.

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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]