From: mcbryde@navier.math.uh.edu (Jack Mcbryde)
Newsgroups: comp.unix.aix
Subject: Re: disk space
Date: 22 Jan 1993 04:29:45 GMT
Organization: UH Dept of Math
NNTP-Posting-Host: navier.math.uh.edu
Keywords: disk vg lv df

In article <1993Jan22.003726.17271@sobeco.com> emillion@sobeco.com (E.J.Millions) writes:
>I recently added a disk to an existing volume group and am somewhat 
>puzzled by the difference between df and lslv, as follows
>
>% df
>Filesystem    Total KB    free %used   iused %iused Mounted on
>/dev/lv04      2097152  865984   58%   15372     2% /mounts/b
>% lslv lv04
>LOGICAL VOLUME:     lv04                   VOLUME GROUP:   vg03
>...
>MAX LPs:            600                    PP SIZE:        4 megabyte(s)
>COPIES:             1                      SCHED POLICY:   parallel
>LPs:                568                    PPs:            568
>...
>MOUNT POINT:        /mounts/b              LABEL:          /mounts/b
>
>Perhaps it is simply that I'm tired and it's time to go home, but
>the last time I checked  2,097 Meg was not equivalent to 4x568=2,272 Meg.

Looks like the 2Gb filesystem limit may have gotten you. I don't know anyway
to reclaim the space other than deleting the filesystem and logical volume
and recreating it the easy foolproof way. (There may be one, I just don't
know it.) 

This is for lots of people out there. Unless you want to do stuff with things
like raw partitions there is *no* reason to screw around with logical volumes
in order to create/enlarge filesystems. (Except to change the maximum number
of physical partitions.) All it does is mess people up.

Here is the simple foolproof way to do it:
  For a filesystem <= .5Gb with the disk already in the volume group:
    smitty
      Physical & Logical Storage
        File Systems
          Add / Change / Show / Delete File Systems
            Journaled File Systems
              Add a Journaled File System
              or
              Change / Show Characteristics of a Journaled File System
              (if it already exists)

To add a new disk to a volume group:
  smitty
    Physical & Logical Storage
      Logical Volume Manager
        Volume Groups
          Set Characteristics of a Volume Group
            Add a Physical Volume to a Volume Group

To modify the default .5Gb limit:
  smitty
    Physical & Logical Storage
      Logical Volume Manager
        Logical Volumes
          Set Characteristic of a Logical Volume
            Change a Logical Volume
              LOGICAL VOLUME name (use F4)
                change the line that says 
                MAXIMUM NUMBER of LOGICAL PARTITIONS
                to 512 (this gives you the 2Gb limit)

If you do things this way you will never have to count the physical partition,
you will never have mismatched amount of disk allocated to a logical volume
and its corresponding filesystem, and you will spend less time messing
around in smit. Don't make it harder than it needs to be. Most of the IBMer's
I've seen do this strange crap with allocating more physical partitions to
a logical volume before they try to enlarge a filesystem. It's not necessary.

What I do is stick a disk into a volume group. (It's own if I can get away
with it. But that's another story.) Then if I need a new filesystem, I add
a filesystem. (as in first set of menus) If I need it to be larger (but
less than .5Gb) I follow the first set of menus. smit takes care of all of
the underlying logical volume stuff for you. If I need it to be larger than
.5Gb then I follow the second set of menus (and I always change it it 512,
that way I never have to do it again - this is just resetting the maximum
possible size it doesn't use up space) followed by the first. 

BTW, any irritation that may be detected on my part is not with you or any
in particular individual. I just get so tired of watching people making
the logical volume manager more complicated and messy than it needs to be.
I suspect that IBM is responsible whether it be by virtue of classes, unclear
documentation, or SE's. Then again maybe it has do do with a Sun mindset
where you have to preallocate all of your disk before you can possibly really
know where it is going to need to go. Gack!

later,
jack
--
jack      mcbryde@karazm.math.uh.edu    * All I ask of Thee, Lord
* Christ died for our sins.  Dare we    * Is to be a drinker and fornicator
* make his martyrdom meaningless by     * An unbeliever and a sodomite
* not committing them? - Jules Feiffer  * And then to die. - Claude de Chauvigny
Newsgroups: comp.unix.aix