1834796 Members
2370 Online
110070 Solutions
New Discussion

Re: Raw devices in LVM

 
SOLVED
Go to solution
Alan Shearer_1
Frequent Advisor

Raw devices in LVM

Hi,

This may be a stupid question..but I'm a little unsure about using raw devices. When I created them both a block and character device were created as per usual. Normally I would just newfs the stand lvolx, but my question is should the database use the lvolx or the rlvolx?

Thanks in advance.
19 REPLIES 19
Michael Steele_2
Honored Contributor
Solution

Re: Raw devices in LVM

lvolx
Support Fatherhood - Stop Family Law
Paula J Frazer-Campbell
Honored Contributor

Re: Raw devices in LVM

Alan

lvolx

No questions are stupid !!!

paula
If you can spell SysAdmin then you is one - anon
Steven E. Protter
Exalted Contributor

Re: Raw devices in LVM

My High School Physics instructor:

The only stupid question is the one that isn't asked.

I didn't like her, but she had a point.

Even raw devices are associated with a volume group first then a disk within that volume group when you run lvextend.

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
Paula J Frazer-Campbell
Honored Contributor

Re: Raw devices in LVM

Alan

"Normally I would just newfs the stand lvolx"

What are you doing ?

stand is a system dir and created at install time!


Paula
If you can spell SysAdmin then you is one - anon
Alan Shearer_1
Frequent Advisor

Re: Raw devices in LVM

Thanks Michael and Paula.

I was just unsure as I got it in my head that the rlvolx was the raw device for a logical volume and thought maybe I should be using that, as lvolx would be for file systems only.

Thats just me getting mixed up, as the database will still read/write files in blocks and thus should use the lvolx block device not the rlvolx character device. I assume my database will dictate the block size used in the logical volume and not LVM?
Caesar_3
Esteemed Contributor

Re: Raw devices in LVM

Hello!

You should use the character device (lvolX)
If you ask question it's not stupid it's
because you want to know, it's very smart!

Caesar
Alan Shearer_1
Frequent Advisor

Re: Raw devices in LVM

Paula,

That was a typo [standard], I may have mixed my lvols and rlvols up for a moment, but I'm not about to start newfsing /stand!!

:-)
Geoff Wild
Honored Contributor

Re: Raw devices in LVM

lovlx

rlvolx is used for certain commands, like:

diskinfo
newfs

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.
Elena Leontieva
Esteemed Contributor

Re: Raw devices in LVM

The term "raw" logical volume refers to a logical volume that is NOT
used to store file system or swap space data.
Device files, also known as special files, represent the PHYSICAL device
(the actual disk drive space, in the case of a logical volume). There are
two types of device files: block or character (also known as raw). The block device is the used by hpux to create a file system. The raw device can then be used by the
application as needed.
Paula J Frazer-Campbell
Honored Contributor

Re: Raw devices in LVM

Alan

Working late?

Where are U based?

Paula
If you can spell SysAdmin then you is one - anon
A. Clay Stephenson
Acclaimed Contributor

Re: Raw devices in LVM

The correct answer is that "it depends". Do you want to use the buffer cache? In that case, use the block device nodes. If you want "raw" i/o and bypass the buffer cache then the character device nodes are the guys for you.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Raw devices in LVM

By the way, one nice technique is to use symbolic links for your data files. For example, you might use the name '/u01/oradata/user01.dbf' BUT you then do a symbolic link ln -s /dev/vg03/rlvol1 /u01/oradata/user01.dbf.

Using indirection like this will make it very easy to move data to another device (block or character) or even to a fully cooked file with absolutely no changes to the database itself.
If it ain't broke, I can fix that.
Alan Shearer_1
Frequent Advisor

Re: Raw devices in LVM

Hi Alan

Thats very interesting and a little different from what other people have said.

We are going to use async/io and do not want to use the buffer cache - we want to use the raw volumes for our database accesses through aio.

Does the block device always use the buffer cache then?

Do you think we need the character or raw device (rlvolx)?

Cheers.

Paula - yes I was working late up here in sunny Liverpool..but I went home before I got your reply!

Mike Fisher_5
Trusted Contributor

Re: Raw devices in LVM

Alan

Alan Shearer? Liverpool?
You wouldn't be in the Anfield area would you?

I understand that Beckham wants to become a SysAdmin too :)

No points please
Mike "Giggs is God" Fisher
Don't get mad - get naked
George_Dodds
Honored Contributor

Re: Raw devices in LVM

Nah, Shearer's from my home town :)
Alan Shearer_1
Frequent Advisor

Re: Raw devices in LVM

It could be worse - I could be called Phillip Neville!

:-)
Mike Fisher_5
Trusted Contributor

Re: Raw devices in LVM

George
Am I going bonkers?
Could've sworn he played for the 'pool at some point
Wasn't aware he was from the 'toon

Alan
You're right
PN is fit only for the knackers yard
If we sold him to a French team they'd eat him

Mike "PhD in International Diplomacy" Fisher
Don't get mad - get naked
Mike Fisher_5
Trusted Contributor

Re: Raw devices in LVM

George
Am I going bonkers?
Could've sworn he played for the 'pool at some point
Wasn't aware he was from the 'toon

Alan
You're right
PN is fit only for the knackers yard
If we sold him to a French team they'd eat him

Mike "PhD in International Diplomacy" Fisher
Don't get mad - get naked
Charles Holland
Trusted Contributor

Re: Raw devices in LVM

Alan,
If your database wants to access the information on the raw lvms you want to access through the "rlvol". I'm taking a guess that you are talking about Informix. If this is the case Informix prefers to control its own I/O to the tabels below. We are an Informix shop and A. Clays Stephensons answer is pretty much right on the mark.
We have symbolic links established to the rlvol that Informix follows to access the db.

ie..
sitting in
/informix/PRD/sapdata/physdev20
there is a link
data1 -> /dev/vg03/rPD32lvol1
which hits
crw-rw---- 1 informix informix 64 0x030013 Aug 4 2001 rPD32lvol01

BTW the PD is just the way we named the drives
so we could know they were PhysicalDisk32 etc..

Don't know if this helps or muddies the water.
"Not everything that can be counted counts, and not everything that counts can be counted" A. Einstein