Operating System - HP-UX
1834091 Members
2014 Online
110063 Solutions
New Discussion

Re: Risizing File Systems Online

 
Ivette Perez
Occasional Contributor

Risizing File Systems Online

Hi,

I have Online JFS 3.3 installed on an HP-UX 11i Server. I am able to increase the size of a file system while the databases are up but not to reduce it. I used fsadm to reorganize directories and reduce the file system. But when I tried lvreduce to reduce the lvol where the file system resided I received an error that the Lvol had a file system mounted and the size was not changed. I thought ONLINE JFS would let you do everything on line. Am I missing something???

Thanks
4 REPLIES 4
John Poff
Honored Contributor

Re: Risizing File Systems Online

Hi,


You'll have to use the 'fsadm' command to reduce the size of the filesystem first, and then do your 'lvreduce' on the logical volume. You might encounter some errors about having extents in use that you are reducing. There is a good chance you'll wind up having to backup your filesystem, delete it, recreate it at the new, smaller size, and then restore your data.

Increasing the size of a filesystem is a piece of cake, but reducing it is a different story. Here are a couple of threads where the process has been discussed:



http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1f7a402f24d5d61190050090279cd0f9,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x18cca1abbac8d5118ff10090279cd0f9,00.html



Have fun!

JP
Martin Johnson
Honored Contributor

Re: Risizing File Systems Online

Make sure you backup your data before trying to reduce! If you reduce to a size smaller than needed by your data, you will have to recover from backup.

HTH
Marty
Manju Kampli
Trusted Contributor

Re: Risizing File Systems Online

(1) make sure you have full backup of the file system
(2) re-organise the file system
(3) reduce the file system size using fsadm cmd
(4) reduce the LV size using lvreduce command

as mentioned above, (if possible) recreating the File system and restoring the data would workout good in some cases

HTH
- Manju
Never stop "LEARNING"
Martin Robinson
Frequent Advisor

Re: Risizing File Systems Online

It has been explained to me by the HP Response Centre that using fsadm to reduce file systems hardly ever works. The reason is that a file system is divided into extents, and the smaller extents are used in preference to larger extents. It it likely that smaller extents are at the 'top' of the filesystem, therefore this space will be used first when files are created, therefore the filesystem cannot be reduced. A scenario that does work is create filesystem and immediately reduce it before creating any files.

However this only occurs in the lab, not in real life!