vgcreate problem

Asked by sAGA

Ubuntu 7.04, full update, lvm2 package

root@299903:~# fdisk -l /dev/sda | grep sda1

/dev/sda1 * 1 1963 14840248+ 8e Linux LVM

root@299903:~# pvcreate /dev/sda1

Physical volume "/dev/sda1" successfully created

root@299903:~# vgcreate teszt /dev/sda1

No physical volume label read from /dev/sda1
/dev/sda1 not identified as an existing physical volume
Unable to add physical volume '/dev/sda1' to volume group 'teszt'.

http://www.redhat.com/archives/linux-lvm/2006-October/msg00087.html

Official update 2.02.06 -> 2.02.07 is coming the lvm2 package?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
sAGA
Solved:
Last query:
Last reply:
Revision history for this message
Andres Mujica (andres.mujica) said :
#1

try checking with pvscan

or try using /dev/evms/sda1

Revision history for this message
sAGA (sari-gabor) said :
#2

Thx, but finish learning lvm2, not evms!
:-)

root@299903:~# pvscan
  PV /dev/mapper/sda1 VG work lvm2 [14,15 GB / 10,15 GB free]
  Total: 1 [14,15 GB] / in use: 1 [14,15 GB] / in no VG: 0 [0 ]

root@299903:~# vgcreate teszt /dev/sda1
  No physical volume label read from /dev/sda1
  /dev/sda1 not identified as an existing physical volume
  Unable to add physical volume '/dev/sda1' to volume group 'teszt'.

Revision history for this message
Andres Mujica (andres.mujica) said :
#3

try using /dev/mapper/sda1 instead of /dev/sda1 in the vgcreate.

Also can you show us this info from you system? (i'm showing mine a 7.04
system with lvm2)

sudo vgcreate --version
  LVM version: 2.02.06 (2006-05-12)
  Library version: 1.02.08 (2006-07-17)
  Driver version: 4.11.0
andres@dieguito:~$ sudo pvscan
  PV /dev/mapper/sda6 VG data lvm2 [12,88 GB / 0 free]
  PV /dev/mapper/sda5 VG data lvm2 [9,32 GB / 0 free]
  Total: 2 [22,20 GB] / in use: 2 [22,20 GB] / in no VG: 0 [0 ]
andres@dieguito:~$ sudo vgscan
  Reading all physical volumes. This may take a while...
  Found volume group "data" using metadata type lvm2
andres@dieguito:~$ sudo lvscan
  ACTIVE '/dev/data/dieguito' [22,20 GB] inherit
andres@dieguito:~$ uname -r
2.6.20-16-generic

mingo 14 Octubre 2007 02:35, sAGA escribió:
> Question #15044 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/15044
>
> Status: Answered => Open
>
> sAGA is still having a problem:
> Thx, but finish learning lvm2, not evms!
>
> :-)
>
> root@299903:~# pvscan
> PV /dev/mapper/sda1 VG work lvm2 [14,15 GB / 10,15 GB free]
> Total: 1 [14,15 GB] / in use: 1 [14,15 GB] / in no VG: 0 [0 ]
>
> root@299903:~# vgcreate teszt /dev/sda1
> No physical volume label read from /dev/sda1
> /dev/sda1 not identified as an existing physical volume
> Unable to add physical volume '/dev/sda1' to volume group 'teszt'.

--
Andrés Mauricio Mujica Zalamea
Consultor Linux RHCE #804005093216652
SEAQ SERVICIOS CIA LTDA
Tel: (57) 1 6559800
Fax: (57) 1 6559802
www.seaq.com.co

Brindamos soluciones en el Área de Servidores, Sistemas de Seguridad de
Internet (Internet Security Appliance), Telefonía IP, y Migración a Linux.

Somos su aliado en soluciones Linux.

---

CONFIDENCIAL. La información contenida en este e-mail es confidencial y sólo
puede ser utilizada por el individuo o la compañía a la cual está dirigido.
Si no es usted el destinatario autorizado, cualquier retención, difusión,
distribución o copia de este mensaje está prohibida y es sancionada por la
ley. Si por error recibe este mensaje, favor reenviar y borrar el mensaje
recibido inmediatamente.

CONFIDENTIAL. The information on this e-mail is intended to be confidential
and only for the use of the individual or entity to whom it is addressed. If
you are not the intended recipient, any retention, dissemination,
distribution or copying of this message is strictly prohibited and sanctioned
by law. If you receive this mail in error, please immediately send back and
delete the message received

Revision history for this message
sAGA (sari-gabor) said :
#4

Thanks the reply my problem!

My ad hoc idea: dd if=/dev/zero of=/dev/sda1 bs=1024 count=1000

After:

root@299903:~# fdisk -l /dev/sda

Disk /dev/sda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cilinderek of 15120 * 512 = 7741440 bytes

  Eszköz Boot Start End Blocks Id System
/dev/sda1 * 1 1963 14840248+ 8e Linux LVM

root@299903:~# pvcreate /dev/sda1
  Physical volume "/dev/sda1" successfully created

root@299903:~# vgcreate teszt /dev/sda1
  Volume group "teszt" successfully created

root@299903:~# pvscan
  PV /dev/sda1 VG teszt lvm2 [14,15 GB / 14,15 GB free]
  Total: 1 [14,15 GB] / in use: 1 [14,15 GB] / in no VG: 0 [0 ]

root@299903:~# vgcreate --version
  LVM version: 2.02.06 (2006-05-12)
  Library version: 1.02.08 (2006-07-17)
  Driver version: 4.11.0
root@299903:~# pvscan
  PV /dev/sda1 VG teszt lvm2 [14,15 GB / 14,15 GB free]
  Total: 1 [14,15 GB] / in use: 1 [14,15 GB] / in no VG: 0 [0 ]
root@299903:~# vgscan
  Reading all physical volumes. This may take a while...
  Found volume group "teszt" using metadata type lvm2
root@299903:~# uname -r
2.6.20-16-generic

root@299903:~# lvcreate -L2048 -nkotet01 teszt
  Logical volume "kotet01" created

root@299903:~# lvscan
  ACTIVE '/dev/teszt/kotet01' [2,00 GB] inherit

root@299903:~# mkfs.ext3 /dev/teszt/kotet01

root@299903:~# mount /dev/teszt/kotet01 /mnt/data1/

root@299903:~# df | grep data1
                      2,0G 68M 1,9G 4% /mnt/data1

root@299903:~# df

Fájlrendszer Méret Fogl. Szab. Fo.% Csatl. pont
/dev/mapper/teszt-kotet01
                      2,0G 68M 1,9G 4% /mnt/data1

Probing reboot...

Revision history for this message
Andres Mujica (andres.mujica) said :
#5

That's pretty cool, so maybe some old or previous bits at the superblock were
overlapping the lvm2 data....

glad that you could solve it.

Regards,

Andres

Revision history for this message
sAGA (sari-gabor) said :
#6

The problem selved!
:-)

Thanks the idea!!!!