Operating System - HP-UX
1753473 Members
4747 Online
108794 Solutions
New Discussion юеВ

it is supported to mirror raw device ?

 
Jo├лl Techer
Advisor

it is supported to mirror raw device ?

hi,

i wonder what is the result of mirroring raw device,
I've already searched any doc but i 've haven't found a lot

i did a simple test
*i had created one VG with two pv (PVG)
lvcreate + lvextend :

the following syntax is not allowed for raw device:
lvextend -m 1 /dev/vg01/lvtest /dev/rdsk/cxtxtz

the command works fine with device in block mode:
lvextend -m 1 /dev/vg01/lvtest /dev/dsk/cxtxtz


1) i don't know if my data are really the same
because mirroring raw device with disk in block mode ... ???? I've found anything about it

2) it is supported ?


the only thing i know is that raw device allow to not use buffer cache to access data faster


thank you in advance.

Jean-Louis
5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: it is supported to mirror raw device ?

/usr/sbin/lvextend -m mirror_copies} lv_path [pv_path ... ]

See the man page:

pv_path The block device path name of a physical volume.

This is the rule.

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!   
Aneesh Mohan
Honored Contributor

Re: it is supported to mirror raw device ?

Hi ,

DO lvsplit and confirm the data ...


Aneesh
Matti_Kurkela
Honored Contributor

Re: it is supported to mirror raw device ?

Note that each LV always has its own raw device.
For example, your /dev/vg01/lvtest has a matching /dev/vg01/rlvtest for raw access.

The "block" and "raw" device entries are just different access methods for the same areas of disk. The first uses the buffer cache and makes some assumptions to try to optimize the data access for typical filesystem use cases. The second is for efficient implementation of applications that have non-filesystem-like data access patterns. The assumption here is that the application is smart enough to do its own caching, if needed.

The lvextend command always requires you to specify the block device(s), because of the way the command is designed. However, once you've extended the lvol, the new capacity is available through the raw lvol device too.

If your application stores its data using the /dev/vg01/rlvtest device, mirroring should work just fine. This is supported.

BUT if you're configured your application to use /dev/rdsk/cxtxdz style devices, you've already bypassed the LVM layer that does the mirroring. If you establish the mirror and keep using /dev/rdsk/cxtxdz, you're effectively corrupting one half of the mirror.

MK
MK
Jo├лl Techer
Advisor

Re: it is supported to mirror raw device ?

thank you all for your response.


Best regards
Jo├лl Techer
Advisor

Re: it is supported to mirror raw device ?

thank you