System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

LVM - pvcreate Error - "No such device or address"

 
SOLVED
Go to solution
PHSC
Frequent Advisor

LVM - pvcreate Error - "No such device or address"

Greetings - I know this issue has been posted in similar fashion before, but I've searched the board and still got an issue.

 

I having issues replacing a disk in /dev/vg01 on an itainium system running HPUX 11.23:

 

uname -a
HP-UX host B.11.23 U ia64 1009971734 unlimited-user license

model
ia64 hp server rx6600

 

The disk has had the LVs removed and was removed from the /dev/vg01 volume group.  The old disk was then removed and the new disk is now in the server and on being inserted, double green lights blinked for a while, so I assume the disk is OK.

 

Thing is, the disk just will not be created again...it just won’t have it.  The disk is not in /etc/lvmpvg, /etc/lvmtab or /etc/lvmtab/vg01.conf.

 

So, the disk is not present...yet it just won’t allow a recreation...any idears?

 

ioscan -fnCdisk
Class        I  H/W Path        Driver         S/W State   H/W Type     Description
==================================================================

disk    8  0/4/1/0.0.0.5.0      sdisk          NO_HW       DEVICE       HP      DG146BB976

                               /dev/dsk/c1t5d0   /dev/rdsk/c1t5d0

 

ls -ld /dev/dsk/c1t5d0

brw-r-----   1 bin        sys         31 0x015000 Feb  9  2009 /dev/dsk/c1t5d0

 

pvcreate -f /dev/rdsk/c1t5d0

pvcreate: Couldn't open physical volume "/dev/rdsk/c1t5d0":

No such device or address

 

lssf /dev/rdsk/c1t5d0

sdisk card instance 1 SCSI target 5 SCSI LUN 0 section 0 at address 0/4/1/0.0.0.5.0 /dev/rdsk/c1t5d0

 

pvcreate /dev/rdsk/c1t5d0

pvcreate: Couldn't open physical volume "/dev/rdsk/c1t5d0":

No such device or address

 

I reseated the disk and double green lights come on for a while then go off...so I assume that the disk is OK?

 

Hmmm?

 

11 REPLIES
Patrick Wallek
Honored Contributor

Re: LVM - pvcreate Error - "No such device or address"

Have a look in your /var/adm/syslog/syslog.log file and see if there are any clues or useful errors there.

 

 

 

PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

There was this below error in event.log, but I've reseated the disk since then and there has not been another error in event.log.  There's nothing nasty in syslog.log.

 

Event Time..........: Mon Apr 22 16:02:02 2013

Severity............: CRITICAL

Monitor.............: disk_em

Event #.............: 101

System..............: vseexe1.nhsia.nhs.uk

 

Summary:     Disk at hardware path 0/4/1/0.0.0.5.0 : Device removed from monitoring

 

Description of Error:     The device has been removed from the list of devices being monitored by     this monitor.

 

Probable Cause / Recommended Action:

 

     The device was removed from the system, has stopped responding to the

     system or it has been replaced with a device that is not supported by this

     monitor.

          Run ioscan to determine the state and type of the device.

          Check the /var/stm/data/os_decode_xref for the information indicating

          which devices are supported by this monitor.

          Check other monitors to determine if they are now monitoring the

          device by running /etc/opt/resmon/lbin/monconfig and using the "Check

          monitoring" command.

Torsten.
Acclaimed Contributor

Re: LVM - pvcreate Error - "No such device or address"

If the disk is connected to the default SAS controller, you now have a new devide file for the disk.

 

What was the slot?

 

 

Post

 

# sasmgr get_info -D /dev/sasd0 -q raid

 

or

 

# sasmgr get_info -D /dev/sasd1 -q raid

 

and a full

 

# ioscan -fn

 

 

 

 

 

You need to redirect the old device file to the new device, example:

 

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c1t4d0 -q new_tgt_hwpath=0/4/1/0.0.0.11.0

 

 

but you need the correct values!


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

Thanks for the reply.  Hmm, I had just assumed as this was HPUX 11.23 once the new disk was in and you ioscan'ed it it would come online again.  The output from the commands is:

 

sasmgr get_info -D /dev/sasd0 -q raid


Tue Apr 23 08:37:33 2013

---------- PHYSICAL DRIVES ----------
LUN dsf              SAS Address          Enclosure    Bay      Size(MB)

/dev/rdsk/c1t1d0     0x5000cca000678c7d     1            3      140014
/dev/rdsk/c1t2d0     0x5000cca000674741     1            5      140014
/dev/rdsk/c1t3d0     0x5000c5000ea85815     1            4      140014
/dev/rdsk/c1t4d0     0x5000c5000ea8d55d     1            1      140014
/dev/rdsk/c1t6d0     0x5000c5000ea8ebf9     1            6      140014

---------- LOGICAL DRIVE 5 ----------

Raid Level                                         : RAID 1
Volume sas address                                 : 0x195a34bd0a43d13
Device Special File                                : /dev/rdsk/c1t0d0
Raid State                                              : OPTIMAL
Raid Status Flag                                   : ENABLED
Raid Size                                                : 69878
Rebuild Rate                                         : 0.00 %
Rebuild Progress                                   : 100.00 %

Participating Physical Drive(s) :

SAS Address         Enc   Bay   Size(MB)      Type            State

0x500000e014ce0e62   1     7    70007         SECONDARY       ONLINE
0x500000e014ce23f2   1     8    70007         PRIMARY         ONLINE

 

sasmgr get_info -D /dev/sasd1 -q raid

Tue Apr 23 08:45:03 2013

---------- PHYSICAL DRIVES ----------
LUN dsf              SAS Address          Enclosure    Bay      Size(MB)

/dev/rdsk/c5t0d0     0x5000c5000ea7d499     1            11     140014
/dev/rdsk/c5t1d0     0x5000c5000ea84109     1            9      140014
/dev/rdsk/c5t2d0     0x5000c5000ea851d1     1            10     140014
/dev/rdsk/c5t3d0     0x5000c5000ea89891     1            12     140014
/dev/rdsk/c5t4d0     0x5000c5000ea863a9     1            16     140014
/dev/rdsk/c5t5d0     0x5000c5000eade755     1            14     140014
/dev/rdsk/c5t6d0     0x5000c5000eade861     1            13     140014
/dev/rdsk/c5t7d0     0x5000c5000eadebc9     1            15     140014

PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

As you can see in the above sas commands, the disk in question, c1t5d0, simply is not there...and I want the troublesome disk to be created again :-(.  Here's the ioscan listing:

 

ioscan -fnCdisk

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

====================================================================================

disk         0  0/0/2/1.0.16.0.0       sdisk          CLAIMED     DEVICE       TEAC    DV-28E-N

                               /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0

disk         1  0/4/1/0.0.0.0.0        sdisk          CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t0d0     /dev/rdsk/c1t0d0

                               /dev/dsk/c1t0d0s1   /dev/rdsk/c1t0d0s1

                               /dev/dsk/c1t0d0s2   /dev/rdsk/c1t0d0s2

                               /dev/dsk/c1t0d0s3   /dev/rdsk/c1t0d0s3

disk         4  0/4/1/0.0.0.1.0        sdisk          CLAIMED     DEVICE       HP      DG146BAAJB

                               /dev/dsk/c1t1d0   /dev/rdsk/c1t1d0

disk         5  0/4/1/0.0.0.2.0        sdisk          CLAIMED     DEVICE       HP      DG146BAAJB

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk         6  0/4/1/0.0.0.3.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

disk         7  0/4/1/0.0.0.4.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t4d0   /dev/rdsk/c1t4d0

disk         8  0/4/1/0.0.0.5.0        sdisk          NO_HW       DEVICE       HP      DG146BB976

                               /dev/dsk/c1t5d0   /dev/rdsk/c1t5d0

disk         9  0/4/1/0.0.0.6.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t6d0   /dev/rdsk/c1t6d0

disk        18  0/4/1/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

disk        10  0/4/2/0.0.0.0.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t0d0   /dev/rdsk/c5t0d0

disk        11  0/4/2/0.0.0.1.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t1d0   /dev/rdsk/c5t1d0

disk        12  0/4/2/0.0.0.2.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t2d0   /dev/rdsk/c5t2d0

disk        13  0/4/2/0.0.0.3.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t3d0   /dev/rdsk/c5t3d0

disk        14  0/4/2/0.0.0.4.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t4d0   /dev/rdsk/c5t4d0

disk        15  0/4/2/0.0.0.5.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t5d0   /dev/rdsk/c5t5d0

disk        16  0/4/2/0.0.0.6.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t6d0   /dev/rdsk/c5t6d0

disk        17  0/4/2/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t7d0   /dev/rdsk/c5t7d0

disk         2  0/7/1/0.8.0.255.2.8.0  sdisk          CLAIMED     DEVICE       SUN     StorEdge 3510

                               /dev/dsk/c2t8d0   /dev/rdsk/c2t8d0

disk         3  0/7/1/0.8.0.255.2.8.1  sdisk          CLAIMED     DEVICE       SUN     StorEdge 3510

                               /dev/dsk/c2t8d1   /dev/rdsk/c2t8d1

PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

Looking at the before and after ioscan, it does appear that an extra entry has appeared after the new disk has been put in slot 2, where c1t5d0 was located:

 

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

====================================================================================

disk        18  0/4/1/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

 

This disk does not have a c*t*d* device attached to it yet...so I assume it needs those sas commands running.

Torsten.
Acclaimed Contributor

Re: LVM - pvcreate Error - "No such device or address"

Correct, this is the new disk

 

disk        18  0/4/1/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

 

in slot 2, right?

 

 

 

You may consider to use it "as it is" or re-assign it back to the old device file.

 

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c1t5d0 -q new_tgt_hwpath=0/4/1/0.0.0.7.0


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

Slot 2 - correct.  OK, i've ran the command and the disk path has now been assigned to c1t7d0.  It was still showing as NO_HW, but i've been able to pvcreate the disk again.  But the disk is still showing as NO_HW.  I've not tried a vgcfgrestore yet...i'm wondering if you need to do a "io_redirect" type command to?

 

WARNING: This is a DESTRUCTIVE operation.

This might result in failure of current I/O requests.

Do you want to continue ?(y/n) [n]...y

LUN has been replaced with new Target.

 

ioscan -fnCdisk

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

===================================================================================

disk        18  0/4/1/0.0.0.7.0        sdisk          NO_HW       DEVICE       HP      EH0146FARWD

                               /dev/dsk/c1t7d0   /dev/rdsk/c1t7d0

 

 

sasmgr get_info -D /dev/sasd0 -q raid

 

Tue Apr 23 09:44:43 2013

 

---------- PHYSICAL DRIVES ----------

LUN dsf                        SAS Address                Enclosure    Bay      Size(MB)

 

/dev/rdsk/c1t1d0     0x5000cca000678c7d     1            3      140014

/dev/rdsk/c1t2d0     0x5000cca000674741     1            5      140014

/dev/rdsk/c1t3d0     0x5000c5000ea85815     1            4      140014

/dev/rdsk/c1t4d0     0x5000c5000ea8d55d     1            1      140014

/dev/rdsk/c1t5d0     0x5000cca00bbe4a35     1            2      140014

/dev/rdsk/c1t6d0     0x5000c5000ea8ebf9     1            6      140014

 

 pvcreate /dev/rdsk/c1t5d0

Physical volume "/dev/rdsk/c1t5d0" has been successfully created.

 

An ioscan shows c1t5d0 as CLAIMED, but c1t7d0 as still NO_HW??

 

ioscan -fnCdisk

Class        I  H/W Path        Driver         S/W State   H/W Type     Description

====================================================================================

disk         0  0/0/2/1.0.16.0.0       sdisk          CLAIMED     DEVICE       TEAC    DV-28E-N

                               /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0

disk         1  0/4/1/0.0.0.0.0        sdisk          CLAIMED     DEVICE       HP      IR Volume

                               /dev/dsk/c1t0d0     /dev/rdsk/c1t0d0

                               /dev/dsk/c1t0d0s1   /dev/rdsk/c1t0d0s1

                               /dev/dsk/c1t0d0s2   /dev/rdsk/c1t0d0s2

                               /dev/dsk/c1t0d0s3   /dev/rdsk/c1t0d0s3

disk         4  0/4/1/0.0.0.1.0        sdisk          CLAIMED     DEVICE       HP      DG146BAAJB

                               /dev/dsk/c1t1d0   /dev/rdsk/c1t1d0

disk         5  0/4/1/0.0.0.2.0        sdisk          CLAIMED     DEVICE       HP      DG146BAAJB

                               /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk         6  0/4/1/0.0.0.3.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t3d0   /dev/rdsk/c1t3d0

disk         7  0/4/1/0.0.0.4.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t4d0   /dev/rdsk/c1t4d0

disk         8  0/4/1/0.0.0.5.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

                               /dev/dsk/c1t5d0   /dev/rdsk/c1t5d0

disk         9  0/4/1/0.0.0.6.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c1t6d0   /dev/rdsk/c1t6d0

disk        18  0/4/1/0.0.0.7.0        sdisk          NO_HW       DEVICE       HP      EH0146FARWD

                               /dev/dsk/c1t7d0   /dev/rdsk/c1t7d0

disk        10  0/4/2/0.0.0.0.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t0d0   /dev/rdsk/c5t0d0

disk        11  0/4/2/0.0.0.1.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t1d0   /dev/rdsk/c5t1d0

disk        12  0/4/2/0.0.0.2.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t2d0   /dev/rdsk/c5t2d0

disk        13  0/4/2/0.0.0.3.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t3d0   /dev/rdsk/c5t3d0

disk        14  0/4/2/0.0.0.4.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t4d0   /dev/rdsk/c5t4d0

disk        15  0/4/2/0.0.0.5.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t5d0   /dev/rdsk/c5t5d0

disk        16  0/4/2/0.0.0.6.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t6d0   /dev/rdsk/c5t6d0

disk        17  0/4/2/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      DG146BB976

                               /dev/dsk/c5t7d0   /dev/rdsk/c5t7d0

disk         2  0/7/1/0.8.0.255.2.8.0  sdisk          CLAIMED     DEVICE       SUN     StorEdge 3510

                               /dev/dsk/c2t8d0   /dev/rdsk/c2t8d0

disk         3  0/7/1/0.8.0.255.2.8.1  sdisk          CLAIMED     DEVICE       SUN     StorEdge 3510

                               /dev/dsk/c2t8d1   /dev/rdsk/c2t8d1

Torsten.
Acclaimed Contributor

Re: LVM - pvcreate Error - "No such device or address"

>> An ioscan shows c1t5d0 as CLAIMED, but c1t7d0 as still NO_HW??


Not "still".

c1t5d0 was NO_HW, now it is CLAIMED.
c1t7d0 was CLAIMED, now it is NO_HW.

Now you can include c1t5d0 back to the VG.

If you want, remove the NO_HW device:

# rmsf -k -H 0/4/1/0.0.0.7.0

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor
Solution

Re: LVM - pvcreate Error - "No such device or address"

This is was happened:

 

A non-RAID disk has gone bad.

 

disk    8  0/4/1/0.0.0.5.0      sdisk          NO_HW       DEVICE       HP      DG146BB976

 

You replace it and you get a new device file on a new hardware path:

 

disk        18  0/4/1/0.0.0.7.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

 

Now you say "please use the new device as a replacement for the old device":

 

# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c1t5d0 -q new_tgt_hwpath=0/4/1/0.0.0.7.0

 

and you see

 

disk         8  0/4/1/0.0.0.5.0        sdisk          CLAIMED     DEVICE       HP      EH0146FARWD

 

 

but the system remembers the "new" device, now as "NO_HW", because it became the replacement for the "old" device.

 

disk        18  0/4/1/0.0.0.7.0        sdisk          NO_HW       DEVICE       HP      EH0146FARWD

 

 

 

 

 

This will become a bit more complicated if you use 11.31 ;-)

 

 

So better use a hardware RAID (like your vg00), if possible.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
PHSC
Frequent Advisor

Re: LVM - pvcreate Error - "No such device or address"

Many thanks for the assistance Torsten, the disk is now claimed and back in the VG.  All OK now.