Could you post the result of
pvscan
vgscan
lvscan
And also remove /backup entry in /etc/fstab, as brittonv mentioned.
Main Topics
Browse All TopicsHi everyone,
My server is using Centos 4.5. I use 2 hard drive,one for main files and one for backup purpose. I mounted second hard drive as /backup. Now it is failed to i need to remove it. But seem when I remove the second hard drive, system fail to boot, below is error message
ERROR: /bin/lvm exited abnormally!(pid 562)
Activating logical volumes
Couldn't find device with uuid 'YSOJQS.......
Couldn't find all physical volumes for volume group VolGroup00
Volume group "VolGroup00" not found
ERROR: /bin/lvm exited abnormally!(pid 563)
Creating root device
Mounting root filesystem
moung: error 6 mouting ext3
mount: error 2 mouting none
Switching to new root
switchroot: mount failed: 22
Umount /initrd/dev failed: 22
Kernel panic - not syncing: Attempted to kill init!
Seem that some system files are on the second drive.
Here is the result of fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 83 Linux
/dev/sda3 1319 2232 7341705 83 Linux
/dev/sda4 2233 30401 226267492+ 5 Extended
/dev/sda5 2233 2493 2096451 83 Linux
/dev/sda6 2494 30401 224170978+ 8e Linux LVM
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30099 241770186 83 Linux
/dev/sdb2 30100 30401 2425815 8e Linux LVM
Here is the result of pvdisplay /dev/sdb2
--- Physical volume ---
PV Name /dev/sdb2
VG Name VolGroup00
PV Size 2.31 GB / not usable 983.00 KB
Allocatable yes
PE Size (KByte) 32768
Total PE 74
Free PE 3
Allocated PE 71
PV UUID YJ0JQs-fwpf-FGbn-v2xF-01Xj
When i run vgreduce VolGroup00 /dev/sdb2,i got
Physical volume "/dev/sdb2" still in use
I run vgchange -a n VolGroup00
then got
Can't deactivate volume group "VolGroup00" with 2 open logical volume(s)
[root@vietnam1 /]# pvremove /dev/sdb2
Can't pvremove physical volume "/dev/sdb2" of volume group "VolGroup00" withou t -ff
Please help me on this issue.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
pvscan result
PV /dev/sdb2 VG VolGroup00 lvm2 [2.31 GB / 96.00 MB free]
PV /dev/sda6 VG VolGroup00 lvm2 [213.78 GB / 0 free]
Total: 2 [216.09 GB] / in use: 2 [216.09 GB] / in no VG: 0 [0 ]
vgscan result
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
lvscan result
ACTIVE '/dev/VolGroup00/LogVol00'
ACTIVE '/dev/VolGroup00/LogVol01'
I remove /backup entry in /etc/fstab and reboot the server sucessfully, sdb2 is a part of second hard drive so i can not the remove the hard drive.
it does not work either
[root@vietnam1 /]# pvremove -ff /dev/sdb2
Really WIPE LABELS from physical volume "/dev/sdb2" of volume group "VolGroup00" [y/n]? y
WARNING: Wiping physical volume label from /dev/sdb2 of volume group "VolGroup00"
Can't open /dev/sdb2 exclusively - not removing. Mounted filesystem?
Here is result for mount
/dev/mapper/VolGroup00-Log
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw,noexec,nosuid)
/dev/sda5 on /tmp type ext3 (rw,noexec,nosuid)
/dev/sda2 on /usr type ext3 (rw,usrquota)
/dev/sda3 on /var type ext3 (rw,usrquota)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
I am not sure which one is mounted on sdb2 so can not umount them.
here is the result of first 2 command
[root@vietnam1 /]# umount /dev/VolGroup00/LogVol01
umount: /dev/VolGroup00/LogVol01: not mounted
[root@vietnam1 /]# lvremove /dev/VolGroup00/LogVol01
Can't remove open logical volume "LogVol01"
[root@vietnam1 /]# vgreduce /dev/VolGroup00 /dev/sdb2
Physical volume "/dev/sdb2" still in use
Below is mount result
[root@vietnam1 /]# mount
/dev/mapper/VolGroup00-Log
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw,noexec,nosuid)
/dev/sda5 on /tmp type ext3 (rw,noexec,nosuid)
/dev/sda2 on /usr type ext3 (rw,usrquota)
/dev/sda3 on /var type ext3 (rw,usrquota)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
Please help,thanks
Here is etc/fstab content
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults,usrquota 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults,nosuid,noexec,rw 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/usr /usr ext3 defaults,usrquota 1 2
LABEL=/var /var ext3 defaults,usrquota 1 2
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/tmp /var/tmp ext3 defaults,bind,noauto 0 0
I think /dev/VolGroup00/LogVol01 swap swap defaults 0 0 is the reason why i can not remove second hard drive,it is used as swap?
after run swapoff i can run the command
lvremove /dev/VolGroup00/LogVol01
but still got error
vgreduce /dev/VolGroup00 /dev/sdb2
Physical volume "/dev/sdb2" still in use
fdisk -l result
[root@vietnam1 /]# fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1318 10482412+ 83 Linux
/dev/sda3 1319 2232 7341705 83 Linux
/dev/sda4 2233 30401 226267492+ 5 Extended
/dev/sda5 2233 2493 2096451 83 Linux
/dev/sda6 2494 30401 224170978+ 8e Linux LVM
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30099 241770186 83 Linux
/dev/sdb2 30100 30401 2425815 8e Linux LVM
Can i now remove 2nd drive safely?
Post pvscan/lvscan results again, please. I think that LogVol00 uses a bit of space on /dev/sdb ...
pvscan result
PV /dev/sdb2 VG VolGroup00 lvm2 [2.31 GB / 96.00 MB free]
PV /dev/sda6 VG VolGroup00 lvm2 [213.78 GB / 0 free]
Total: 2 [216.09 GB] / in use: 2 [216.09 GB] / in no VG: 0 [0 ]
lvscan result
ACTIVE '/dev/VolGroup00/LogVol00'
ACTIVE '/dev/VolGroup00/LogVol01'
pvscan result
[root@vietnam1 /]# pvscan
PV /dev/sdb2 VG VolGroup00 lvm2 [2.31 GB / 2.03 GB free]
PV /dev/sda6 VG VolGroup00 lvm2 [213.78 GB / 0 free]
Total: 2 [216.09 GB] / in use: 2 [216.09 GB] / in no VG: 0 [0 ]
lvscan result
[root@vietnam1 /]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00'
Seem lvscan result is different but pvscan is still the same,what should i do now?
Business Accounts
Answer for Membership
by: brittonvPosted on 2007-09-28 at 14:10:52ID: 19981804
Will it boot with the disk installed?
If so boot and edit your /etc/fstab file to remove the fault HD.