Issues with LVM and renamed drives
Working on a virtual machine, I´m 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.
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 LVM´s 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 didn´t work.
Thanks once again.
paste the output of following command -
(Sorry for not actually copying/pasting the output. Due to some logical restrictions I´m 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)
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
PV /dev/sda5 VG vg00 lvm2 [<TotalSize> / <FreeSize>]
Found volume group "vg00" using metadata type lvm2
I´ll re-add the disk and will place the output again
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.
|All times are GMT -5. The time now is 06:56 PM.|