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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create raw devices for a database

Status
Not open for further replies.

WiccaChic

Technical User
Jan 21, 2004
179
US
I have a 36 gig drive that I want to carve up into 2 gig raw devices (chunks) for a database to use. Does anyone know how to do this? My database documentation say see the os documentation, but what I have found is not as clear as it could be, or at least not to me.
 

Create a volume group or add the disk to a volume group and then create a logical volumes with sizes equal to 2GB. AIX looks at a logical volume as a raw disk device. Let me know if you need more information on how to do this.
 
If your partition size was 32MB then you could create a logical volume like this:

mklv -y'lv_ora' oraclevg 100

This would create the logical volume lv_ora with a size of 3.2GB (approx) in the volume group called oraclevg.

The above notation was correct, AIX uses a LV without a file system as a raw device.
 
Thanks guys. One question for uptodate - how does the lv get created with a size of 3.2GB? I dont see anything in your command that specifies that...is it a default or something?
 
The 100 in the mklv command is the number of partitions, and if you have 32MB partitions, then 100*32(MB)=3200(MB), or if the partitions in the vg were 16MB, then 100*16(MB)=1600(MB).
 
Heres a totally retarded question...where should I specify the partition size? Assuming I wanted to turn a 36 gig drive in to 2GIG chunks?
 
The partition size can be specified when you add the disk to a volume group. If you don't specify a size, I believe the default is to assign the smallest size possible for the size of the disk you are adding, or, if the VG already exists, the size of the physical partition that already exists for the volume group.
 
The partition size is defined when you create the volume group as shown below (PP SIZE):

lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 000b0f6db64b6ec2
VG STATE: active PP SIZE: 32 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1084 (34688 megabytes)
MAX LVs: 256 FREE PPs: 700 (22400 megabytes)
LVs: 10 USED PPs: 384 (12288 megabytes)
OPEN LVs: 9 QUORUM: 1
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32

Below is a conversion chart that removes “guess work”:

GB MB KB 512 byte blocks 4MB PP 8MB PP 16MB PP 32MB PP

0.125 128 131072 262144 32 16 8 4
0.25 256 262144 524288 64 32 16 8
0.375 384 393216 786432 96 48 24 12
0.5 512 524288 1048576 128 64 32 16
0.625 640 655360 1310720 160 80 40 20
0.75 768 786432 1572864 192 96 48 24
0.875 896 917504 1835008 224 112 56 28
1 1024 1048576 2097152 256 128 64 32
1.125 1152 1179648 2359296 288 144 72 36
1.25 1280 1310720 2621440 320 160 80 40
1.375 1408 1441792 2883584 352 176 88 44
1.5 1536 1572864 3145728 384 192 96 48
1.625 1664 1703936 3407872 416 208 104 52
1.75 1792 1835008 3670016 448 224 112 56
1.875 1920 1966080 3932160 480 240 120 60
2 2048 2097152 4194304 512 256 128 64
2.125 2176 2228224 4456448 544 272 136 68
2.25 2304 2359296 4718592 576 288 144 72
2.375 2432 2490368 4980736 608 304 152 76
2.5 2560 2621440 5242880 640 320 160 80
2.625 2688 2752512 5505024 672 336 168 84
2.75 2816 2883584 5767168 704 352 176 88
2.875 2944 3014656 6029312 736 368 184 92
3 3072 3145728 6291456 768 384 192 96
3.125 3200 3276800 6553600 800 400 200 100
3.25 3328 3407872 6815744 832 416 208 104
3.375 3456 3538944 7077888 864 432 216 108
3.5 3584 3670016 7340032 896 448 224 112
3.625 3712 3801088 7602176 928 464 232 116
3.75 3840 3932160 7864320 960 480 240 120
3.875 3968 4063232 8126464 992 496 248 124
4 4096 4194304 8388608 1024 512 256 128

 
The chart didn't convert very well... I have it in an excel ss, so I would say to copy it and paste it into an excel ss.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top