Operating System - HP-UX
1752806 Members
5648 Online
108789 Solutions
New Discussion юеВ

Re: Strange vgcreate issue on replaced disk

 
Geoff Wild
Honored Contributor

Strange vgcreate issue on replaced disk

Had a disk lose an extent - so I had HP replace it.

Prior to that, I lvreduced the mirrors on it, and then did a vgreduce /dev/vg01 /dev/dsk/c28t6d0

After disk replaced, I did a:

pvcreate /dev/rdsk/c28t6d0

The tried:

# vgextend /dev/vg01 /dev/dsk/c28t6d0
vgextend: Couldn't install the physical volume "/dev/dsk/c28t6d0".
The physical volume has no driver configured.

Huh?

Disk replaced was same as one before:

# diskinfo /dev/rdsk/c28t6d0
SCSI describe of /dev/rdsk/c28t6d0:
vendor: HP 36.4G
product id: ST336752LC
type: direct access
size: 35566480 Kbytes
bytes per sector: 512



Now for the strange part - I created a new vg as a test:

# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgcreate -s 16 -p 32 -e 32768 /dev/vg02 /dev/dsk/c28t6d0
Volume group "/dev/vg02" has been successfully created.
Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf

Wow.

# lvcreate -L 1024 /dev/vg02
Logical volume "/dev/vg02/lvol1" has been successfully created with
character device "/dev/vg02/rlvol1".
Logical volume "/dev/vg02/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf

# newfs /dev/vg02/rlvol1
newfs: /etc/default/fs is used for determining the file system type
version 4 layout
1048576 sectors, 1048576 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles not supported
1048576 data blocks, 1047224 free data blocks
32 allocation units of 32768 blocks, 32768 data blocks


Wow again...

# vgchange -a n vg02
Volume group "vg02" has been successfully changed.

# vgexport /dev/vg02

# pvcreate -f /dev/rdsk/c28t6d0

# vgextend /dev/vg01 /dev/dsk/c28t6d0
vgextend: Couldn't install the physical volume "/dev/dsk/c28t6d0".
The physical volume has no driver configured.

Argh...

# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 8680
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/swap
LV Status available/syncd
LV Size (Mbytes) 22432
Current LE 5608
Allocated PE 5608
Used PV 1

LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 12288
Current LE 3072
Allocated PE 3072
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
PV Status unavailable
Total PE 8681
Free PE 1
Autoswitch On


# diskinfo /dev/rdsk/c3t6d0
SCSI describe of /dev/rdsk/c3t6d0:
vendor: HP 36.4G
product id: ST336752LC
type: direct access
size: 35566480 Kbytes
bytes per sector: 512


The other disk in the vg is identical!

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Strange vgcreate issue on replaced disk

Shalom,

I don't see every reason why you say wow, however what happens if you run pvcreate -f

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: Strange vgcreate issue on replaced disk

I did the pvcreate -f (see above)

The "wow" is it will let me create a new vg with this disk - but it won't let be extend an existing vg....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Strange vgcreate issue on replaced disk

And now for something completely different:

# vgextend /dev/vg00 /dev/dsk/c28t6d0
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

Hey - it worked for vg00!!!!

# vgreduce /dev/vg00 /dev/dsk/c28t6d0
Volume group "/dev/vg00" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# vgextend /dev/vg01 /dev/dsk/c28t6d0
vgextend: Couldn't install the physical volume "/dev/dsk/c28t6d0".
The physical volume has no driver configured.

But not for vg01!

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Strange vgcreate issue on replaced disk

Okay - now I know why:

PV Name /dev/dsk/c3t6d0
PV Status unavailable

How did that happen...

Yet the diskinfo is ok...

Now I'm in trouble...


Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
John Payne_2
Honored Contributor

Re: Strange vgcreate issue on replaced disk

Geoff,

Why does your existing disk in vg01 have a status of unavailable? can you do a 'vgchange -a n vg01' followed by 'vgchange -a y vg01' successfully? If so, after that does the status change? And can you then add the 2nd drive?

Hope it helps

John
Spoon!!!!
Geoff Wild
Honored Contributor

Re: Strange vgcreate issue on replaced disk

Nope - as once again I am bitten by the "HP-UX can NOT disable swap on the fly".

vgchange -a n results in device busy - as there is swap on it:

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 22432 0 22432 0% 0 - 2 /dev/vg01/swap
reserve - 533 -533
memory 12648 2234 10414 18%
total 39176 2767 36409 7% - 0 -


Sigh - looks like I need to reboot like they do in the MS world....

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Strange vgcreate issue on replaced disk

I was just thinking as my boss and I had to boot a box for a simple change that as much as we deny it there are occasional similarities between the operation of HP-UX and Microsoft.

I'd say on the balance however HP-UX has to be booted much less often.

Glad you figured it out. Have fun. Hope to see you again soon.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: Strange vgcreate issue on replaced disk

After reboot - I also had to recreate the vg - no big deal - as there was no data on it - only swap and /var/adm/crash.

Seriously, HP needs to fix it so swap can be disabled on the fly - this is a Mission Critical OS is it not?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.