1751851 Members
5237 Online
108782 Solutions
New Discussion юеВ

creating raw device

 
SOLVED
Go to solution
Manix
Honored Contributor

Re: creating raw device

If you are doing from scratch you need to
create a VG then a lvol.

If there is a VG with space ( better to use
no vg00 -boot vg) then a single command
will do ( lvcreate ),yes it`s always build
under /dev only.

Example: Creating a Logical Volume Using HP-UX Commands
To create a logical volume:

1.Select one or more disks. ioscan(1M) shows the disks attached to the system and their device file names.
2. Initialize each disk as an LVM disk by using the pvcreate command. For example, enter
pvcreate /dev/rdsk/c0t0d0

Note that using pvcreate will result in the loss of any existing data currently on the physical volume.

You use the character device file for the disk.

Once a disk is initialized, it is called a physical volume.
3.Pool the physical volumes into a volume group. To complete this step:

1. Create a directory for the volume group. For example:
mkdir /dev/vgnn

2.Create a device file named group in the above directory with the mknod command.

mknod /dev/vgnn/group c 64 0xNN0000

The c following the device file name specifies that group is a character device file.
The 64 is the major number for the group device file; it will always be 64.

The 0xNN0000 is the minor number for the group file in hexadecimal. Note that each particular NN must be a unique number across all volume groups.

For more information on mknod, see mknod(1M); for more information on major numbers and minor numbers, see Configuring HP-UX for Peripherals.


3.Create the volume group specifying each physical volume to be included using vgcreate. For example:

vgcreate /dev/vgnn /dev/dsk/c0t0d0
Use the block device file to include each disk in your volume group. You can assign all the physical volumes to the volume group with one command. No physical volume can already be part of an existing volume group.

4.Once you have created a volume group, you can now create a logical volume using lvcreate. For example:

lvcreate -n name -M size /dev/vgnn
lvol would be /dev/vgnn/rlvolX

you may attach output for "vdisplay -v"
in the thread if there are doubts & how much
space you needs.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
bitou
Frequent Advisor

Re: creating raw device

thanks a lot Manix.
but from yr reply i think it is not possible to create a raw device in /dev. it should be in /dev/vg00.
another thing: how can i mount a raw device from SAM.

i am using the SAM and not the command line>
Manix
Honored Contributor
Solution

Re: creating raw device

No I meant to say that ,it`s good to use some other VG apart from VG00 for raw devices or applications ( this is for booting).

In Unix every device file is under /dev like
/dev/vg_name & /dev/vg_name/rlvol_name.

better read lvm basics to start with !!

Secondly you don`t have to mount the raw device ,it`s cant be mounted directly as it don`t have file system on top of it ,it`s taken care by data base utility like ASM for Oracle & else.

Better just create a lvol & let the DBA or Oracle take care of the rest !!

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Manix
Honored Contributor
Ismail Azad
Esteemed Contributor

Re: creating raw device

Hi bitou,

> but my question it is possible to create in /dev? or it should be in /dev/vg00?

A logical volume device file will always tell you which volume group it belongs to as the naming is /dev/vgname/lvname and hence you do not have LV names directly in /dev . If your volume group name is vgora then your lv device files would be /dev/vgora/test for block and /dev/vgora/rtest for the character device files. It is important to know how the entities PV, VG and LV are identified via device files to configure the things you are trying to do.

A P.V device file would be
/dev/disk/disk10
/dev/rdisk/disk10

A V.G has only character_device_files
/dev/vgora

A L.V has both character and block device files...

/dev/vgora/test
/dev/vgora/rtest

Every entity is referenced via these special files in terms of configuration.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Ismail Azad
Esteemed Contributor

Re: creating raw device

Hi,

> Manix,
You have again typed...
lvcreate -n name -M size /dev/vgnn.

Am I missing something with this -M option?? AFAIK -M stands for the mwc flag!. It should be -L right?, because I will be surprised if the option has changed on a higher LVM version!

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
Manix
Honored Contributor

Re: creating raw device

Thanks Ismail !! yes -L ,looks i am too obsessed with the size in Mbs (M) & does that typo !!

You are correct ..lvcreate -n name -L size_mbs
/dev/vgxx is the syntax.

Thanks
Manix
HP-UX been always lovable - Mani Kalra