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

Second Opinion pls

Status
Not open for further replies.

KOG

MIS
Jan 31, 2002
303
GB
Hi Folks,

I have removed the backup from VG so that I can reset the PP sizes. I have already created oracledata vg with PP size 64mb (mistake). Now I plan to add 9gb PV to BACKUP vg and I would like to check if the steps I plan to do is right.

1. As this is considered as BIG disk, am I right in thinking every PV has max no of 1016 PP so therefore 9000/1016 gives me approx 8mb PP (for optimise PP size and to economise space allocation).
Command to do that is mkvg -s 8 t 2 backup hdisk3 (???)

Is this right, and the max of LVS will show up on lsvg backup, this will help me to determine the size of LV? Is that right? Or is it possible to create large filesystem within backup without having to create LV?

Thanking you all in advance.

Katherine
 
Katherine,

You are correct 1016 * PP size = max size of disk that can be added into the VG. But as you know factoring can get around that problem.

Are you creating a BACKUP VG volume group or adding a PV into it?

If you are creating one :

mkvg -s 8 -t 2 -y backupvg hdisk3

If you adding one to a vg:

chvg -t 2 backupvg

extendvg backupvg hdisk3

I am not sure what you are getting at in relation to the MAX LV's and working out sizes??, Maximum number of LV's will be 256. In terms of large file enabled JFS you need to blow away the old filesystem and LV and re-create it, if it needs to support files greater than 2GB.

Cheers

PSD
IBM Certified Specialist - AIX V4.3 Systems Support
IBM Certified Specialist - AIX V4 HACMP
 
Hi PSD

I am just not too sure how to create LV using the info from backup vg, all I know that PP is now 8mb and the total of PP is 1084.

I would like just to create on LV and one largefilesystem called /backup.

# lspv hdisk3
PHYSICAL VOLUME: hdisk3 VOLUME GROUP: backup
PV IDENTIFIER: 00016001a8d88a2b VG IDENTIFIER 0001600138ed1cb9
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 8 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 1084 (8672 megabytes) VG DESCRIPTORS: 2
FREE PPs: 1084 (8672 megabytes)
USED PPs: 0 (0 megabytes)
FREE DISTRIBUTION: 217..217..216..217..217
USED DISTRIBUTION: 00..00..00..00.


Add a Logical Volume

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP] [Entry Fields]
Logical volume NAME []
* VOLUME GROUP name backup
* Number of LOGICAL PARTITIONS [] #
PHYSICAL VOLUME names [] +
Logical volume TYPE []
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [] #
to use for allocation
Number of COPIES of each logical 1 +
partition
Mirror Write Consistency? yes +
Allocate each logical partition copy yes +
[MORE...11]

I can follow what entries request but I do not understand what * Number of LOGICAL PARTITIONS means? Where and how do I calculate the value?

Am I right in thinking to create a large filesystem, I add 8(PPsize) * 1000 (total PP for the mo) * 512 (to give kb)?

So therefore 8*1000*512 is the 4096000?

Thanking you in advance.

Cheers

Katherine
 
If all you want to do is create one LV/filesystem on backupvg, that's easy.

Do an "lsvg backupvg" and note the number of "Free PPs". Subtract one from that number.

Next, [tt]mklv -y a_logical_volume_name backupvg free_pp_count_minus_one[/tt]

Assuming you want the filesystem large-file-enabled:

[tt]crfs -v jfs -m /mountpoint -d a_logical_volume_name -A y -a bf=true[/tt]

If you don't want it large-file-enabled (support for files over 2G), leave off the "-a bf=true". The "-A y" option specifies that the filesystem is to be mounted when the system boots up.

You have to leave one PP/LP free when you do this - there *has* to be one free for the system to create a jfslog partition - a volume group that contains any jfs filesystems has to have at least one jfslog.
 
Hello again,

This answers exactly all my questions, many thanks

Cheers

Katherine
 
Hi folks,

I have three PVs on oracledata vg and one LV (LV00) with /opt filesystem. Now the problem is all the oracle datafiles are stored within that filesystem and logical volume. This filesystem is now nearly 100% full and I do not like the way it is configured. The plan is to create TWO more LVs, one on each disk (hdisk1 and hdisk4). Again I am having problems trying to understand how to create specific logical volume for each disk using the space available (use up to 3/4 space available on each disk).

When using LVM smitty, I choose option to add logical volume then

Logical volume NAME [lv02]
* VOLUME GROUP name oracledata
* Number of LOGICAL PARTITIONS [] #
PHYSICAL VOLUME names [hdisk1] +
Logical volume TYPE [jfs]
POSITION on physical volume middle +
RANGE of physical volumes minimum +
MAXIMUM NUMBER of PHYSICAL VOLUMES [] #
to use for allocation
Number of COPIES of each logical 1 +
partition
Mirror Write Consistency? yes +
Allocate each logical partition copy yes

I am ok with the rest of entries but it is

Number of LOGICAL PARTITIONS []

that I do not understand, how and where do I get the value for it. How do you calcuate the value of logical partitions using data from lspv hdiskx?


$ lsvg oracledata
VOLUME GROUP: oracledata VG IDENTIFIER: 000160016f674e9d
VG STATE: active PP SIZE: 64 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 405 (25920 megabytes)
MAX LVs: 256 FREE PPs: 251 (16064 megabytes)
LVs: 2 USED PPs: 154 (9856 megabytes)
OPEN LVs: 2 QUORUM: 2
TOTAL PVs: 3 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 3 AUTO ON: yes
MAX PPs per PV: 2032 MAX PVs: 16

$ lspv hdisk1
PHYSICAL VOLUME: hdisk1 VOLUME GROUP: oracledata
PV IDENTIFIER: 00016001e0441e02 VG IDENTIFIER 000160016f674e9d
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 64 megabyte(s) LOGICAL VOLUMES: 2
TOTAL PPs: 135 (8640 megabytes) VG DESCRIPTORS: 1
FREE PPs: 116 (7424 megabytes)
USED PPs: 19 (1216 megabytes)
FREE DISTRIBUTION: 27..08..27..27..27
USED DISTRIBUTION: 00..19..00..00..00

$ lspv hdisk2
PHYSICAL VOLUME: hdisk2 VOLUME GROUP: oracledata
PV IDENTIFIER: 000160016f32d004 VG IDENTIFIER 000160016f674e9d
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 64 megabyte(s) LOGICAL VOLUMES: 1
TOTAL PPs: 135 (8640 megabytes) VG DESCRIPTORS: 1
FREE PPs: 0 (0 megabytes)
USED PPs: 135 (8640 megabytes)
FREE DISTRIBUTION: 00..00..00..00..00
USED DISTRIBUTION: 27..27..27..27..27

$ lspv hdisk4
PHYSICAL VOLUME: hdisk4 VOLUME GROUP: oracledata
PV IDENTIFIER: 00016001145eb54e VG IDENTIFIER 000160016f674e9d
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 64 megabyte(s) LOGICAL VOLUMES: 0
TOTAL PPs: 135 (8640 megabytes) VG DESCRIPTORS: 1
FREE PPs: 135 (8640 megabytes)
USED PPs: 0 (0 megabytes)
FREE DISTRIBUTION: 27..27..27..27..27
USED DISTRIBUTION: 00..00..00..00..00

$ lslv lv00
LOGICAL VOLUME: lv00 VOLUME GROUP: oracledata
LV IDENTIFIER: 000160016f674e9d.2 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 512 PP SIZE: 64 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 153 PPs: 153
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 32
MOUNT POINT: /opt LABEL: /opt
MIRROR WRITE CONSISTENCY: on
EACH LP COPY ON A SEPARATE PV ?: yes

Thanking you all in advance.

Regards

Katherine

 
Your PP size will be determined by the vg itself. For your oracledata they are 64MB each. So if you wanted to make a new lv that was 640MB, just to keep it simple, you would use 10 PP. After you created the lv you could use the smit option to create a fs on top of it and it would fill up the lv without you having to calculate anything further. In your case, just divide your target MB by 64 and you will get a number of PP to use when creating the lv.

I realize that you were having some trouble with that particular thing not too long ago, but try it again. IBM Certified -- AIX 4.3 Obfuscation
 
If I am reading you correctly you want to use the remaining space on a disk for a logical volume. I would do:

`mklv -y'new_lv' hdisk1 xx (where xx is the remaining LPs on the disk)`

Then go into smitty and create a new filesystem on a previously defined logical volume. This will use the entire space of the LV for the new filesystem and you don't have to find the correct size.
 
Hi,

So if I wish to create a LV01 on hdisk4 which has 8640 mb space free (PP is 64mb), then I can select 8000 of that free space and divide it by 64 which gives me 125 LPs?

Number of LOGICAL PARTITIONS [125] (is that correct?)

Is that correct?

Cheers

Katherine
 
Sounds good to me, and it divides evenly, although it does not have to. If you are not sure you can always start low and extend the fs later.

chfs -a size=+1 /my/filesystem

This command says to increase /my/filesystem by one 512-kilobyte block. That won't happen because it must add a whole PP, so that command would actually increase your fs by 64MB. Increasing a fs will automatically increase the lv beneath it, if possible.

Specify a number without the '+' to request an absolute size. It will still be rounded up to the nearest PP and it won't let you use a number smaller than the current size. Remember that you are giving the number of 512-byte blocks, so multiply your desired kilobytes by two.

Confused yet? =) IBM Certified -- AIX 4.3 Obfuscation
 
Hi Yelo,

No I am clear we have same concept with the datafiles in oracle, you can set it to autoextend which means when it fills up the next extend can be increased.

Many thanks for the wonderful tip.

Regards

Katherine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top