Skip to contentSkip to conversation

Volume Group Creation

linux-lvm SHAD GUNDERSON 3 participants 3 messages May 14, 1999 – Nov 27, 2020

lore
Share & tools
lore
#0 lore raw

I have successfully patched and compiled the lvm code and kernel.... and I am able to create the physical volumes using "pvcreate /dev/sdb[12]". However, the next step in the documention is where I run into problems... upon execution of the "vgcreate test_vg /dev/sdb[12]" I receive an error that no physical volumes exist. Am I missing something. I have changed the system ids on the partitions. I am running kernel 2.2.8 with lvm 0.6 and the devfs patch for May 3rd.

Thanks,
shad

#1 lore raw
Quoted 9 lines

I have successfully patched and compiled the lvm code and kernel.... and I = am able to create the physical volumes using "pvcreate /dev/sdb[12]". = However, the next step in the documention is where I run into problems... = upon execution of the "vgcreate test_vg /dev/sdb[12]" I receive an error = that no physical volumes exist. Am I missing something. I have changed = the system ids on the partitions. I am running kernel 2.2.8 with lvm 0.6 = and the devfs patch for May 3rd.=20

In addition to Mike's vgscan hint:

Could you please check, if /dev/sd* are all o.k.?

I've seen trouble with overlapping specials before (_no_ devfs!).

/dev/sdb16 existed with major/minor of /dev/sdc
/dev/sdb17 mapped /dev/sdc1 etc.

I've attached a script which is able to create SCSI device specials. Please remove existing /dev/sd* yourself, because the script doesn't take care of that.

Regards,
Heinz

#!/bin/sh
#
# (C)opyright Heinz Mauelshagen 11/15/1998 #
# Generates SCSI disk specials for disk 1 up to 128 #

alphabet="a b c d e f g h i j k l m n o p q r s t u v w x y z" DIR=/dev
[ ! -d $DIR ] && ( mkdir $DIR; chmod 555 $DIR )

function do_mknod {
major_this=$1
minor_this=$2
disknum_this=$3
DIR_this=$4

let modminor_this=minor_this%16

   if [ $disknum_this -lt 26 ]; then
      i=0
      for c in $alphabet; do
         [ $i -eq $disknum_this ] && break
         let i=i+1
      done
      name=$c
      [ $modminor_this -ne 0 ] && name=$name$modminor_this
   else
      let ilt1=disknum_this/26-1
      let ilt2=disknum_this%26
      i=0
      for c in $alphabet; do
         [ $i -eq $ilt1 ] && break
         let i=i+1
      done
      lt1=$c
      i=0
      for c in $alphabet; do
         [ $i -eq $ilt2 ] && break
         let i=i+1
      done
      name=$lt1$c
      [ $modminor_this -ne 0 ] && name=$name$modminor_this
   fi

rm -f $DIR_this/sd$name
echo mknod $DIR_this/sd$name b $major_this $minor_this mknod $DIR_this/sd$name b $major_this $minor_this chown root:disk $DIR_this/sd$name
chmod 660 $DIR_this/sd$name
}

disknum=0
ongoing_minor=0
for major in 8 65 66 67 68 69 70 71
do
disk_per_major=1
while [ $disk_per_major -le 16 ]; do

      minor=0
      [ $ongoing_minor -gt 255 ] && ongoing_minor=0
      while [ $minor -lt 16 ]; do
         do_mknod $major $ongoing_minor $disknum $DIR
         let minor=minor+1
         let ongoing_minor=ongoing_minor+1
      done
      let disk_per_major=disk_per_major+1
      let disknum=disknum+1

done
done

--

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Systemmanagement C/S Deutsche Telekom AG
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41

                                                 64205 Darmstadt
[email protected]                      Germany
                                                 +49 6151 886-425
                                                          FAX-386

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
In reply to SHAD GUNDERSON
Quoted 9 lines

I have successfully patched and compiled the lvm code and kernel.... and I am able to create the physical volumes using "pvcreate /dev/sdb[12]". However, the next step in the documention is where I run into problems... upon execution of the "vgcreate test_vg /dev/sdb[12]" I receive an error that no physical volumes exist. Am I missing something. I have changed the system ids on the partitions. I am running kernel 2.2.8 with lvm 0.6 and the devfs patch for May 3rd.

Hello Shad.

Strange, this should work.
Could you try to run vgcreate with the -d option and send me the output? This should provide additional information what is happening.

The only problem that i could imagine off my head is that the /etc/lvmtab is not up-to-date (this happened once to me a few revisions ago). Please run vgscan and try the vgcreate again.

Hope that helps
Michael

--

Michael Marxmeier           Marxmeier Software GmbH
E-Mail: [email protected]      Besenbruckstrasse 9
Voice : +49 202 2431440     42285 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/