[comp.unix.aix] Why doesn't df reflect paritition change?

henkel%nepjt@ncsuvx.ncsu.edu (Chuck Henkel) (09/13/90)

Context: RS/6000 Model 320

I used the Logical Volume Manager under smit to add a free logical
partition (LP) to the /u filesystem. Before, /u had only one LP
assigned to it, and there was only one free LP available to add.

After adding the LP, smit claimed that everything was OK, and that /u
now had 2 LP's assigned to it, for a total of 8MB.

However, df still claims that /u has a total of 4MB. What's the deal?

Note:

- Yes, my entire user filesystem has a total of 8 MB after installing
  the OS. I think we need another disk.

- Rebooting didn't do anything.

- /u was mounted when I added the LP, maybe that was a mistake.

--
| Chuck Henkel                      |                            |
| N.C. State University             | Curious about evolution?   |
| Department of Nuclear Engineering |   Read Stephen J. Gould.   |
| henkel%nepjt@ncsuvx.ncsu.edu      |                            |

marc@ibm.com (Marc Auslander) (09/13/90)

In article <HENKEL%NEPJT.90Sep12132202@nepjt.ncsuvx.ncsu.edu>, henkel%nepjt@ncsuvx.ncsu.edu (Chuck Henkel) writes:
|> 
|> Context: RS/6000 Model 320
|> 
|> I used the Logical Volume Manager under smit to add a free logical
|> partition (LP) to the /u filesystem. Before, /u had only one LP
|> assigned to it, and there was only one free LP available to add.
|> 
|> After adding the LP, smit claimed that everything was OK, and that /u
|> now had 2 LP's assigned to it, for a total of 8MB.
|> 

To make a file system bigger, go to the smit pannel for enlarging the
file system.  What you did was to make the logical volume bigger without
then updating the file system to reflect the added space.

The is a way to fix this, but I am not sure what it is, and its something
I can't experiment with.  You might play with the chfs command.

henkel%nepjt@ncsuvx.ncsu.edu (Chuck Henkel) (09/13/90)

In article <HENKEL%NEPJT.90Sep12132202@nepjt.ncsuvx.ncsu.edu>
henkel%nepjt@ncsuvx.ncsu.edu (Chuck Henkel) writes:
> However, df still claims that /u has a total of 4MB. What's the deal?

I had also gone into the "File Systems" menu and followed the
convoluted path which enables you to run "chfs" with the "size="
option. However, I neglected to notice that the units for this option
are in 512 byte blocks instead of 1KB units, although it's clearly
stated as such in the menu. Problem resolved.

Another question: Was it necessary for me to use the Logical Volume
Manager at all for this operation? That is, if I had executed the
correct chfs command to begin with, would it have automatically
allocated enough free LP's to complete the operation?

--
| Chuck Henkel                      |                            |
| N.C. State University             | Curious about evolution?   |
| Department of Nuclear Engineering |   Read Stephen J. Gould.   |
| henkel%nepjt@ncsuvx.ncsu.edu      |                            |

frank@gremlin.austin.ibm.com (Frank Feuerbacher) (09/14/90)

> That is, if I had executed the
> correct chfs command to begin with, would it have automatically
> allocated enough free LP's to complete the operation?

Yes.  The chfs command will automatically increase allocate LP's for you.

The command that SMIT executes is: chfs -a size = xxx (512 byte blocks).

You can use the SMIT function key F6 to see what command and its ags that you
are about to execute.  And you can look at the file $HOME/smit.script to
see a log of the commands that you have executed via SMIT.

SMIT is only an interface, the commands it drives do the work.

Hope this helps some.

Disclaimer:  I don't speak for my employer and they don't speak for me.

dcm@toysrus.uucp (dcm) (09/14/90)

In article <7417@aides.watson.ibm.com> marc@ibm.com (Marc Auslander) writes:
>
>To make a file system bigger, go to the smit pannel for enlarging the
>file system.  What you did was to make the logical volume bigger without
>then updating the file system to reflect the added space.
>
>The is a way to fix this, but I am not sure what it is, and its something
>I can't experiment with.  You might play with the chfs command.


	Yep, chfs is smart enough to handle this case.  It queries the
	logical volume before it decides if it should expand it or not.
	Piece of cake.

	But, to expand filesystems, either use the the filesystems
	menu in smit or use chfs directly.  Don't mess with expanding
	logical volumes.  It's a wasted step.

		Craig


p.s.	undocumented debug flag on {cr,ch,rm,ls}fs:  -D
	prints out fun debugging stuff - great if you get bored...
--------
	Craig Miller, contractor @ IBM AWD, Austin  (I don't speak for IBM)
	UUCP: ..!uunet!cs.utexas.edu!ibmaus!auschs!toysrus.austin.ibm.com!dcm

	"Just because it works doesn't means it's right, stupid!"
	"Don't believe .signature files."

woan@peyote.cactus.org (Ronald S. Woan) (09/14/90)

In article <7417@aides.watson.ibm.com>, marc@ibm.com (Marc Auslander) writes:
> To make a file system bigger, go to the smit pannel for enlarging the
> file system.  What you did was to make the logical volume bigger without
> then updating the file system to reflect the added space.
> 
> The is a way to fix this, but I am not sure what it is, and its something
> I can't experiment with.  You might play with the chfs command.


Yes you can use the chfs command, i.e. to set /u to something:
chfs /u -a size=#, where # indicate the number of blocks total for the
filesystem. Warning though, you can't shrink it if I remember correctly.

				Ron
-- 
+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan           woan@peyote.cactus.org or woan@soda.berkeley.edu +
+ othernet                          Prodigy: XTCR74A Compuserve: 73530,2537 +

drake@drake.almaden.ibm.com (09/14/90)

In article <HENKEL%NEPJT.90Sep12132202@nepjt.ncsuvx.ncsu.edu> henkel@nepjt.ncsu.edu (Chuck Henkel) writes:
>
>Context: RS/6000 Model 320
>
>I used the Logical Volume Manager under smit to add a free logical
>partition (LP) to the /u filesystem.
>However, df still claims that /u has a total of 4MB. What's the deal?

I imagine that you used the "wrong" command and/or SMIT selection to
accomplish what you wanted to do.  Extending a file system involves two
separate operations at the lowest level:

1.  Adding additional logical partitions to the logical volume in question,
    and
2.  Twiddling data in the filesystem on the logical volume to tell it that
    the space is there.  

There is a command that will do both of these together, and there is also
a command for just doing (1).  This latter command would be useful if you
were using a logical volume for a purpose other than a filesystem.  I 
expect that you ran this latter command, not the former.  

Fear not; if you now run the former command, it will do the right thing.
No harm will become you (I've made the same misteak, too).

To get to the command you want, run SMIT, then select "Physical and Logical 
Devices", then "File Systems" (NOT Logical Volume Manager), then 
"Add/Change/Show/Delete File Systems", then "Journaled File Systems", 
then "Change / Show Characteristics of a Journaled File System",
then select the filesystem you want to mess with, then type the new size
of the file where asked and press Enter.  Done.

Or type "chfs -a size=nnnnn".  


Sam Drake / IBM Almaden Research Center 
Internet:  drake@ibm.com            BITNET:  DRAKE at ALMADEN
Usenet:    ...!uunet!ibmarc!drake   Phone:   (408) 927-1861

drake@drake.almaden.ibm.com (09/15/90)

In article <HENKEL%NEPJT.90Sep13085237@nepjt.ncsuvx.ncsu.edu> henkel@nepjt.ncsu.edu (Chuck Henkel) writes:
>Another question: Was it necessary for me to use the Logical Volume
>Manager at all for this operation? That is, if I had executed the
>correct chfs command to begin with, would it have automatically
>allocated enough free LP's to complete the operation?

Yes, and with the filesystem mounted, too.  Just >poof< ... more space.

>
>--
>| Chuck Henkel                      |                            |
>| N.C. State University             | Curious about evolution?   |
>| Department of Nuclear Engineering |   Read Stephen J. Gould.   |
>| henkel%nepjt@ncsuvx.ncsu.edu      |                            |



Sam Drake / IBM Almaden Research Center 
Internet:  drake@ibm.com            BITNET:  DRAKE at ALMADEN
Usenet:    ...!uunet!ibmarc!drake   Phone:   (408) 927-1861