LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-20-2013, 07:46 AM   #1
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 135

Rep: Reputation: 17
Issues with LVM and renamed drives


Greetings,

Working on a virtual machine, Im adding a second disk to an existing system.
The first disk (sda) is formatted as following:

sda1 => boot
sda2 => swap
sda3 => /
sda4 => extended
sda5 => lvm

/usr, /tmp, /opt and so on are all LVs inside the LVM.

The thing is: when I add the new disk, it is added as sda and the older disk goes to sdb.

Solutions tried:
1) First I added labels to / and /boot and modified /etc/fstab: that solved the entire system booting issue;
2) Added labels to all LVs (usr, tmp, var and so on): When the system boots it is unable to locate the LVs
2.1) I believe the issue is caused because the LVMs PV is pointed as /dev/sda5: Is there any way I can somehow "label" /dev/sda5 and then change the LVM configuration somehow to point the PV to this label?
2.2) Tried pvchange --add-tag and that didnt work.

Thanks once again.
 
Old 02-20-2013, 09:37 AM   #2
sharadchhetri
Member
 
Registered: Aug 2008
Location: INDIA
Distribution: Redhat,Debian,Suse,Windows
Posts: 179

Rep: Reputation: 23
paste the output of following command -

mount
df -Th
cat /etc/fstab
lvscan
pvscan
vgscan
 
Old 02-20-2013, 10:56 AM   #3
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 135

Original Poster
Rep: Reputation: 17
(Sorry for not actually copying/pasting the output. Due to some logical restrictions Im unable to ssh into this server from where I am).

This is the output without the additional disk. When I add the new disk everything that is /dev/sda turns into /dev/sdb

mount (proc, sys, swap and so on have been omitted):
/dev/sda3 on / type ext4 (rw)
/dev/sda1 on /boot type ext3 (rw)
/dev/mapper/vg00-lvhome on /home type ext4 (rw)
/dev/mapper/vg00-lvopt on /opt type ext4 (rw)
/dev/mapper/vg00-lvtmp on /tmp type ext4 (rw)
/dev/mapper/vg00-lvusr on /usr type ext4 (rw)
/dev/mapper/vg00-lvvar on /var type ext4 (rw)

df -Th (shows exactly the same as mount adding the total, used and avail spaces)

cat /etc/fstab:
LABEL=/ / ext4 defaults 1 1
LABEL=boot /boot ext3 defaults 1 2
LABEL=home /home ext4 defaults 1 2
LABEL=opt /opt ext4 defaults 1 2
LABEL=tmp /tmp ext4 defaults 1 2
LABEL=usr /usr ext4 defaults 1 2
LABEL=var /var ext4 defaults 1 2

lvscan: Shows the above LVs as ACTIVATED

pvscan:
PV /dev/sda5 VG vg00 lvm2 [<TotalSize> / <FreeSize>]

vgscan:
Found volume group "vg00" using metadata type lvm2

Ill re-add the disk and will place the output again
 
Old 02-20-2013, 02:40 PM   #4
Thakowbbery
Member
 
Registered: Mar 2005
Posts: 135

Original Poster
Rep: Reputation: 17
Okay everyone, problem solved.

Apparently it was a VMware issue.
I switched and re-switched the disks between virtual controllers and now the disks are being recognized correctly.
 
  


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
LVM drives have gone missing. MikeyCarter Linux - Software 1 12-01-2009 08:42 AM
New drives and LVM almcneill Linux - Hardware 2 07-02-2009 09:13 PM
LVM drives not showing up starcastic Linux - Hardware 5 10-01-2008 10:33 AM
2 Drives in LVM- Not What I want Fixed_it Linux - Newbie 2 01-31-2007 11:22 AM
How do I replace two old drives (LVM in use) with a new one? vaaccess Linux - Newbie 3 01-09-2007 06:18 AM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration