Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create raw device

Status
Not open for further replies.

zoufri75

Technical User
Mar 17, 2002
25
FR
i m new on solaris and i want to create raw device, how can i do it


momps001# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/rootvol 26750548 2014543 24468500 8% /
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/vx/dsk/var 4129290 176094 3911904 5% /var
swap 10308920 16 10308904 1% /var/run
swap 13843344 3534440 10308904 26% /tmp
/dev/vx/dsk/localdg/mom
2097152 1428552 626965 70% /mom
/dev/vx/dsk/localdg/output
10485760 3771969 6294244 38% /mom/output
/dev/vx/dsk/localdg/common
1048576 97584 891608 10% /mom/common
/dev/vx/dsk/localdg/home
1048576 132266 859100 14% /mom/common/home
/dev/vx/dsk/dataserver_dg/sybase
1048576 768306 262785 75% /mom/sybase


momps001# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62e830,0
1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62e1c3,0
2. c1t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62e8f2,0
3. c1t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62e9ee,0
4. c1t4d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62ed02,0
5. c1t5d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w21000004cf62e9ad,0



 
I see you are using Volume Manager. You can add another volume via the GUI or use this command:

/usr/sbin/vxassist -g (name of DiskGroup) make (name of vol) (size of vol) layout=nostripe (or however you want)

This will create a raw volume that can be used by any application like your Sybase that is running. For Sybase you may also have to label the volume with the owner of said application. Here is an example of a script I use to create volumes for our Sybase disks.

for x in 01 02 03 04 05 06 07 08 09 10
do
/usr/sbin/vxassist -g raw_data_p_dg make prod_data_${x}_vol 2g layout=nostripe
sleep 2
/usr/sbin/vxedit -g raw_data_p_dg set user=&quot;sybase&quot; prod_data_${x}_vol
/usr/sbin/vxedit -g raw_data_p_dg set group=&quot;sybase&quot; prod_data_${x}_vol
/usr/sbin/vxedit -g raw_data_p_dg set mode=&quot;0660&quot; prod_data_${x}_vol
sleep 2
done


On a system which you do not have Volume manager installed, however, you will have to be careful to not create a raw volume that has the first cylinder of a disk in use as Sybase will overwrite the label and make your slice useless. You would use format instead and create a manual slice and then chown the device name.

Hope this helps. I don't always keep up with these forums, so if you have a question you might want to mail me.
 
To make raw volumes you should also specify -U gen (generic usage) on the command line so that VM doesn't attempt to repair a filesystem on them, and possibly also user=oracle group=dba, for example, if it's for a database so that the devices are owned by an appropriate user. Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top