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

Extending logical volume for a mountpoint 2

Status
Not open for further replies.

neuralnode

Technical User
Sep 12, 2007
59
PL
Hi there,

I have recently started using AIX 5L in my company, as an addition to the already existing Linux infrastructure. There are things I don't quite understand yet.

Here was the situation:

The mountpoint /usr (mounted on /dev/hd2) was 99% full, as shown by df. The system, as might be expected, started to behave strangely, refused to start CDE, caused problems with FTP and so on. I had one unused disk, hdisk1, so I decided to extend the hd2 logical volume onto that disk by issuing smitty extendlv. lspv -p hdisk1 showed that hd2 along with mountpoint /usr was sucessfully extended to the new disk. However, df still showed no change in percent usage of the disk space for /usr (still 99% used). Then I extended the filesystem for /usr by issuing smitty chjfs and adding some volume to /usr. After that df showed that /usr had indeed more space than before (63% used), as I had intended.

My question is this: What is the relation between those two operations: extending a LV to another physical volume (hard disk) and increasing filesystem size for a given mountpoint? I mean, how can I track such requirements/changes? What takes precedence here?

For example, let's say I set some number of physical partitions while extending an LV to a new disk, and then increase space for the filesystem that this very LV uses. What if the filesystem size extension exceeds the previously configured size of physical partitions? Will the mountpoint assigned to that LV remain at the size defined during extendlv operation, or will it use any available space from other LVs if the configured filesystem size is larger than one specified during extendlv operation?

Hell, I know this sounds confusing, to say the least, but I can hardly figure out how to put it any simpler way.

Generally, I'd like someone more experienced to enlighten me on the issue: extending logical volume size vs extending a mountpoint filesystem size. (The goal being simply adding some disk space to a given mountpoint and using another physical disk for that purpose).

Thanks in advance for any help.

 
Extendlv-ing an underlying LV for a FS is just half of the story. You have to increase the size of the FS also.

In fact if you increase the FS size, the system will do the extendlv for you, so you don't even have to worry about it. The reason that you can extendlv manually is then you can choose where (which hard disk) the extension PPs will go. You can even create a map file to choose the exact PPs you want to extendlv on...

Now in this case, after you ran extendlv, you have an LV that is bigger than the FS on it.
Do this to examine it:

lsfs -q /usr

Do you notice the different size of the LV and the FS?
Increase the size of /usr to occupy the full LV size:

chfs -asize=<LV size from above command> /usr

and you're all set.


HTH,

p5wizard
 
To add to what p5wizard said, Try to read about migratelp to move some of the partitions to the new disks!

You might have better performance by spreading the lv on several disks and you might free the previous disk for something else.


Regards,
Khalid
 
Thanks guys, your replies were very helpful!

Rgds.
 
To get more comfortable with LVM, you might want to check out the LVM Intro Redbook I linked to in thread52-1398974.

- Rod

IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top