maintinence
Renaming a Logical Volume (how to rename)
Today I was asked to rename a logical volume (something I hadn’t done before, but figured it was quite easy). Here’s what I ran:
lvm help
Which showed me the option of:
lvrename Rename a logical volume
Ah.. I thought to myself, this should be easy enough. So I did a quick poke at the man pages of lvmrename which netted me
lvrename [-A|--autobackup {y|n}] [-d|--debug] [-f|--force] [-h|--help] [-t|--test] [-v|--verbose] [--version]
VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName
note: ugggg sorry for the formatting.. thank you wordpress.
So off I went, and here’s what I did:
sudo umount /mountpoint
sudo lvrename /dev/volgroupname/lgvold /dev/volgroupname/lgvnew
sudo vi /etc/fstab
fixed the required fstab settings
sudo mount -a (or you can mount each one individually, but in my situation I was able to just run umouna -a).
That’s it. Simple as that.
If you do happen to rename while mounted you’ll not be able to unmount. In that case just change to the new location in fstab and bounce the box (yes, that’s the easiest way.. sinec the device will keep showing busy, even though lsof and everything reports it shouldn’t be).
That’s it.. hope someone finds this helpful.
Search
Powered by
Tags
10.3 11.0 11.1 apache bash beta bootchart codeweavers compiz drivers emerald emulation esx fat ass tomato man filesystems flash fonts gnome grub ibm kde kde4 kernel knoppix linux lotus notes lvm Microsoft nomad nvidia openoffice opensuse performance repositories review scripting security tech tutorial ubuntu user management VMWare windows wine workstationArchives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
Ben Kevan's Blog
- Connecting to Linux via RDP using NOMAD on openSUSE 11.1
- Red Hat (RHT) Profits Soar, is Novell (NOVL) Next?
- Dropping KDE 3.5 for openSUSE 11.2 isn’t really a bad thing
- 5 Days on openSUSE 11.1 was an early X-Mas present
- Unexpected Downtime
- Amarok 2.0 Final Released - Shipping with openSUSE 11.1
- PCLinuxOS 2009 Beta 2 - Review, Thoughts and Screenshots
- Opera 10.0 Alpha 1 on openSUSE 11.1 - Review
- Ding Dong the Emeralds Back Compiz
- 11.1 Build Service Repositories being Built