LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-02-2015, 12:38 AM   #1
TeenieBopper
LQ Newbie
 
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
Duplicate VG names and missing devices


This has to deal with ubuntu server, but I'm a Linux newbie. Basically talk to me like I'm an 8 year old.

I have a home linux server running Ubuntu server 14.04.2. A few months ago I ran into some trouble with it and long story short only one of the original drives remains and there are two new ones. I'm having a hard time accessing and mounting the logical volumes on the original drive. I'm having issues with the fact that have have volume groups with the same name, as well as missing devices.

Code:
mike@server:~$ lsblk
NAME                             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                                8:0    0   1.8T  0 disk
└─sda3                             8:3    0   1.8T  0 part
sdb                                8:16   0 111.8G  0 disk
├─sdb1                             8:17   0   243M  0 part /boot
├─sdb2                             8:18   0     1K  0 part
└─sdb5                             8:21   0 111.6G  0 part
  ├─server--vg-root (dm-2)       252:2    0  43.4G  0 lvm  /
  └─server--vg-swap_1 (dm-3)     252:3    0   3.2G  0 lvm  [SWAP]
sdc                                8:32   0   1.8T  0 disk
├─server--vg-PrivateMedia (dm-0) 252:0    0  1000G  0 lvm
└─server--vg-PublicMedia (dm-1)  252:1    0   750G  0 lvm
The current boot drive is a 120gb ssd, sdb. sda is a blank 2TB drive that I plan on allocating as necessary to logical volumes. sdc is the has the logical volumes I would like to access.

Code:
mike@server:~$ sudo pvdisplay
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  Couldn't find device with uuid QJxFW4-777H-shDs-C2QH-1gWo-Pb0d-56BLPs.
  Couldn't find device with uuid LxIoum-Zjvg-WZ4i-vO8c-ib4O-ldwI-G82TsZ.
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  --- Physical volume ---
  PV Name               unknown device
  VG Name               server-vg
  PV Size               465.02 GiB / not usable 2.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              119045
  Free PE               119045
  Allocated PE          0
  PV UUID               QJxFW4-777H-shDs-C2QH-1gWo-Pb0d-56BLPs

  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               server-vg
  PV Size               1.82 TiB / not usable 1.09 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               28932
  Allocated PE          448000
  PV UUID               t1291H-bZqa-8ksX-qYDg-Jix6-CmC3-tVR0qX

  --- Physical volume ---
  PV Name               unknown device
  VG Name               server-vg
  PV Size               465.02 GiB / not usable 2.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              119045
  Free PE               119045
  Allocated PE          0
  PV UUID               QJxFW4-777H-shDs-C2QH-1gWo-Pb0d-56BLPs

  --- Physical volume ---
  PV Name               /dev/sdb5
  VG Name               server-vg
  PV Size               111.55 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              28556
  Free PE               16636
  Allocated PE          11920
  PV UUID               ad5UcZ-E7s6-SPg5-RUqL-qitV-qJ5t-XHFr0Q
I've tried vgrename and vgreduce to no avail. I'm not really sure what else I can do. Any help would be greatly appreciated.
 
Old 05-06-2015, 05:40 PM   #2
adam999
Member
 
Registered: Sep 2006
Posts: 102

Rep: Reputation: 18
could you do a

Code:
vgdisplay
Code:
lvdisplay
Code:
pvscan
Code:
fdisk -l
Code:
df -h
 
Old 05-06-2015, 08:15 PM   #3
TeenieBopper
LQ Newbie
 
Registered: May 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
vg display:
Code:
mike@server:~$ sudo vgdisplay
[sudo] password for mike:
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  WARNING: Duplicate VG name server-vg: 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  Couldn't find device with uuid QJxFW4-777H-shDs-C2QH-1gWo-Pb0d-56BLPs.
  Couldn't find device with uuid LxIoum-Zjvg-WZ4i-vO8c-ib4O-ldwI-G82TsZ.
  --- Volume group ---
  VG Name               server-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  36
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                3
  Act PV                1
  VG Size               4.09 TiB
  PE Size               4.00 MiB
  Total PE              1072909
  Alloc PE / Size       448000 / 1.71 TiB
  Free  PE / Size       624909 / 2.38 TiB
  VG UUID               pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj

  WARNING: Duplicate VG name server-vg: 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  --- Volume group ---
  VG Name               server-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               111.55 GiB
  PE Size               4.00 MiB
  Total PE              28556
  Alloc PE / Size       11920 / 46.56 GiB
  Free  PE / Size       16636 / 64.98 GiB
  VG UUID               7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt
lvdisplay:
Code:
mike@server:~$ sudo lvdisplay
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  WARNING: Duplicate VG name server-vg: 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  --- Logical volume ---
  LV Path                /dev/server-vg/root
  LV Name                root
  VG Name                server-vg
  LV UUID                86DRIJ-4pB9-XF4N-7Cdk-k5RX-RwNY-Pllq6n
  LV Write Access        read/write
  LV Creation host, time server, 2015-04-30 17:36:39 -0400
  LV Status              available
  # open                 1
  LV Size                43.37 GiB
  Current LE             11103
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2

  --- Logical volume ---
  LV Path                /dev/server-vg/swap_1
  LV Name                swap_1
  VG Name                server-vg
  LV UUID                P29lo8-yZix-Lhdy-52Gg-OF8v-Evhf-JabBtb
  LV Write Access        read/write
  LV Creation host, time server, 2015-04-30 17:36:39 -0400
  LV Status              available
  # open                 2
  LV Size                3.19 GiB
  Current LE             817
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:3
pvscan:
Code:
mike@server:~$ sudo pvscan
  WARNING: Duplicate VG name server-vg: Existing 7MjKjV-5R7c-Qnj1-f3Wh-FR3h-lbom-H4ZEMt (created here) takes precedence over pyCHBp-1KjX-FdhK-hT1V-15uP-7GDn-A1hSRj
  Couldn't find device with uuid QJxFW4-777H-shDs-C2QH-1gWo-Pb0d-56BLPs.
  Couldn't find device with uuid LxIoum-Zjvg-WZ4i-vO8c-ib4O-ldwI-G82TsZ.
  PV unknown device   VG server-vg   lvm2 [465.02 GiB / 465.02 GiB free]
  PV /dev/sdc         VG server-vg   lvm2 [1.82 TiB / 113.02 GiB free]
  PV unknown device   VG server-vg   lvm2 [1.82 TiB / 1.82 TiB free]
  PV /dev/sdb5        VG server-vg   lvm2 [111.55 GiB / 64.98 GiB free]
  Total: 4 [4.20 TiB] / in use: 4 [4.20 TiB] / in no VG: 0 [0   ]
fdisk -l:
Code:
mike@server:~$ sudo fdisk -l

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ae45d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758   234440703   116969473    5  Extended
/dev/sdb5          501760   234440703   116969472   8e  Linux LVM

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sda (Sun disk label): 255 heads, 63 sectors, 46593 cylinders
Units = sectors of 1 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sda3             0 3907024065 1953512032+   5  Whole disk

Disk /dev/sda3 (Sun disk label): 255 heads, 63 sectors, 46593 cylinders
Units = sectors of 1 * 512 bytes

    Device Flag    Start       End    Blocks   Id  System
/dev/sda3p3             0 3907024065 1953512032+   5  Whole disk

Disk /dev/mapper/server--vg-PrivateMedia: 1073.7 GB, 1073741824000 bytes
255 heads, 63 sectors/track, 130541 cylinders, total 2097152000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/server--vg-PrivateMedia doesn't contain a valid partition table

Disk /dev/mapper/server--vg-PublicMedia: 805.3 GB, 805306368000 bytes
255 heads, 63 sectors/track, 97906 cylinders, total 1572864000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/server--vg-PublicMedia doesn't contain a valid partition table

Disk /dev/mapper/server--vg-root: 46.6 GB, 46569357312 bytes
255 heads, 63 sectors/track, 5661 cylinders, total 90955776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/server--vg-root doesn't contain a valid partition table

Disk /dev/mapper/server--vg-swap_1: 3426 MB, 3426746368 bytes
255 heads, 63 sectors/track, 416 cylinders, total 6692864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/server--vg-swap_1 doesn't contain a valid partition table
df -h:
Code:
mike@server:~$ sudo df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/server--vg-root   43G  2.3G   39G   6% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         1.5G   12K  1.5G   1% /dev
tmpfs                        308M  724K  307M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         1.6G     0  1.6G   0% /run/shm
none                         100M     0  100M   0% /run/user
/dev/sdb1                    236M   98M  126M  44% /boot
 
Old 05-07-2015, 07:08 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,988

Rep: Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217Reputation: 2217
Reduce the problem to bite sized chunks. Get one of the conflicting devices out of the box - presumably /dev/sdc; stick it in a box you can play in.

If the vg spanned multiple volumes it's possible (likely ?) any lv will also - even if not striped. So working on the presumption you don't have a usable backup, you may well wind up with a broken (truncated) filesystem. That means lost data - at least; fsck may "adjust" broken files and you'll also have truncated files - without knowing which ones.
I would work with a liveCD that knows LVM entities. Maybe your Ubuntu server disk (when I used Ubuntu years ago LVM wasn't an option). Else something like Fedora maybe. Have a read of this. You might also be interested in the preceding few sections.
Maybe in future you should be a bit more creative with your naming standards - and backups.
 
  


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
So my EC2 Instance seems to have duplicate storage devices? Unre4L Linux - Newbie 0 11-11-2014 04:44 AM
duplicate mount names Latman Linux - Newbie 2 06-11-2012 12:30 PM
duplicate output to 2 devices(alsa) ? Bdfy Linux - General 1 01-25-2011 04:56 PM
Twinview duplicate workspace names rmuel Linux - Software 1 06-28-2006 04:12 PM
duplicate file names? BajaNick Linux - Software 3 08-25-2003 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:10 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