Renaming an LVM logical volume changes the name LVM reports for the block device and the device path operators usually type. Do it during a maintenance window when a mount, service, script, or backup job still points at the old LV name, because those references will not follow the rename automatically.
The lvrename command can rename an LV by volume group and logical volume names, or by the old and new device paths. The example renames data to projects inside vgdata while leaving the volume group, filesystem contents, and logical volume size unchanged.
Unmount mounted filesystems or stop raw consumers before renaming the LV. Root, boot, clustered, or application-owned logical volumes need extra coordination such as bootloader, initramfs, cluster resource, or service configuration changes; an ordinary data LV that can be taken offline briefly is the safer target.
$ sudo lvs --options lv_name,vg_name,lv_path vgdata/data LV VG Path data vgdata /dev/vgdata/data
Replace vgdata/data with the volume group and logical volume that should be renamed.
$ findmnt --source /dev/vgdata/data --output SOURCE,TARGET,FSTYPE SOURCE TARGET FSTYPE /dev/vgdata/data /srv/data ext4
No output means findmnt did not see that path as a mounted filesystem. Databases, virtual machines, swap, or cluster resources can still use a raw LV without a filesystem mount.
$ sudo umount /srv/data
Stop the application or unmount the filesystem before changing the LV name. Renaming storage that is still in use can leave running processes, scripts, or mount tables referring to the old path.
$ sudo lvrename vgdata data projects Renamed "data" to "projects" in volume group "vgdata"
The equivalent path form is sudo lvrename /dev/vgdata/data /dev/vgdata/projects.
$ sudo lvs --options lv_name,vg_name,lv_path vgdata/projects LV VG Path projects vgdata /dev/vgdata/projects
$ sudoedit /etc/fstab
Change path-based entries such as /dev/vgdata/data to /dev/vgdata/projects. Entries that mount by filesystem UUID may not need a path change, but service configs, backup jobs, and scripts can still contain the old LV name.
$ sudo mount /dev/vgdata/projects /srv/data
If /etc/fstab contains the mount point and has already been updated, sudo mount /srv/data is enough.
$ findmnt --source /dev/vgdata/projects --output SOURCE,TARGET,FSTYPE SOURCE TARGET FSTYPE /dev/vgdata/projects /srv/data ext4