Difference between revisions of "HowTo Change The LVM Volume Group Name That Includes The Root Partition"
From NST Wiki
Jump to navigationJump to search (→Steps To Change The LVM Volume Group Name) |
(→Steps To Change The LVM Volume Group Name) |
||
Line 30: | Line 30: | ||
= Steps To Change The LVM Volume Group Name = | = Steps To Change The LVM Volume Group Name = | ||
− | '''Step 1:''' The '''[http://man.cx/vgrename(8) vgrename]''' utility will be used to change LVM Volume Name: | + | '''Step 1:''' The '''[http://man.cx/vgrename(8) vgrename]''' utility will be used to change LVM Volume Name from "'''nst_localhost'''" to "'''nst20'''": |
[root@localhost ~]# vgrename -v nst_localhost nst20 | [root@localhost ~]# vgrename -v nst_localhost nst20 | ||
Checking for existing volume group "nst_localhost" | Checking for existing volume group "nst_localhost" |
Revision as of 14:54, 1 January 2014
Contents
Overview
This page describes the steps needed to change an LVM (Logical Volume Manager) Volume Group name which includes the the Root partition ("/"). The problem is that the Root partition LVM Device Mapper is referenced in different configuration files and embedded in the Kernel initramfs.
We will demonstrate the LVM Volume Group name change from "nst_localhost" to "nst20".
State Before The LVM Volume Group Name Change
The Fedora System Storage Manager utility: ssm is used to display the current storage layout on the example system.
[root@localhost ~]# ssm list ------------------------------------------------------------------- Device Free Used Total Pool Mount point ------------------------------------------------------------------- /dev/sda 30.00 GB PARTITIONED /dev/sda1 500.00 MB /boot /dev/sda2 0.00 KB 29.51 GB 29.51 GB nst_localhost ------------------------------------------------------------------- --------------------------------------------------------- Pool Type Devices Free Used Total --------------------------------------------------------- nst_localhost lvm 1 0.00 KB 29.51 GB 29.51 GB --------------------------------------------------------- ---------------------------------------------------------------------------------------------------- Volume Pool Volume size FS FS size Free Type Mount point ---------------------------------------------------------------------------------------------------- /dev/nst_localhost/root nst_localhost 27.48 GB ext4 27.48 GB 19.18 GB linear / /dev/nst_localhost/swap nst_localhost 2.03 GB linear /dev/sda1 500.00 MB ext4 500.00 MB 364.40 MB part /boot ----------------------------------------------------------------------------------------------------
Steps To Change The LVM Volume Group Name
Step 1: The vgrename utility will be used to change LVM Volume Name from "nst_localhost" to "nst20":
[root@localhost ~]# vgrename -v nst_localhost nst20 Checking for existing volume group "nst_localhost" Checking for new volume group "nst20" Archiving volume group "nst_localhost" metadata (seqno 5). Writing out updated volume group Renaming "/dev/nst_localhost" to "/dev/nst20" Loading nst_localhost-root table (253:0) Suppressed nst_localhost-root (253:0) identical table reload. Suspending nst_localhost-root (253:0) with device flush Loading nst_localhost-root table (253:0) Suppressed nst_localhost-root (253:0) identical table reload. Renaming nst_localhost-root (253:0) to nst20-root Resuming nst20-root (253:0) Loading nst_localhost-swap table (253:1) Suppressed nst_localhost-swap (253:1) identical table reload. Suspending nst_localhost-swap (253:1) with device flush Loading nst_localhost-swap table (253:1) Suppressed nst_localhost-swap (253:1) identical table reload. Renaming nst_localhost-swap (253:1) to nst20-swap Resuming nst20-swap (253:1) Creating volume group backup "/etc/lvm/backup/nst20" (seqno 6). Volume group "nst_localhost" successfully renamed to "nst20" Wiping cache of LVM-capable devices Wiping internal VG cache