Solved

Creating more space on a filesystem

Posted on 2009-05-13
31
1,203 Views
Last Modified: 2013-11-17
I have a directory/filesystem which is /data/db2 that is at 56 GB.  I know we have about 25 GB of space available on the server.  I need to extend /data/db2 to 76 GB, but when I extend it through SMIT it gives me the following error:

  COMMAND STATUS
Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
0516-787 extendlv: Maximum allocation for logical volume fslv01
        is 1024.

Please help me, thanks!

0
Comment
Question by:AIX25
  • 16
  • 15
31 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24375854
Hi again,
the message means that the logical volume fslv01 is limited to 1024 logical partitions.
You can increase that number easily by issuing (4096 is only a suggestion from my side, choose at wish) -
chlv -x 4096 fslv01
This limit is only a precaution against inadvertent changes to an LV.
Please check that the available space "on the server" is actually available to the VG in question by issuing 'lsvg vgname' and looking at the line containing "FREE PPs".
Cheers
wmp
 

0
 

Author Comment

by:AIX25
ID: 24376111
# lsvg datavg
VOLUME GROUP:       datavg                   VG IDENTIFIER:  000217c70000d60000000114fac61ee2
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3276 (209664 megabytes)
MAX LVs:            256                      FREE PPs:       482 (30848 megabytes)
LVs:                6                        USED PPs:       2794 (178816 megabytes)
OPEN LVs:           6                        QUORUM:         2 (Enabled)
TOTAL PVs:          3                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         3                        AUTO ON:        yes
MAX PPs per VG:     2097152                  MAX PVs:        1024
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

# lsfs /data/db2
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/fslv01     --         /data/db2              jfs2  117440512 rw         yes  no

**What will be the max space I will be able to allocate to /data/db2?? Any other outputs you need?
0
 

Author Comment

by:AIX25
ID: 24376493
Now I have this error:

 COMMAND STATUS

Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.

0516-404 allocp: This system cannot fulfill the allocation request.
        There are not enough free partitions or not enough physical volumes
        to keep strictness and satisfy allocation requests.  The command
        should be retried with different allocation characteristics.

0
 

Author Comment

by:AIX25
ID: 24376877
# lslv fslv01
LOGICAL VOLUME:     fslv01                 VOLUME GROUP:   datavg
LV IDENTIFIER:      000217c70000d60000000114fac61ee2.2 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            4096                   PP SIZE:        64 megabyte(s)
COPIES:             2                      SCHED POLICY:   parallel
LPs:                896                    PPs:            1792
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        /data/db2              LABEL:          /data/db2
MIRROR WRITE CONSISTENCY: on/ACTIVE                              
EACH LP COPY ON A SEPARATE PV ?: yes                                    
Serialize IO ?:     NO                                    
DEVICESUBTYPE : DS_LVZ
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 24377290
We're getting closer ...

First thing, in our context the output of 'lsfs' is nearly useless.

You should always issue 'lslv lvname' against the filesystem's underlying logical volume, in your case it's fslv01.
You can find out the name of the LV belonging to a given filesystem by either issuing
'mount' (if it's mounted) and looking at the second and third columns, or by issuing
'lsvg -l vgname' and looking at the first and last columns.

To answer your first question, you have roundabout 30 GB of free space in your VG (as seen beneath 'FREE PPs'),
so you could extend the filesystem by that amount, unless the logical volume was mirrored. In that case you have only half of the amount (if 2 copies) or a third (if three copies) at your disposal.

There are two limits which can be set at creation time of the LV.
They are meant to protect an FS from accidentally being increased too much by an admin (maybe by typing 'GB' instead of 'MB')

The first limit is 'MAX LPs' for 'Maximum Logical Partitions'. This limit was the cause of your first error, we raised it by issuing
chlv -x new_max_lps lvname.

The second limit is 'UPPER BOUND' for 'Maximum Number of Physical Volumes'.
This might be the cause of your second error. Since your VG consists of three Physical Volumes, you can set the Upper Bound to that value by issuing
chlv -u 3 fslv01

If this doesn't help either, I strongly assume hat the LV fslv01 is mirrored.
As I wrote, if there is one mirror (= 2 copies exist) you have 15 GB to increase the FS, if there are two mirrors (= 3 copies exist) you only have 10 GB.

To be sure, please post the output of 'lslv fslv01' and 'lsvg -l datavg'

I will then explain what conclusions you can draw from that information.

À bientôt

wmp


0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24377372
OK,
you posted the right thing while I was still typing. Good job!

As you can see, MAX LPs is now 4096 -> the result of our chlv ... thing -> OK
Upper bound is OK -> 1024 is quite a huge value, but no problem.

Most important, you can see that the LV is mirrored (-> COPIES: 2).
So you could increase your FS by max 15 GB only!
Should you need more space, you will have to shrink one of the other FSs, or add an new disk to the VG.

Good luck!

wmp


0
 

Author Comment

by:AIX25
ID: 24377698
Here are the new outputs:

# lslv fslv01
LOGICAL VOLUME:     fslv01                 VOLUME GROUP:   datavg
LV IDENTIFIER:      000217c70000d60000000114fac61ee2.2 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            4096                   PP SIZE:        64 megabyte(s)
COPIES:             2                      SCHED POLICY:   parallel
LPs:                896                    PPs:            1792
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    3
MOUNT POINT:        /data/db2              LABEL:          /data/db2
MIRROR WRITE CONSISTENCY: on/ACTIVE                              
EACH LP COPY ON A SEPARATE PV ?: yes                                    
Serialize IO ?:     NO                                    
DEVICESUBTYPE : DS_LVZ
                                       
# lsvg -l datavg
datavg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
loglv00             jfs2log    1       2       2    open/syncd    N/A
fslv01              jfs2       896     1792    2    open/syncd    /data/db2
fslv03              jfs2       240     240     1    open/syncd    /data/db2/backup
fslv04              jfs2       96      192     2    open/syncd    /data/db2/archive
fslv06              jfs2       160     160     1    open/syncd    /data/db2/staging
fslv07              jfs2       96      192     2    open/syncd    /dssddt1

# lsvg datavg
VOLUME GROUP:       datavg                   VG IDENTIFIER:  000217c70000d60000000114fac61ee2
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3276 (209664 megabytes)
MAX LVs:            256                      FREE PPs:       698 (44672 megabytes)
LVs:                6                        USED PPs:       2578 (164992 megabytes)
OPEN LVs:           6                        QUORUM:         2 (Enabled)
TOTAL PVs:          3                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         3                        AUTO ON:        yes
MAX PPs per VG:     2097152                  MAX PVs:        1024
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

**Still getting an error...here is the output:
 COMMAND STATUS
Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.

0516-404 allocp: This system cannot fulfill the allocation request.
        There are not enough free partitions or not enough physical volumes
        to keep strictness and satisfy allocation requests.  The command
        should be retried with different allocation characteristics.

Do you know what I should do?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24377714
That's what one would call 'Asynchronous Communication'
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 24377976
To put it together:

The logical volume is mirrored.
You have 698 physical partitions available (=  44 GB) Where do the new 216 PPs come from?
When you increase the LV, for each logical partition two physical partitions are needed (mirroring!)
So you can increase the FS by 349 Logical partitions (= 698 physical)
This gives 22.336 MB (349 * 64) or roundabout 21 GB.

chfs -a size=+21G /data/db2    OR
chfs -a size=+22336M /data/db2   <- this will fill up the VG to the brim.

Hope this helps, but don't hesitate to ask, should there be further questions.

One remark: You did the chlv -u 3 ... thing, as I suggested. Should you plan to add one or more disks to the VG, don't forget to increase the Upper Bound accordingly, e.g. for two new disks: chlv -u 5 fslv01

wmp
0
 

Author Comment

by:AIX25
ID: 24379275
Yes, asynchronous! I knew what you outputs you needed before you wanted it lol jk.

I shrunk other filesystems to get the extra 216 PPs.  Our server is mirrored.  Also, I did run chlv -u 3.  

I ran chfs -a size=+21G /data/db2    and I still get the following error:
# chfs -a size=+21G /data/db2
0516-404 allocp: This system cannot fulfill the allocation request.
        There are not enough free partitions or not enough physical volumes
        to keep strictness and satisfy allocation requests.  The command
        should be retried with different allocation characteristics.

Why is this so complicated to add some space to a filesystem? Do you know what I can do next to get this?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24379430
Yep,
I can imagine what's going on.
You have set Strict Allocation Policy ("EACH LP COPY ON A SEPARATE PV").
So it might well be that not all free partitions are usable for the LV in question.
The problem is that, when using all partitions, some copies would have to be placed on the same disk,
which is forbidden by the "strict" policy - and this is what makes it complicated: you have an uneven number of hdisks in the VG, and additionally not all LVs are mirrored.

To judge how many partitions you can use, I need the output of
lslv -l fslv01   AND
lsvg -p datavg

Would you mind posting it in the next 2 hours or so?
Tomorrow I will be on a business trip and thus will not be able to work for you.
And - I'm in ol'Europe here and by some degree it's getting late for me.


wmp



0
 

Author Comment

by:AIX25
ID: 24379467
# lslv -l fslv01
fslv01:/data/db2
PV                COPIES        IN BAND       DISTRIBUTION  
hdisk1            896:000:000   24%           152:217:218:121:188
hdisk3            896:000:000   24%           072:217:218:200:189

# lsvg -p datavg
datavg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk1            active            1092        3           00..00..00..02..01
hdisk3            active            1092        3           00..00..00..02..01
hdisk2            active            1092        692         219..58..170..26..219

I posted it...hopefully you can get to when you can..thank you
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 24379703
OK,
you're somewhat lost!

There are only three partitions (192 MB) left to be used without violating the allocation policy.
Sad to say, but since fslv01 is the only LV to occupy hdisk1 and hdisk3 we can't move anything to hdisk2
to make room.

It's a good practice to apply 'strict' policy, and if you don't want to revoke it, the only way out of your dilemma is adding two (!) hdisks.

I don't recommend it, but if you are in a real emergency you can revoke 'strict'  by issuing
chlv -s no fslv01

Background: One reason for mirroring is, among others, to protect your data against hardware failure.
Without 'strict' it can easily happen that a logical partition and its mirror get placed on the same harddisk.
In case of a failure of that disk both copies would be gone, the LV would become unusable.

Again, sad to say, but now it's up to you to decide what to do.

I'll stay tuned to hear what you're going to do!

wmp





0
 

Author Comment

by:AIX25
ID: 24379778
So what do I do with the 40 some odd free GB on my server?
0
 

Author Comment

by:AIX25
ID: 24379794
Also, I have 5 hdisks.

# lspv
hdisk1          000217c704bf6df0                    datavg          active
hdisk2          000217c7c2e3387d                    datavg          active
hdisk3          000217c704bea167                    datavg          active
hdisk0          000217c704b5d9bb                    rootvg          active
hdisk4          000217c76fe64a3a                    rootvg          active
#
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24379923
hdisk0 and hdisk4 are occupied by rootvg and don't count.

40 GB free? You are mirroring, which easily turns 40 GB into 20 GB.

What to do? If you add a new hdisk (only one would be enough for this scenario) you could take those 40 GB and mirror
them to 40 GB of the new disk, by extending fslv01 to it. To let fslv01 grow for more than 40 GB you will need two hdisks, however.

Or, you can use those 40 GB to let grow the unmirrored LVs fslv03 and fslv06.

What about the 'no strict' option?

wmp

0
 

Author Comment

by:AIX25
ID: 24379966
I can't have the no strict policy because of the type of security environment we are in.  Can you help me with the steps to create a new hdisk and point it to fslv01.  THe first scenario is perfect bc that is the max will need right now as far as space.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 500 total points
ID: 24380100
I surely can't help you with the first step, which is to get a new physical disk! Do you have one at hand?
If yes, attach it to your server, issue 'cfgmgr', the rest is only an 'extendvg' and a somewhat 'crafted' extendlv command:
extendvg datavg hdisk5   <- probably hdisk5, issue 'lspv' before to verify.
extendlv -u 5 -s y fslv01 692 hdisk2 hdisk5  <- 692 is the absolute maximum, maybe you should leave 100 partitions or so for possible future emergencies.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24380344
OK then, good bye for now, CU friday.

Cheers

wmp



0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24382444
... one last step, which I forgot to write down yesterday: Of course we need to extend the filesystem onto the new space in the logical volume.

- check how big the LV and the FS are now:

lsfs -q /data/db2   <- This is one of the few moments where you need lsfs

The first two values are of interest. The lv size (first value) should be greater than the fs size (second value), due to our 'extendlv'

We note the lv size and adjust the fs size with

chfs -a size=[lv size] /data/db2    <- no '+' sign, no 'M' or 'G' !

A new check using the 'lsfs' above should give equal values for lv size and fs size.

Done.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24395063
OK, I'm back. Something new?
wmp
 
0
 

Author Comment

by:AIX25
ID: 24413769
output:
# lsfs -q /data/db2
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/fslv01     --         /data/db2              jfs2  117571584 rw         yes  no
  (lv size: 117571584, fs size: 117571584, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: no)
#

What is the worst that can happen if I take off the "strict" policy??
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24414021
Hi again,
well, the lsfs shows the situation as it was before. What I wanted to tell you in my comment was that you need an additional step after installing a new harddisk and after issuing 'extendvg' and 'extendlv', namely a 'chfs' with the parameter obtained from 'lsfs'.

I guess you don't have the possibility to add a new harddisk right now?

You're right in assuming that removing 'strict' would be the only option in that case.

What can happen without strict? As I wrote above -
The additional  logical partitions and their mirrors will get placed on the same harddisk hdisk2.
In case of a failure of that disk both copies would be gone, the LV/FS would become unusable.

Anyway, the appropriate commands would be:
chlv -s no fslv01
chfs -a size=+21G /data/db2    ORchfs -a size=+22336M /data/db2   <- this will fill up the VG to the brim.

wmp



0
 

Author Comment

by:AIX25
ID: 24414053
What will "chlv -s no fslv01" do?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24414139
-s is the option to control the allocation policy.

Possible parameters are:  
n(o), y(es) and s(uperstrict).

(btw. so its 'chlv -s n fslv01', not '-s no', sorry for that mistake).

From IBM's docs:

n Does not set a strict allocation policy, so copies of a
                   logical partition can share the same physical volume.

0
 

Author Comment

by:AIX25
ID: 24414234
Unfortunately, I can't get a new harddisk now.

* So what I am understanding.  When I take off strict policy and the hardisk was to crash.  I will lose everything on there? Or just the new portion I added?  Also, we have netbackup which is backed up everyday.  Will that make things easy to recover?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24414487
Unfortunately, not only the new portion but the entire logical volume and thus the /data/db2 filesystem will be lost. And, the unmirrored filesystems /data/db2/backup and /data/db2/staging with it, but that's the same situation as today.

Recovery is just the same thing as before. Of course you need enough space to recover onto, so at last in case of a disk crash you will need a new one.
0
 

Author Comment

by:AIX25
ID: 24414877
Our backups are on tapes.  If a disk crashes and we order a new one and install it.  Will I be able to use our tapes to recover.  Or I will lose everything on that hardisk?  I just dont know what to do with this situation. If I should take off the restrict policy or not? I am contemplating a crash of the harddisk.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24415176
The LVM (= Logical Volume Manager) layer is transparent to applications.
Any application will only see filesystem data, regardless of whether this filesystem is spread over several disks or whether its underlying logical volume is mirrored or not. NetBackup is an application just as any other software, it reads and writes file data, since you don't work with raw volumes.
So, in case of a crash, you need to install a new harddisk and to rebuild the logical volumes and filesystems that had been placed on the crashed one. It doesn't matter whether the filesystems in question had been placed there fully or partially, they are gone as a whole.
As long as you keep the size and the mount points consistent, NetBackup will then be able to write the data contained on its tapes back to the filesystems.

I must say, however, that I'm not a true NetBackup expert. But I guess, in case of a recovery there will be enough people around here to help us.
0
 

Author Comment

by:AIX25
ID: 24484421
Woolmilkporc, we are going to go down another path with our current security and space issue.  All the information that you provided was very helpful in making our decicion.  I am going to post a new question in regards to the new route we would like to take.  Hope you can help! Thanks
0
 

Author Closing Comment

by:AIX25
ID: 31581021
Very helpful comments and outputs.  Comments were very detailed, which led me to understand things easier.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now