From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from o.ww.redhat.com (unknown [10.40.205.124]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 369F66B644 for ; Wed, 26 Sep 2018 16:00:30 +0000 (UTC) References: From: Heinz Mauelshagen Message-ID: <1bc84954-15e9-7e98-20c5-865d0381d639@redhat.com> Date: Wed, 26 Sep 2018 18:00:28 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3D81839BE87904C9C36D5DAC" Content-Language: en-MW Subject: [linux-lvm] Fwd: Re: Correct way to remove LVM Snapshot Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: LVM general discussion and development This is a multi-part message in MIME format. --------------3D81839BE87904C9C36D5DAC Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 9/26/18 6:50 AM, Jaco van Niekerk wrote: > > Hi > > I will like to confirm the correct way to remove an LVM snapshot? > > Create my Logical Volume and snapshot: > lvcreate --addtag pacemaker --name lv_iscsi_lun1 --size 100G vg_iscsi > --config 'activation { volume_list = [ "@pacemaker" ]}' > lvcreate --addtag pacemaker --name lv_iscsi_lun1_snap --snapshot > --size 10G /dev/vg_iscsi/lv_iscsi_lun1 --config 'activation { > volume_list = [ \"@pacemaker\" ]}' > > Do I have to Merge the Snapshot first before I can remove it? > lvremove /dev/vg_iscsi/lv_iscsi_lun1_snap Depends on your use case: - if you need the data as of your snapshot and wnat to keep it in the origin, you have to merge - if you used the snapshot temorarily (e.g. for backup, fsck, ...), just lvremove it. > > More Info: > lv_iscsi_lun1 is a ISCSI target for a KVM virtual server. > > Trouble experienced: > I lost my hole Volume Group after removing the Logical Volume Snapshot. Can you provide any logs and "lvremove -vvvv ..." output (lvmdump preferred)? Heinz > Regards > > -- > > Jaco van Niekerk > > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO athttp://tldp.org/HOWTO/LVM-HOWTO/ --------------3D81839BE87904C9C36D5DAC Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit On 9/26/18 6:50 AM, Jaco van Niekerk wrote:

Hi

I will like to confirm the correct way to remove an LVM snapshot?

Create my Logical Volume and snapshot:
lvcreate --addtag pacemaker --name lv_iscsi_lun1 --size 100G vg_iscsi --config 'activation { volume_list = [ "@pacemaker" ]}'
lvcreate --addtag pacemaker --name lv_iscsi_lun1_snap --snapshot --size 10G /dev/vg_iscsi/lv_iscsi_lun1 --config 'activation { volume_list = [ \"@pacemaker\" ]}'

Do I have to Merge the Snapshot first before I can remove it?
lvremove /dev/vg_iscsi/lv_iscsi_lun1_snap


Depends on your use case:

- if you need the data as of your snapshot and wnat to keep it in the origin, you have to merge

- if you used the snapshot temorarily (e.g. for backup, fsck, ...), just lvremove it.


More Info:
lv_iscsi_lun1 is a ISCSI target for a KVM virtual server.

Trouble experienced:
I lost my hole Volume Group after removing the Logical Volume Snapshot.

Can you provide any logs and "lvremove -vvvv ..." output (lvmdump preferred)?

Heinz

Regards

--

Jaco van Niekerk



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