LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lvrename

renames a logical volume within its volume group

TLDR

Rename using full paths
$ sudo lvrename /dev/vg_name/old_lv /dev/vg_name/new_lv
copy
Rename using VG and names
$ sudo lvrename [vg_name] [old_lv] [new_lv]
copy
Rename with auto-confirm
$ sudo lvrename --yes /dev/vg_name/old_lv /dev/vg_name/new_lv
copy

SYNOPSIS

lvrename [options] vg/oldlv newlv

DESCRIPTION

lvrename renames a logical volume within its volume group. The volume can be active during the rename operation.

PARAMETERS

-y, --yes

Answer yes to all prompts
-A, --autobackup y|n
Auto backup metadata
--noudevsync
Disable udev synchronisation
-t, --test
Test mode (don't apply changes)
-v, --verbose
Verbose output

CAVEATS

Update /etc/fstab and any scripts referencing the old LV name. Active filesystems may need remounting after rename.

SEE ALSO

lvcreate(8), lvremove(8), lvm(8)

Copied to clipboard
Kai