We help IT Professionals succeed at work.

creating lv on aix

virgo0880
virgo0880 asked
on
Hi All,

I have to delete the lv and create the lv  and filesystem with 512 block size in AIX 5.3. What is the command for the same. for e.g. I have 2 filesystems :

/dev/erppt_redo001lv      /oracle/test/redo001
/dev/erppt_redo002lv      /oracle/test/redo002


Now, I want to delete redo002 lv  and re-create it with 512 bytes block size. How can I do that. Also what is the procedure of deleting the filesytem and re-creating it and how can we rename the lv in AIX.

Thanks
virgo
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013
Commented:
What exactly is blocksize?

A logical volume consists of physical partitions with a given size, which is a volume group attribute (not a logical volume attribute). There are no "blocks" (or are you talking about a striped LV? Minimum strip size here is 4K)

A filesystem, on the other hand, is organized in allocation groups of a given size, which consist under JFS2 itself  of blocks (as opposed to JFS, where you have only monolithic allocation groups).

agblksize is a creation-time attribute of the filesystem, and is independent of any logical volume definition.

The "crfs" parameter is:

-a agblksize={ 512 | 1024 | 2048 | 4096 }

As for your questions:

Delete a LV and the filesystem in one step with "rmfs"

After unmounting the filesystems issue

rmfs /oracle/test/redo001
rmfs /oracle/test/redo002

Now you can recreate the LVs:

mklv -t jfs2 -y erppt_redo001lv <volumegroup> <number_of_partitions> <physical volume ...>
mklv -t jfs2 -y erppt_redo002lv <volumegroup> <number_of_partitions> <physical volume ...>

and create filesystems with an agblksize of 512:

crfs -v jfs2 -a agblksize=512 -d erppt_redo001lv -m /oracle/test/redo001
crfs -v jfs2 -a agblksize=512 -d erppt_redo002lv -m /oracle/test/redo002

See "man mklv" and "man crfs" for more options.

wmp

Author

Commented:
Actually, I just want to create a filesystem with agblksize=512 as currently it is 4k, so do I need to delete the lv and create the lv again for that, or I can just remove the filesytem and re-create the filesystem with agblksize=512.

This I have to do as we are facing some oracle performance issues with redo filesystem and IBM told to change the agblksize from 4k to 512. So can I do this without recreating the LVs and just removing fs and re-creating it ?

thanks
virgo

Author

Commented:
Currently, my filesystems are showing as :

/dev/erppt_redo001lv /oracle/test/redo001 jfs2   Oct 10 21:24 rw,cio,log=INLINE
/dev/erppt_redo002lv /oracle/test/redo002 jfs2   Oct 10 21:24 rw,cio,log=INLINE

so if I create the filesystem, whether this options will come by default i.e. log, rw option ?
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
1)

rmfs always deletes the LV along with the FS, if it's jfs/jfs2.
A workaround is removing the filesystem's stanza from /etc/filesystems, so the system will no longer know about its existence.
This method is rather uncommon (although it works).
Why wouldn't you just run those 2 additional mklv commands?

2)

You need more crfs options, according to the info you gave:

crfs -v jfs2 -a agblksize=512 -a log=INLINE -a options=cio -d erppt_redo001lv -m /oracle/test/redo001
crfs -v jfs2 -a agblksize=512 -a log=INLINE -a options=cio -d erppt_redo002lv -m /oracle/test/redo002

rw is the default. Consider adding "-A yes/no" for automatic mount at system startup.

wmp

Author

Commented:
Thanks for the commands and explanation, appreciate that. I will do this and see how it goes.

virgo

Author

Commented:
OK