Start a Conversation

Unsolved

This post is more than 5 years old

5525

February 11th, 2008 06:00

Tricks to keep Linux PowerPath devices in sequence

I think I know the answer to this question already (tough luck) but does anyone have any tricks to keep PowerPath devices under RHEL the same based on LUN number?

It appears that the newer versions of PowerPath do not use the LUN/TARGET ordering any longer which has caused some heartburn for our Linux administrators when installing newer versions of PowerPath. I found some articles to work-around this emc113184 and emc119345 and verified that this appears to be "known" behavior.

My question is does anyone have a slick way to get around this "feature" and make some Linux admins happy?

Since this is known behavior I am reluctant to open an official case on this design quirk.

1 Rookie

 • 

20.4K Posts

February 11th, 2008 08:00

bodnarg,

my system admins are also using file system labels when they create file systems, for example:

mke2fs -j -L rac_ora1 /dev/emcpowerX

so when they mount the file system they use labels instead of powerpath devices, that way if device changes its name ..it can still be mounted since the label remains the same. Here is my /etc/fstab

LABEL=rac_ora1 /rac/rac_ora1 ext3 defauls 1 1

385 Posts

February 12th, 2008 04:00

Crud - that label command looked promising. Here is the response I got back from our Linux admin:

The issue I've ran into with this is it will find the label in 5 places for the clarion.

The 4 /dev/sdX devices and the /dev/emcpowerX device.

Looks like the label command does not always pick the PowerPath device which could be a problem for redundancy...

131 Posts

February 12th, 2008 05:00

In Linux & Solaris it doesn't matter whether you use (mount) the device by any of its native OS paths or the emcpower device. Load balancing & failover work just the same whichever device node you pick, so the LABEL mount method is fine.

Have a read of the "Native Device" section in the PowerPath Product Guide, available for download from PowerLink.

BR,
Marc

2.8K Posts

February 12th, 2008 05:00

That's why it's better to synchronize device names between the hosts ;-) .. It will work also if you don't use a filesystem (your dbf are on raw devices).

Message was edited by:
Stefano Del Corno

4 Posts

February 18th, 2008 04:00

Use LVM and you will not have to worry about device ordering anymore.

Create physical volumes on /dev/emcpowerX and map rawdevices or /etc/fstab against logical volumes. Logical volume names will always stay the same no matter on what /dev/emcpowerX are physical ones.

1.3K Posts

March 2nd, 2008 18:00

yes we do make use of the Label and the LVM and managing the SAN disks were never a head ache during a kernel upgrade.

Still the RHEL AS 2.1 does not support LVM .But the label still works here too.

50 Posts

March 7th, 2008 05:00

# mkfs -j -L lun7 /dev/emcpowerc1
(this is the iSCSI attached environment)
belows are my fstab e.g.:

LABEL=lun7 /test ext3 _netdev 0 0

when i issue "mount /test", there comes below result:
mount: LABEL=/test duplicate - not mounted

What is the problem???

1.3K Posts

March 7th, 2008 06:00

below command will lsi the label

#e2label /dev/emcpowerc1

below command will list the test entry in /etc/fstab.I hope you have a duplicate entry there

#grep test /etc/fstab

50 Posts

March 13th, 2008 10:00

not duplicate entry exist!

i assume the reason of "duplicate" is that there are more than one path for one devices.

#e2label /dev/emcpowerc1
lun7
#e2label /dev/fdc1
lun7
#e2label /dev/fdd1
lun7
#e2label /dev/fdf1
lun7
#e2label /dev/fdg1
lun7

....

2.8K Posts

March 14th, 2008 01:00

if you have powerpath (and it looks like you have it) run "powermt display dev=all" and look the output .. I think you gave the only possible answer .. emcpowerc1 is the "parent" device .. and you have 4 different paths to the same lun.

AFAIK on linux scsi disks are /dev/sda, /dev/sdb and so on .. I admint that I don't really know where do /dev/fdc, /dev/fdd, /dev/fdf and /dev/fdg comes from.

1.3K Posts

March 14th, 2008 11:00

you dont need to label the /dev/fd*

50 Posts

March 19th, 2008 03:00

below cmd show the label of the devs:
#e2label /dev/emcpowerc1
lun7
#e2label /dev/sdc1
lun7
#e2label /dev/sdd1
lun7
#e2label /dev/sdf1
lun7
#e2label /dev/sdg1
lun7
....

I just label ONE device,whatever pseudo dev or native dev, they will all get same label at the same time.
....

Message was edited by:
RayCXT

Message was edited by:
RayCXT

50 Posts

April 4th, 2008 13:00

I have it a little better than most so far since we are running RedHat AS 4.5 with Oracle RAC that is using raw devices (I know raw is going away). What is better about it is that the raw devices serve as a middle man. I keep maps of the emc devices, with the powerpath name and the raw device name. Then I have a script that reads the saved table and will map the raw devices to the proper powerpath device so that rawx maps to the same physical disk on every node in the cluster. When the powerpath names change the application does not see this since the raw device is what gets presented. i.e. I just run the scipt to map the devices properly. I'm thinking that my next step as I migrate off of raw will be to create links in /dev to serve the same purpose.
What I would really like is a method in powerpath to determine the names based on the phyical device. I'd like to be able to just feed powerpath a list like
device 123 map /dev/datafile01. Run the good old emcrenameutilitydoesnotexist command.

341 Posts

January 21st, 2009 00:00

Hi Folks,

Sorry for dragging up an old thread, not sure if anyone is aware, but since PowerPath 5.1 and later on both Linux and Solaris there is a new feature to the emcpadm utility.

emcpadm now had the ability to create a mapping file that contains the pseudo-->native device mappings. This mapping file can be exported from one node and imported to the next, so instead of renaming the pseud'o's individually, you can do it with one command.

Please see Knowledge-base solution emc205443 for full details and examples. There is also more information in the PowerPath 5.1 Product Guide, available on Powerlink.

1 Rookie

 • 

20.4K Posts

January 21st, 2009 11:00

any idea when this functionality will be available for AIX ? Right now it's a very cumbersome process to rename devices on AIX.

Thanks
No Events found!

Top