Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
Fdisk, lv/pv/vgdisplay:

anubis@Anubis:~$ sudo fdisk -l
[sudo] password for anubis:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
45 heads, 63 sectors/track, 344540 cylinders, total 976773168 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: 0x1b231dca 

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   976773167   488385560   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
45 heads, 63 sectors/track, 344540 cylinders, total 976773168 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: 0x85e38cb4

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976773167   488385560   8e  Linux LVM

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 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: 0x6b680487

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1953525167   976761560   8e  Linux LVM

Disk /dev/sdd: 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: 0x00009d51

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048   195311615    97654784   83  Linux
/dev/sdd2       195311616  3907029167  1855858776   8e  Linux LVM

Disk /dev/mapper/vgpool-storage: 2900.5 GB, 2900499628032 bytes
255 heads, 63 sectors/track, 352632 cylinders, total 5665038336 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/mapper/vgpool-storage doesn't contain a valid partition table
anubis@Anubis:~$ sudo lvdisplay
--- Logical volume ---
LV Name                /dev/vgpool/storage
VG Name                vgpool
LV UUID                C56qjD-X92X-HguJ-1b3n-OOUN-dDBE-fo1fN0
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                2.64 TiB
Current LE             691533
Segments               2
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           252:0

anubis@Anubis:~$ sudo vgdisplay
--- Volume group ---
VG Name               vgpool
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  20
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                1
Open LV               0
Max PV                0
Cur PV                2
Act PV                2
VG Size               2.64 TiB
PE Size               4.00 MiB
Total PE              691556
Alloc PE / Size       691533 / 2.64 TiB
Free  PE / Size       23 / 92.00 MiB
VG UUID               XAgeo7-kfnx-ew9Z-qFEn-AQzZ-26Fv-YDLr8D

anubis@Anubis:~$ sudo pvdisplay
--- Physical volume ---
PV Name               /dev/sdc1
VG Name               vgpool
PV Size               931.51 GiB / not usable 3.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              238466
Free PE               0
Allocated PE          238466
PV UUID               vgZcil-AgYl-nOHy-oPq7-pc7m-ybDV-qpwHs5

--- Physical volume ---
PV Name               /dev/sdd2
VG Name               vgpool
PV Size               1.73 TiB / not usable 2.09 MiB
Allocatable           yes
PE Size               4.00 MiB
Total PE              453090
Free PE               23
Allocated PE          453067
PV UUID               P9pAmT-cPAD-bS2H-XGcN-9wpU-6c4g-QcPJyL

anubis@Anubis:~$ sudo vgextend vgpool /dev/sda1
Device /dev/sda1 not found (or ignored by filtering).
Unable to add physical volume '/dev/sda1' to volume group 'vgpool'.

sudo pvscan
[sudo] password for anubis:
PV /dev/sdc1   VG vgpool   lvm2 [931.51 GiB / 0    free]
PV /dev/sdd2   VG vgpool   lvm2 [1.73 TiB / 92.00 MiB free]
Total: 2 [2.64 TiB] / in use: 2 [2.64 TiB] / in no VG: 0 [0   ]

I have a volume group setup with two physical volumes. That is working fine, no issues. I am trying to add /dev/sda1 and /dev/sdb1. Both have been partitioned and formatted, as you can see. The first two drives added just fine while the other two just give me an error.

I am really at the end of my realm, and i need help.

The purpose of this server is mainly as a file server. It is running

Ubuntu server 12.04.2
four sata drives, 2x 500GB, 1x 1TB, and 1x 2TB.

I have a single ext partition on the 2TB for ubuntu and all its needs. The rest I want to use as a large storage place for music movies and photos.

share|improve this question
1  
Did you create the physical volumes sda1 and sdb1 with pvcreate? –  Gerald Schneider Jun 14 '13 at 13:12
    
What @GeraldSchneider said. Additionally: sudo pvscan should yield both sda1 and sdb1 after doing so and you should be able to add it. –  gertvdijk Jun 14 '13 at 13:18
1  
We need more information. How did you create the LVM (PV) ? What command are you running and what error message did you get ? –  bodhi.zazen Jun 14 '13 at 17:09
    
@GeraldSchneider: yes all pv's were created using pvcreate –  Tripwire292 Jun 15 '13 at 0:05
    
@qertvdijk: see the original post. i dont see sda1 or sdb1 –  Tripwire292 Jun 15 '13 at 0:07

1 Answer 1

So as it turns out, sda1 and sdb1 both retained previous volume group associations. I had believed that all traces of the first vg i created, as a test, had been removed. they had not. in order for me to wipe the drives i needed to do:

sudo pvremove /dev/sdb1 -ff
Labels on physical volume "/dev/sdb1" successfully wiped

after that i was able to successfully able to readd the drives via pvcreate and vgextend. the rest was a breeze.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.