How to rename volume group


Learn how to rename volume group in Linux or Unix. Understand what happens in background when you change volume group name of existing VG.


Volume group can be renamed with easy vgrename command Linux. But first we will see how it can be done without vgrename command so that step by step you will understand what actually happens in background while VG name changes.

We have seen how to create VG in past and how to export/import VG. We are going to use these commands to rename VG. Below steps needs to be followed –

  1. Stop all user/app access to all mount points within VG using fuser
  2. Un-mount all LV using umount
  3. De activate VG using vgchange
  4. Export VG using vgexport
  5. Create new name folder and group file using mknod
  6. Import VG with new name in command options using vgimport
  7. Activate VG using vgchange
  8. Mount all LV using mount
  9. Edit related entries in /etc/fstab with new name

See below output for above mentioned steps (HPUX console).

In above step by step process you can see how VG changes its name. We are changing its VG related file and directory and then we import it using old configuration but new name.

In Linux we have one command which does all this stuff in background for you. vgrename is command which used to rename VG in Linux. You have to supply old VG name and required new name.

Keep in mind, this command also requires de-activated VG to work. So this is not online process. It supports below options :

  • -f : Forcefully rename
  • -v : Verbose mode


Any thoughts?