Furthermore there is an additional problem: depending on the LV you may need more than one PP to increase the LV by 1 LP. These PPs may (depending on the setting of the "strictness" property) have to come from different PVs.
For instance, here is a (part of the) rootvg of one of my NIM-servers and the LV of the /usr filesystem:
Code:
nimserver:/root# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 4 8 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 12 24 2 open/syncd /
hd2 jfs2 26 52 2 open/syncd /usr
...
nimserver:/root# lsvg rootvg
VOLUME GROUP: rootvg VG IDENTIFIER: 00f6476900004c000000015cd4205282
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 1022 (261632 megabytes)
MAX LVs: 256 FREE PPs: 790 (202240 megabytes)
LVs: 19 USED PPs: 232 (59392 megabytes)
OPEN LVs: 18 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: no
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
DISK BLOCK SIZE: 512 CRITICAL VG: no
FS SYNC OPTION: no CRITICAL PVs: no
nimserver:/root# lslv hd2
LOGICAL VOLUME: hd2 VOLUME GROUP: rootvg
LV IDENTIFIER: 00f6476900004c000000015cd4205282.5 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs2 WRITE VERIFY: off
MAX LPs: 32512 PP SIZE: 256 megabyte(s)
COPIES: 2 SCHED POLICY: parallel
LPs: 26 PPs: 52
STALE PPs: 0 BB POLICY: relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: center UPPER BOUND: 32
MOUNT POINT: /usr LABEL: /usr
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
INFINITE RETRY: no PREFERRED READ: 0
If i would increase the /usr filesystem by 256MB (=1LP) the VG must have at least 2 PPs free and they have to come from different disks because of the strictness setting (marked bold). Your script would test only for 256MB (=1PP) being free. For instance, in both of the following cases:
Code:
nimserver:/root# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 511 1 1..0..0..0..0
hdisk2 active 511 0 0..0..0..0..0
nimserver:/root# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk1 active 511 20 10..0..0..0..10
hdisk2 active 511 0 0..0..0..0..0
The increase would fail but your script would not anticipate this problem.
Hi
I am doing a script like
if
then
echo "table name dosent exist"
exit
fi
the problem is if $table_name is null then i am getting the error
Please help me
Thanks in advance (2 Replies)
hi
i am trying to compare a value with value 50. but i am getting
"
I am using
if
then
echo "------------"
fi
please help
thanks in advance
Satya (2 Replies)
Im trying to fix my /etc/weekly that rotates various logs however it does them no matter what filesize they are and i want them to only do it if there file size exceeds 2M or something. So I'm playing with a script to get the filesize using a ls -l command which works and puts the value into a... (3 Replies)
Hello all, :confused:
I am not getting this error.
Pls help me.
./construct_operon.sh: line 5:
#!/bin/bash
# Construct Operons using gene pairs.
rm -rf operons_result
lines=`awk 'END {print NR}' ecoli_operons`
while ;
do
head -1 ecoli_operons | awk '{print $1"\n"$2}' > pattern
... (5 Replies)
Why am I getting this error.... #!/bin/sh
# iOS-Ad-Remover
# Marshall Ford @ marshallbford@gmail.com
# This project is hosted @ http://ios-ad-
# remover.sourceforge.net
# Under the GNU GPL open source license
clear
echo
if ; then echo "You need to be root to run this script."; exit 0; #... (24 Replies)
i=0
while
Shell script reports an error "unary operator expected" pointing the above line.
$i by default is 0 and holds integer value and $buf is also holding integer value.
Please can some one let me know what is missing.
Thanks. (1 Reply)
Hiya all,
Why do I get a :unary operator expected when I try to put a condition statement in my shell script (sh) like so and how to fix?
if ; then
echo "say hello"
else
echo "don't say hello"
fi
? It seems if the script receives an argument it works but if I don't put an... (4 Replies)
Hi
I have problem with my script.
I dont now why but i don't change anything and script stop working.
this is my code:
#!/bin/sh
for i in `ps -A | grep pocron.sh | grep -v grep | awk '{print $2}'`
do
COUNT=$((COUNT+1))
done
ostatnie_wykonanie=`cat porader.log`... (1 Reply)
In all my Googling, this usually happens when someone is comparing a variable, and that variable is unset. That doesn't appear to be the case for me...
#!/bin/bash -x
while read line
do
f=$(echo $line | tr -s ' ' | cut -d' ' -f 3)
echo $f
if
then
echo "This... (2 Replies)