Rename Root Logical Volume group?


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Rename Root Logical Volume group?
# 1  
Old 07-17-2013
Rename Root Logical Volume group?

Hello,

I'm running Ubuntu 12.04. I need to rename my root logical volume group and it's bootmanager/fstab accordingly.

Here is the output: I need to change the HP-TEST001 to PRODGROUP01. Please advice me.


Code:
root@PROD-02:/home# vgdisplay
--- Volume group ---
VG Name HP-TEST001
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 9.76 GiB
PE Size 4.00 MiB
Total PE 2498
Alloc PE / Size 2498 / 9.76 GiB
Free PE / Size 0 / 0
VG UUID vMIkzy-BCSa-bSHb-zt84-2xZ4-Xidm-zf46xB


root@PROD-02:/home# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/HP--TEST001-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=29b6596c-j4r2-47db-9890-c654c9ca4c46 /boot ext2 defaults 0 2
/dev/mapper/HP--TEST001-swap_1 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0


root@PROD-02:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/HP--TEST001-root 9.3G 1.5G 7.4G 17% /
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 791M 268K 791M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
/dev/sda1 228M 27M 189M 13% /boot


Last edited by Scott; 07-17-2013 at 07:37 PM.. Reason: Please use code tags
# 2  
Old 07-17-2013
Not to be too short, but

Code:
# man vgrename

edit fstab

/dev/PRODGROUP01/root / ext4 errors=remount-ro 0 1


Last edited by Scott; 07-17-2013 at 07:39 PM.. Reason: Code tags, please...
# 3  
Old 07-26-2013
I managed to fix it. Here are the steps:
1. Boot into Ubuntu – Rescue mode
2. Do not mount the root file system
3. lvm vgscan
4. Deactivate the volume group
  • a. vgchange –a n VOLUME-GROUP-NAME
    b. lvm lvscan
5. Rename the volume group
  • a. lvm vgrename OLD-NAME NEW-NAME
    b. lvm lvscan
    c. It will be activated automatically, if not type vgchange –a y NEW-VOLUME-GROUP-NAME
6. Exit and choose different file system
  • a. select ROOT file system
7. Backup /etc/fstab file
  • a. cp –p /etc/fstab /etc/fstab.old
8. Edit /etc/fstab and replace OLD-NAME
  • a. vi /etc/fstab
    b. :%s/OLD--NAME/NEW-NAME/g
9. If /boot is empty, then mount /dev/sda1
  • a. mount /dev/sda1 /boot
10. Install grub and update it.
  • a. grub-install /dev/sda
    b. update-grub
11. Exit and reboot the server.
12. Boot from hard disk.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies

2. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

3. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

4. AIX

Logical volume name conflict in two volume group

Hello, I am a french computer technician, and i speak English just a little. On Aix 5.3, I encounter a name conflict logical volume on two volume group. The first volume lvnode01 is OK in rootvg and mounted. It is also consistent in the ODM root # lsvg -l rootvg |grep lvnode01 ... (10 Replies)
Discussion started by: dantares
10 Replies

5. HP-UX

Unmount and remove all Logical vol.Volume group and physical disk

Hi, Someone please help me with how i can unmount and remove all the files systems from a cluster. This is being shared by two servers that are active_standby. (3 Replies)
Discussion started by: joeli
3 Replies

6. AIX

Basic Filesystem / Physical Volume / Logical Volume Check

Hi! Can anyone help me on how I can do a basic check on the Unix filesystems / physical volumes and logical volumes? What items should I check, like where do I look at in smit? Or are there commands that I should execute? I need to do this as I was informed by IBM that there seems to be... (1 Reply)
Discussion started by: chipahoys
1 Replies

7. HP-UX

Renaming logical volume group and volumes

Hi all, How do u rename a logical volume group and the logical volumes belonging to that? The logical volumes contain data and are in use. eg: Renaming dev/vgov to dev/ov-dg ? (6 Replies)
Discussion started by: Mr. Zer0
6 Replies

8. AIX

Moving a Logical Volume from one Volume Group to Another

Does anyone have any simple methods for moving a current logical volume from one volume group to another? I do not wish to move the data from one physical volume to another. Basically, I want to "relink" the logical volume to exist in a different volume group. Any ideas? (2 Replies)
Discussion started by: krisw
2 Replies

9. UNIX for Advanced & Expert Users

Problem syncing logical volume in root vg

Hello. I have a test server that I'm messing around with, and just recently received an error on startup that a logical volume in the root volume group couldn't be re-synchronized. Server boots fine, as the root vg is mirrored, but I'd like to get rid of the error. Here are the details: ... (1 Reply)
Discussion started by: matt.d
1 Replies

10. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies
Login or Register to Ask a Question