I have a server with two hard drives that I thought I had correctly installed with LVM, until I discovered that the second hard-drive did not actually seem to be used. I investigated the problem and followed some instructions found online, but the problem got worse. Apparently, my initial mistake was to remove the physical volume with pvremove when I should have used mvreduce.I am attaching below more information. I am using Ubuntu Server 14.04 LTS. I should also mention that I don't have any data on the second hard drive that I need to recover, this disk can be completely wiped.My logical volume apollo2-vg was supposed to be made of sda3 and sdb:root@apollo2:~# lsblkNAME                               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTsda                                  8:0    0 745.2G  0 disk sda1                               8:1    0   512M  0 part /boot/efisda2                               8:2    0   244M  0 part /bootsda3                               8:3    0 744.5G  0 part   apollo2--vg-root (dm-0)        252:0    0   1.2T  0 lvm  /  apollo2--vg-swap_1 (dm-1)      252:1    0 255.9G  0 lvm  [SWAP]sdb                                  8:16   0 745.2G  0 disk apollo2--vg-root (dm-0)          252:0    0   1.2T  0 lvm  /with the following overview of my partitions:root@apollo2:~# parted -lModel: ATA LITEON IT ECE-80 (scsi)Disk /dev/sda: 800GBSector size (logical/physical): 512B/512BPartition Table: gptNumber  Start   End    Size   File system  Name  Flags 1      1049kB  538MB  537MB  fat32              boot 2      538MB   794MB  256MB  ext2 3      794MB   800GB  799GB                     lvmModel: ATA LITEON IT ECE-80 (scsi)Disk /dev/sdb: 800GBSector size (logical/physical): 512B/512BPartition Table: gptNumber  Start  End  Size  File system  Name  FlagsModel: Linux device-mapper (linear) (dm)Disk /dev/mapper/apollo2--vg-root: 1325GBSector size (logical/physical): 512B/512BPartition Table: loopNumber  Start  End     Size    File system  Flags 1      0.00B  1325GB  1325GB  ext4Model: Linux device-mapper (linear) (dm)Disk /dev/mapper/apollo2--vg-swap_1: 275GBSector size (logical/physical): 512B/512BPartition Table: loopNumber  Start  End    Size   File system     Flags 1      0.00B  275GB  275GB  linux-swap(v1)The problem is that sdb (on the second hard drive) is now missing:root@apollo2:~# pvscanCouldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.PV /dev/sda3        VG apollo2-vg   lvm2 [744.47 GiB / 0    free]PV unknown device   VG apollo2-vg   lvm2 [745.21 GiB / 0    free]Total: 2 [1.45 TiB] / in use: 2 [1.45 TiB] / in no VG: 0 [0   ]This is confirmed by lvdisplay:root@apollo2:~# lvdisplayCouldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.--- Logical volume ---LV Path                /dev/apollo2-vg/rootLV Name                rootVG Name                apollo2-vgLV UUID                W7afVo-nWcn-qwDf-hLvB-uFkV-LbEL-iX7FLjLV Write Access        read/writeLV Creation host, time apollo2, 2015-03-14 17:20:12 +0100LV Status              available# open                 1LV Size                1.20 TiBCurrent LE             315847Segments               2Allocation             inheritRead ahead sectors     auto- currently set to     256Block device           252:0--- Logical volume ---LV Path                /dev/apollo2-vg/swap_1LV Name                swap_1VG Name                apollo2-vgLV UUID                aHegDA-NP47-dkUg-nY3L-HNp7-Y8xM-lflNFsLV Write Access        read/writeLV Creation host, time apollo2, 2015-03-14 17:20:12 +0100LV Status              available# open                 2LV Size                255.90 GiBCurrent LE             65511Segments               1Allocation             inheritRead ahead sectors     auto- currently set to     256Block device           252:1and pvdisplay:root@apollo2:~# pvdisplayCouldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.--- Physical volume ---PV Name               /dev/sda3VG Name               apollo2-vgPV Size               744.47 GiB / not usable 4.00 MiBAllocatable           yes (but full)PE Size               4.00 MiBTotal PE              190584Free PE               0Allocated PE          190584PV UUID               2p7KM5-dWVY-z1uw-auBy-QXHQ-6aVl-mezqAY--- Physical volume ---PV Name               unknown deviceVG Name               apollo2-vgPV Size               745.21 GiB / not usable 1.84 MiBAllocatable           yes (but full)PE Size               4.00 MiBTotal PE              190774Free PE               0Allocated PE          190774PV UUID               f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfeFollowing advice found on the internet, I tried many things, like re-creating the missing device:root@apollo2:~# pvcreate /dev/sdb --uuid=f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe --norestorefileDevice /dev/sdb not found (or ignored by filtering).Or removing it from the volume group:root@apollo2:~# vgreduce --removemissing --verbose apollo2-vgFinding volume group apollo2-vgCouldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.There are 1 physical volumes missing.Trying to open VG apollo2-vg for recovery...Couldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.There are 1 physical volumes missing.Archiving volume group apollo2-vg metadata (seqno 11).WARNING: Partial LV root needs to be repaired or removed. There are still partial LVs in VG apollo2-vg.To remove them unconditionally use: vgreduce --removemissing --force.Proceeding to remove empty missing PVs.Creating volume group backup /etc/lvm/backup/apollo2-vg (seqno 12).root@apollo2:~# vgreduce --removemissing --force --verbose apollo2-vgFinding volume group apollo2-vgCouldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.There are 1 physical volumes missing.Trying to open VG apollo2-vg for recovery...Couldn't find device with uuid f2hTAw-yDWd-8DH1-1fhy-Kfwk-mIui-6isUfe.There are 1 physical volumes missing.Archiving volume group apollo2-vg metadata (seqno 12).Removing partial LV root.Logical volume apollo2-vg/root contains a filesystem in use.Unfortunately, none of the solutions I tried worked. I don't have a lot of experience with LVM, and I am afraid the problem might get worse if I keep trying to solve it without really understanding what is going on.I read that some people with a similar problem could not reboot their machine correctly, which would be the worst case scenario.Hopefully there is a simple solution. Thank you in advance for your help!
LVM unknown device: how to recover?
partition;lvm;devices