All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Question re: deleting an LV...
@ 2013-12-30 13:03 Tanstaafl
  2014-01-06 12:59 ` Tanstaafl
  0 siblings, 1 reply; 5+ messages in thread
From: Tanstaafl @ 2013-12-30 13:03 UTC (permalink / raw)
  To: LVM List

Hello,

Due to a misunderstanding about how LVM snapshots work when I set up 
this system, I now need to delete an LV I had created to use for this 
purpose (I thought I had to pre-create the LV).

Currently I have:

  # lvscan
   ACTIVE            '/dev/vg/tmp' [5.00 GiB] inherit
   ACTIVE            '/dev/vg/log' [5.00 GiB] inherit
   ACTIVE            '/dev/vg/vtmp' [5.00 GiB] inherit
   ACTIVE            '/dev/vg/var' [700.00 GiB] inherit
   ACTIVE            '/dev/vg/snaps' [4.00 GiB] inherit

I just need to delete the /dev/vg/snaps LV, so that that 4GB is 
available for my LVM snapshots.

Am I correct that all I have to do is:

# umount /dev/vg/snaps
# lvremove /dev/vg/snaps

Then remove this line from fstab?

This would then result in my VG having 4GB available for taking LVM 
snapshots?

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Question re: deleting an LV...
  2013-12-30 13:03 [linux-lvm] Question re: deleting an LV Tanstaafl
@ 2014-01-06 12:59 ` Tanstaafl
  2014-01-06 16:40   ` Guy Rouillier
  0 siblings, 1 reply; 5+ messages in thread
From: Tanstaafl @ 2014-01-06 12:59 UTC (permalink / raw)
  To: LVM List

On 2013-12-30 8:03 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
> Hello,
>
> Due to a misunderstanding about how LVM snapshots work when I set up
> this system, I now need to delete an LV I had created to use for this
> purpose (I thought I had to pre-create the LV).
>
> Currently I have:
>
>   # lvscan
>    ACTIVE            '/dev/vg/tmp' [5.00 GiB] inherit
>    ACTIVE            '/dev/vg/log' [5.00 GiB] inherit
>    ACTIVE            '/dev/vg/vtmp' [5.00 GiB] inherit
>    ACTIVE            '/dev/vg/var' [700.00 GiB] inherit
>    ACTIVE            '/dev/vg/snaps' [4.00 GiB] inherit
>
> I just need to delete the /dev/vg/snaps LV, so that that 4GB is
> available for my LVM snapshots.
>
> Am I correct that all I have to do is:
>
> # umount /dev/vg/snaps
> # lvremove /dev/vg/snaps
>
> Then remove this line from fstab?
>
> This would then result in my VG having 4GB available for taking LVM
> snapshots?

Would appreciate a confirmation that I don't have to do anything else to 
totally eliminate the snaps LV...

I unmounted it, and commented that line in fstab. lvscan still shows the 
same as above, but lvs shows the snaps with a slightly different attribute:

  # lvs
   LV    VG   Attr       LSize
   log   vg   -wi-ao----   5.00g
   snaps vg   -wi-a-----   4.00g
   tmp   vg   -wi-ao----   5.00g
   var   vg   -wi-ao---- 700.00g
   vtmp  vg   -wi-ao----   5.00g

So again - is lvremove /dev/vg/snaps the correct way - and the only 
thing I need to do - to remove that LV as if it had never been created?

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Question re: deleting an LV...
  2014-01-06 12:59 ` Tanstaafl
@ 2014-01-06 16:40   ` Guy Rouillier
  2014-01-06 21:10     ` Tanstaafl
  2014-01-06 22:49     ` Mauricio Tavares
  0 siblings, 2 replies; 5+ messages in thread
From: Guy Rouillier @ 2014-01-06 16:40 UTC (permalink / raw)
  To: linux-lvm

On 1/6/2014 7:59 AM, Tanstaafl wrote:
> On 2013-12-30 8:03 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
>> Hello,
>>
>> Due to a misunderstanding about how LVM snapshots work when I set up
>> this system, I now need to delete an LV I had created to use for this
>> purpose (I thought I had to pre-create the LV).
>>
>> Currently I have:
>>
>>   # lvscan
>>    ACTIVE            '/dev/vg/tmp' [5.00 GiB] inherit
>>    ACTIVE            '/dev/vg/log' [5.00 GiB] inherit
>>    ACTIVE            '/dev/vg/vtmp' [5.00 GiB] inherit
>>    ACTIVE            '/dev/vg/var' [700.00 GiB] inherit
>>    ACTIVE            '/dev/vg/snaps' [4.00 GiB] inherit
>>
>> I just need to delete the /dev/vg/snaps LV, so that that 4GB is
>> available for my LVM snapshots.
>>
>> Am I correct that all I have to do is:
>>
>> # umount /dev/vg/snaps
>> # lvremove /dev/vg/snaps
>>
>> Then remove this line from fstab?
>>
>> This would then result in my VG having 4GB available for taking LVM
>> snapshots?
>
> Would appreciate a confirmation that I don't have to do anything else to
> totally eliminate the snaps LV...
>
> I unmounted it, and commented that line in fstab. lvscan still shows the
> same as above, but lvs shows the snaps with a slightly different attribute:
>
>   # lvs
>    LV    VG   Attr       LSize
>    log   vg   -wi-ao----   5.00g
>    snaps vg   -wi-a-----   4.00g
>    tmp   vg   -wi-ao----   5.00g
>    var   vg   -wi-ao---- 700.00g
>    vtmp  vg   -wi-ao----   5.00g
>
> So again - is lvremove /dev/vg/snaps the correct way - and the only
> thing I need to do - to remove that LV as if it had never been created?

Yes. This page has a definition of the attributes: 
http://man7.org/linux/man-pages/man8/lvs.8.html.  "o" in position 6 
means device open; since you've unmounted it, it is no longer open.

I learned via this mailing list that lvremove just updates metadata to 
make the space available again, but doesn't remove the filesystem in the 
LV.  So if you were to recreate the exact same LV you just removed, the 
filesystem would still be there.  My situation was unusual, and you 
probably won't encounter this.  But if you want to avoid that minor 
possibility, use "wipefs -a /dev/vg/snaps" before lvremove.

-- 
Guy Rouillier

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Question re: deleting an LV...
  2014-01-06 16:40   ` Guy Rouillier
@ 2014-01-06 21:10     ` Tanstaafl
  2014-01-06 22:49     ` Mauricio Tavares
  1 sibling, 0 replies; 5+ messages in thread
From: Tanstaafl @ 2014-01-06 21:10 UTC (permalink / raw)
  To: linux-lvm

On 2014-01-06 11:40 AM, Guy Rouillier <guy.rouillier@gmail.com> wrote:
> I learned via this mailing list that lvremove just updates metadata to
> make the space available again, but doesn't remove the filesystem in the
> LV.  So if you were to recreate the exact same LV you just removed, the
> filesystem would still be there.  My situation was unusual, and you
> probably won't encounter this.  But if you want to avoid that minor
> possibility, use "wipefs -a /dev/vg/snaps" before lvremove.

Thanks for the reply Guy...

I don't think this is necessary, as this space

  a) never had anything written to it, and

  b) will be used for LVM snapshots, so even if it had, it would get
     overwritten very soon.

Anyway, thanks... looking forward to getting my email rsnapshot backups 
working using LVM snapshots (for consistency - no more 'file vanished' 
messages during backups)...

Thx again

Charles

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Question re: deleting an LV...
  2014-01-06 16:40   ` Guy Rouillier
  2014-01-06 21:10     ` Tanstaafl
@ 2014-01-06 22:49     ` Mauricio Tavares
  1 sibling, 0 replies; 5+ messages in thread
From: Mauricio Tavares @ 2014-01-06 22:49 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Jan 6, 2014 at 5:40 PM, Guy Rouillier <guy.rouillier@gmail.com> wrote:
> On 1/6/2014 7:59 AM, Tanstaafl wrote:
>>
>> On 2013-12-30 8:03 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
>>>
>>> Hello,
>>>
>>> Due to a misunderstanding about how LVM snapshots work when I set up
>>> this system, I now need to delete an LV I had created to use for this
>>> purpose (I thought I had to pre-create the LV).
>>>
>>> Currently I have:
>>>
>>>   # lvscan
>>>    ACTIVE            '/dev/vg/tmp' [5.00 GiB] inherit
>>>    ACTIVE            '/dev/vg/log' [5.00 GiB] inherit
>>>    ACTIVE            '/dev/vg/vtmp' [5.00 GiB] inherit
>>>    ACTIVE            '/dev/vg/var' [700.00 GiB] inherit
>>>    ACTIVE            '/dev/vg/snaps' [4.00 GiB] inherit
>>>
>>> I just need to delete the /dev/vg/snaps LV, so that that 4GB is
>>> available for my LVM snapshots.
>>>
>>> Am I correct that all I have to do is:
>>>
>>> # umount /dev/vg/snaps
>>> # lvremove /dev/vg/snaps
>>>
>>> Then remove this line from fstab?
>>>
>>> This would then result in my VG having 4GB available for taking LVM
>>> snapshots?
>>
>>
>> Would appreciate a confirmation that I don't have to do anything else to
>> totally eliminate the snaps LV...
>>
>> I unmounted it, and commented that line in fstab. lvscan still shows the
>> same as above, but lvs shows the snaps with a slightly different
>> attribute:
>>
>>   # lvs
>>    LV    VG   Attr       LSize
>>    log   vg   -wi-ao----   5.00g
>>    snaps vg   -wi-a-----   4.00g
>>    tmp   vg   -wi-ao----   5.00g
>>    var   vg   -wi-ao---- 700.00g
>>    vtmp  vg   -wi-ao----   5.00g
>>
>> So again - is lvremove /dev/vg/snaps the correct way - and the only
>> thing I need to do - to remove that LV as if it had never been created?
>
>
> Yes. This page has a definition of the attributes:
> http://man7.org/linux/man-pages/man8/lvs.8.html.  "o" in position 6 means
> device open; since you've unmounted it, it is no longer open.
>
> I learned via this mailing list that lvremove just updates metadata to make
> the space available again, but doesn't remove the filesystem in the LV.  So
> if you were to recreate the exact same LV you just removed, the filesystem
> would still be there.  My situation was unusual, and you probably won't
> encounter this.  But if you want to avoid that minor possibility, use
> "wipefs -a /dev/vg/snaps" before lvremove.
>
      Going a bit on a tangent, thanks for the info. I need to add
that to my notes because sometimes when I want a lv to go away, I
really really want it to go

> --
> Guy Rouillier
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
>
> _______________________________________________
> 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

end of thread, other threads:[~2014-01-06 22:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-30 13:03 [linux-lvm] Question re: deleting an LV Tanstaafl
2014-01-06 12:59 ` Tanstaafl
2014-01-06 16:40   ` Guy Rouillier
2014-01-06 21:10     ` Tanstaafl
2014-01-06 22:49     ` Mauricio Tavares

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.