Changing LV name online
Yes. We can change the LV name online in AIX 6.1 TL4.
Usually we will unmount the LV to rename it. But AIX 6.1 TL4 helps us to change the name of the logical volume online.
Steps:
1) Check the oslevel that it is in 6.1 TL4 (Just to ensure).
# oslevel -s
6100-04-01-0944
2) Note down the original LV name
# df -m /home/nmon
/dev/nmonlv 256.00 254.73 1% 23 1% /home/nmon
# lsvg -l rootvg | grep nmon
nmonlv jfs2 1 1 1 open/syncd /home/nmon
3) Now, change the LV name without unmounting it.
# chlv -n nmon_lv nmonlv
Note that df output will not show us any change until we remount the file system. But we can see the new LV name in /etc/filesystems and “lsvg –l rootvg” outputs.
# df -m /home/nmon
/dev/nmonlv 256.00 254.73 1% 23 1% /home/nmon
# lsvg -l rootvg | grep nmon
nmon_lv jfs2 1 1 1 open/syncd /home/nmon
# grep -p nmon /etc/filesystems
/home/nmon:
dev = /dev/nmon_lv
vfs = jfs2
log = /dev/hd8
mount = true
options = rw
account = false
quota = no
4) After remounting the filesystem, the df command now displayed the new LV name.
# umount /home/nmon
# mount /home/nmon
# df /home/nmon
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/nmon_lv 524288 521696 1% 23 1% /home/nmon