cancel
Showing results for 
Search instead for 
Did you mean: 

creating raw device

SOLVED
Go to solution
bitou
Frequent Advisor

creating raw device

hi,
i need yr help to solve my problem:
I am interested to create a raw device from sam which start with "r" and created in /dev directory
for example:
test/rtest (test logical and rtest raw device)
how can i create this raw device, can y tell me the steps.
16 REPLIES
Kenan Erdey
Honored Contributor

Re: creating raw device

Hi,

you will create logical volume from sam. it will create device file with starting r also.

or you can use lvcreate command.
Computers have lots of memory but no imagination
Manix
Honored Contributor

Re: creating raw device

Lvol is RAW till you run "newfs" to create file systems.

You may use the raw volumes /dev/vg_name/rlvolXX for data-bases or else.

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

Re: creating raw device

hi,
thanks for yr reply, my target is to install a database oh HPUX system.
But I don't know how to create a raw device and if it is necessary to mount this logical device?
i hope to help me to create a raw device and to tell me the steps:
for example:
create a raw
logs/rlogs should be in /dev

i appreciate yr help but i need the steps
Manix
Honored Contributor

Re: creating raw device

you need to run the command to create lvol
which lies in a volume group.

lvcreate -n -M /dev/vg_name

Check if there is VG with free space with command vgdisplay -v.

You needs to describe what setup you have ,you
want to create things from scratch or you have
a VG ?
HP-UX been always lovable - Mani Kalra
bitou
Frequent Advisor

Re: creating raw device

thanks Manix,
in reality, i have to install a database but the prerequisites is:
1-create a logical volumes
logs
2-it should be created in /dev
logs/rlogs
and we are interested in raw devices which sorts with r

how can y explain this method and do i have an idea how can we create this raw device in hpux ???
Kenan Erdey
Honored Contributor

Re: creating raw device

Hi,

if you create logical volumes as explained above(i.e. /dev/vgoracle/test), raw devices starting with r(dev/vgoracle/rtest), will also be created automatically.
Computers have lots of memory but no imagination
bitou
Frequent Advisor

Re: creating raw device

thanks a lot for yr response Kenan.
another question plz it is possible to create the raw device in /dev ???? or it should be in /dev/vg00?
and if it is possible: the method to create raw device from SAM is
1-mkdir log in /dev
2-sam-device-logical volume-choose raw device and i fix the mount to /dev/logs
it is true the steps and the mount
Ismail Azad
Esteemed Contributor

Re: creating raw device

Hi,

The lvcreate command creates the directories both raw and block device files in /dev on the firing of the command lvcreate and I guess there is a typo error in manix's post, the -M would be -L { -M stands for the mwc flag and -L sets the size}...

lvcreate -L -n test vg03

The execution of this command will create two device files, /dev/vg03/test and /dev/vg03/rtest automatically and you should be getting the message on stdout on the successful execution of the command and the size that is required has to be planned accordingly.

I assume you have a PV and VG already created?

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....
bitou
Frequent Advisor

Re: creating raw device

thanks for yr reply Ismail.
but my question it is possible to create in /dev? or it should be in /dev/vg00?
2- and concerning the mount point how can i do this operation, i am using SAM and not command line.
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