New file system, old logical volume
AnthonyEnglish 270000RKFN Visits (9976)
In Tune with Oracle:
A new file system
Changing the agblksize meant recreating the file system. Ordinarily, I would have done this by removing the old file system using rmfs. The rmfs command would blow away the original file system's underlying logical volume, and the lv would need to be recreated, and then a new file system. But a colleague of mine found a better way: creating just the new file system on the existing lv:
This will destroy the contents of the existing file system, so you need to back up anything you want to keep first.
First, he backed up the redo logs (with the Oracle database down!)
New file system
Then he created a new filesystem with agblksize=512 as follows:
mkfs -s 4G -o agblksize=512 /dev/redo
You can check the new filesystem agblksize with the command: lsfs -q
After this, mount the new /redo filesystem:
mount /redoAnd copy the redo logs back from /redo_old to /redo.
Just the mount point
You don't need to create a new file system if you just want to change the mount point. To change the directory the file system is mounted on, you can use the chfs command
chfs -m /new_mount_point /old_mount_pointINLINE JFS logs
But sometimes you do need to create a new file system. Apart from setting the agblksize, you might want to create a new file system to convert it to use INLINE jfs logs, or to allow internal snapshots.
If you need to change the logical volume layout itself, you may need to use the chlv command to rename it (-n flag) or to increase its size. Or you might need to rebuild it altogether, for example when you're converting from software striping to a hardware RAID. But if you want to keep the lv and just recreate the file system itself, my colleague's procedure should be just what the doctor ordered.