Operating System - HP-UX
1753447 Members
5072 Online
108794 Solutions
New Discussion юеВ

can't vgcreate: IO error on Physical Volume device

 
SOLVED
Go to solution
Natasha L.
Advisor

can't vgcreate: IO error on Physical Volume device

Hello all,

I am an HPUX newbie setting up a new 11i box. It shipped with 2 hard disks, but:
- there is only one vg containing one pv
- there is only 24 MB in /home

What I would like to do is create a new vg01, assign the second disk to it, create a huge lvol on it, and then relocate /home to that lvol by editing /etc/fstab. That way /home is sitting on its own disk with gigs and gigs to play with.

I set about doing this. First I checked that the box sees two hard disks:
#ioscan -fn | grep disk
disk 0 0/0/1/1.15.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC
disk 1 0/0/2/1.15.0 sdisk CLAIMED DEVICE HP 36.4GST336753LC

Then I checked for pvs and saw two:
# ls /dev/dsk
c1t15d0 c3t15d0

When I checked them out:
bash-2.05b# pvdisplay /dev/dsk/c1t15d0
--- Physical volumes ---
PV Name /dev/dsk/c1t15d0
VG Name /dev/vg00...

# pvdisplay /dev/dsk/c3t15d0
pvdisplay: Couldn't find the volume group to which physical volume "/dev/dsk/c3t15d0" belongs.

OK. Looks like pv c3t15d0 is our second disk that hasn't been assigned to a vg yet. So I went ahead and did the vg setup:
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000

The next step didn't work:
# vgcreate /dev/vg01 /dev/dsk/c3t15d0
vgcreate: IO error on Physical Volume device /dev/dsk/c3t15d0:

So my questions are:
1) How can I verify that /dev/dsk/c3t15d0 really is my second disk drive? Is there a command that basically lists pvs mapped to the ioscan info for their disks?

2) If /dev/dsk/c3t15d0 is not my second disk... what is it? can I get rid of it? if so, how?

3) If /dev/dsk/c3t15d0 is not my second disk, I know I need to use pvcreate /dev/dsk/cXtXdX
to associate the second disk with a pv. Can I plug whatever I want into the X's?

Any advice much appreciated.

Sincerely,
Natasha
11 REPLIES 11
Paula J Frazer-Campbell
Honored Contributor
Solution

Re: can't vgcreate: IO error on Physical Volume device

HI

Use SAM it is quick and easy.

Paula

If you can spell SysAdmin then you is one - anon
melvyn burnard
Honored Contributor

Re: can't vgcreate: IO error on Physical Volume device

I believe you had all your steps right except for the missing one which was to do a pvcreate /dev/rdsk/c3t15d0 before doing the vgcreate
This failed as htere were no LVM headers written to the pv
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Pete Randall
Outstanding Contributor

Re: can't vgcreate: IO error on Physical Volume device

Natasha,

First off, when you do your ioscan, the second line should also show you the device file associated with each disk. Secondly, because your second disk /dev/dsk/c3t15d0 has not been used for LVM space yet, you need to first pvcreate it: "pvcreate /dev/rdsk/c3t15d0". The rest of your steps are fine. The EXAMPLES section of man vgcreate show a good example of the steps to follow. Or use Paula's suggestion of doing the process via SAM.

One other concern: "bash-2.05b# pvdisplay /dev/dsk/c1t15d0" Is this indicating that you've changed root's shell to bash? If so, change it back. You're going to end up with an unbootable system.


Pete


Pete
Natasha L.
Advisor

Re: can't vgcreate: IO error on Physical Volume device

Hi all, thanks for the replies!

I am trying SAM now.

I did try a pvcreate but got:

# pvcreate /dev/dsk/c3t15d0
pvcreate: "/dev/dsk/c3t15d0": not a character device.

Googled this with no results.

Thanks,
Natasha
Pete Randall
Outstanding Contributor

Re: can't vgcreate: IO error on Physical Volume device

Natasha,

The pvcreate command needs the raw device:

pvcreate /dev/rdsk/c3t15d0

(note the rdsk as opposed to dsk)


Pete


Pete
James R. Ferguson
Acclaimed Contributor

Re: can't vgcreate: IO error on Physical Volume device

Hi:

You need the raw device file. Instead of"

# pvcreate /dev/dsk/c3t15d0

...do:

# pvcreate /dev/rdsk/c3t15d0

Regards!

...JRF...
Elena Leontieva
Esteemed Contributor

Re: can't vgcreate: IO error on Physical Volume device

You should do:

pvcreate /dev/rdsk/c3t15d0
melvyn burnard
Honored Contributor

Re: can't vgcreate: IO error on Physical Volume device

As per my first reponse, you use /dev/rdsk/c3t15d0
Note the r in front of the dsk, to give you the raw or charatcter device, and not just dsk, to give the block or "cooked" device
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Natasha L.
Advisor

Re: can't vgcreate: IO error on Physical Volume device

Hi everybody,

Thanks so much for the swift replies! Pvcreate with rdsk did the trick. And next time I will use SAM. 8)

Sincerely,
Natasha