Skip to contentSkip to conversation

remove old backup file after renaming vg

PATCH New Takahiro Yasui 2 participants 3 messages Mar 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove old backup file after renaming vg

Hi,

This patch removes an old backup file after renaming vg by the vgrename command.

Regards,
---
Takahiro Yasui
Hitachi Computer Products (America), Inc.

---
 tools/vgrename.c |    1 +
 1 file changed, 1 insertion(+)
tools/vgrename.c +1 -0
Index: LVM2.02.46-20090316/tools/vgrename.c
===================================================================
@@ -149,6 +149,7 @@ static int vg_rename_path(struct cmd_con
 /******* FIXME Rename any active LVs! *****/
 
 	backup(vg);
+	backup_remove(cmd, vg_name_old);
 
 	unlock_vg(cmd, vg_name_new);
 	unlock_vg(cmd, vg_name_old);
#1 lore raw

PATCH 1/1 remove old backup file after renaming vg

Quoted 2 lines · Takahiro Yasui

This patch removes an old backup file after renaming vg by the vgrename command.

Ack provided that an archive file with identical contents already got created.

Alasdair

Signature · 1 line
agk at redhat.com
#2 lore raw

PATCH 1/1 remove old backup file after renaming vg

Hi Alasdair,

Quoted 6 lines · Takahiro Yasui
Quoted 2 lines

This patch removes an old backup file after renaming vg by the vgrename command.

Ack provided that an archive file with identical contents already got created.

Thank you for reviewing this patch.

Yes, an archive file with identical contents is created before actual rename action by vg_rename function. The archive and backup sequence of vg_rename_path function is

- archive old_vg
- rename old_vg to new_vg
- backup new_vg
- backup_remove old_vg

Thanks,
Taka