LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2011, 11:03 AM   #1
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Rep: Reputation: Disabled
move VolGroup-lv-home to VolGroup-lv-root


Hello,

I am looking to move a /dev/mapper/VolGroup-lv-home to /dev/mapper/volgroup-lv-root. Can i delete the volumeGroup-lv-home and add it to the VolGroup-lv-root? I am running centos 6 64 bit. Not sure if i can do this with the fdisk command. Here is my output df-h.

[root@localhost]# df -h
Filesystem size used avail use% mounted on
/dev/mapper/VolGroup-lv_root
50g 1.1g 46g 3% /
tmpfs 5.9g 0 5.9g 0% /dev/shm
/dev/sda1 485m 58m 403m 13% /boot
/dev/mapper/VolGroup-lv-home
83g 184m 79g 1% /home

any help would be appreciated.

thanks

Last edited by dmb2002man; 08-03-2011 at 01:36 PM.
 
Old 08-03-2011, 07:26 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,254

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
I think you'd mv the content, then dismantle the /home LV/VG, then optionally add the disks (pv) to the root LV/VG.
http://tldp.org/HOWTO/LVM-HOWTO/
http://www.linuxtopia.org/online_boo...l_6_lvm_admin/
 
1 members found this post helpful.
Old 08-05-2011, 02:32 PM   #3
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
I think you'd mv the content, then dismantle the /home LV/VG, then optionally add the disks (pv) to the root LV/VG.
http://tldp.org/HOWTO/LVM-HOWTO/
http://www.linuxtopia.org/online_boo...l_6_lvm_admin/
hey thanks,

Was out sick yesterday from work and really busy today on other projects but will look into both these links. If i have any issues or questions i will definitely post back here for info.
 
Old 08-09-2011, 11:18 AM   #4
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Ok so i am completely lost now. I tried running the vgmerge command

vgmerge VolGroup-lv_root VolGroup-lv_home but was giving me this error:
Volume Group "VolGroup-lv-home" not found.



I removed the /dev/mapper/VolGroup-lv_home by running this command.

umount /dev/VolGroup/lv_home
lvremove /dev/VolGroup/lv_home

Then did a pvscan and it shows this.

PV /dev/sda2 VG VolGroup lvm2 148.01 gb 84.26 free (So where did the 148-84=64 go). I need to get that added back with VolGroup-lv_root now.

When i run mount i see this.

/dev/mapper/VolGroup-lv_root on / type ext4 (rw) - i was seeing the VolGroup-lv_home as well until i unmounted it and removed it. Also when i ran the command lvdisplay i would see /dev/VolGroup/lv_root, /dev/VolGroup/lv_home, /dev/VolGroup/lv_swap (now i just see the lv_root and lv_swap)

Last edited by dmb2002man; 08-09-2011 at 11:23 AM.
 
Old 08-12-2011, 09:54 AM   #5
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Can someone please help me with this. Still having issues.
 
Old 08-15-2011, 02:18 PM   #6
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
since i deleted VolGroup-lv-home, it corrupted the system so it wouldnt boot. Now reinstalled linux and see the root and home volgroups. Now i just need to know how to merge them in 1 volgroup. Here is what i show on reinstall.

root@localhost#lvs

lv_home VolGroup -wi-ao 84.26 g
lv_root VolGroup -wi-ao 50.00 g
lv_swap VolGroup -wi-ao 13.75 g

So how can i take the home content and move it to lv_root. Then merge the lv_home to lv_group? thanks

Last edited by dmb2002man; 08-15-2011 at 02:38 PM.
 
Old 08-17-2011, 11:15 AM   #7
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
when i try vgmerge i get this error and not sure why.

root@localhost#df -h

/dev/mapper/VolGroup-lv_root

/dev/mapper/VolGroup-lv_home

so when i run this: vgmerge VolGroup-lv_home VolGroup-lv_root

Volume group "VolGruop-lv_home" not found
 
Old 08-17-2011, 07:25 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,254

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
So, is that typo something you did here, or did you type it in wrong on your system?
Try copy and pasting what you see, do not re-write by hand.
 
Old 08-18-2011, 02:08 PM   #9
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
So, is that typo something you did here, or did you type it in wrong on your system?
Try copy and pasting what you see, do not re-write by hand.
not sure why i would really have to do that. Why doesn't the merge command work?
 
Old 08-18-2011, 02:48 PM   #10
travisdh1
Member
 
Registered: Sep 2008
Distribution: Fedora
Posts: 129

Rep: Reputation: 21
Quote:
Originally Posted by dmb2002man View Post
not sure why i would really have to do that. Why doesn't the merge command work?
Because it didn't work. I know it's more work for you but I think chrism01 is going down the right track.

Quote:
Originally Posted by chrism01 View Post
I think you'd mv the content, then dismantle the /home LV/VG, then optionally add the disks (pv) to the root LV/VG.
http://tldp.org/HOWTO/LVM-HOWTO/
http://www.linuxtopia.org/online_boo...l_6_lvm_admin/
This way you know it will work. If you don't have enough disk space try moving the data to an external drive and then redoing the logical volumes (this may be why the merge is failing.)
 
Old 08-18-2011, 02:56 PM   #11
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
everything i posted was all setup default when i installed centos 6.0 on it. I wonder if i did something wrong when installing it to create all these VolGroup and not just keep 1.
 
Old 08-19-2011, 09:22 AM   #12
dmb2002man
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
i tried running the cp -pr /dev/mapper/VolGroup-lv_home /dev/mapper/VolGroup-lv_root but it doesn't really do nothing. See i cant view the contents in VolGroup-lv_root or VolGroup-lv_home as it says there not valid directory. Really don't know how to get this finished. I have setup lots of linux machines but not this dept. Need to figure out the volgroups and not sure what im doing wrong. I followed the links above.

Last edited by dmb2002man; 08-22-2011 at 10:56 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not find /dev/mapper/* gamewolf Debian 2 06-25-2011 01:02 PM
vgcreate command is changing /dev/mapper as PV Name in pvdisplay to /dev/dm-xx path neeravsingh Linux - Enterprise 6 03-23-2010 04:05 AM
Where is /dev/mapper? Swift&Smart Fedora 1 12-08-2007 03:09 AM
mouting LVM. /dev/VolGroup and knoppix Tux Fedora 1 09-04-2006 11:43 PM
/dev/mapper directory joshnya Linux - Newbie 11 09-15-2005 04:09 AM


All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration