Extending an ACFS filesystem dynamically.
03/10/2014 Leave a comment
To extend an ACFS cluster filesystem dynamically, we need to use the acfsutil command:
node01:/u01/grid>/sbin/acfsutil size +10G /u02 acfsutil size: ACFS-03008: The volume could not be resized. The volume expansion limit has been reached. acfsutil size: ACFS-03216: The ADVM compatibility attribute for the diskgroup was below the required version (11.2.0.4.0) for unlimited volume expansions.
Oh dear, not 11.0.2.4, so you can only extend volumes dynamically a few times (5) before the global bitmap becomes full. So, now it’s an offline change. 😦
Check what is accessing /u02 and stop it:
node01:/opt/oracle>sudo -s [root@node01 oracle]# lsof /u02 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 5566 oracle cwd DIR 252,50177 12288 78 /u02/goldengate/bin11 su 29509 root cwd DIR 252,50177 12288 78 /u02/goldengate/bin11 erm. kill -9 5566 29509 :-)
DO THIS ON EVERY RAC NODE!
[root@node01 oracle]# umount –t acfs /u02 [root@node02 oracle]# umount –t acfs /u02 [root@node-n oracle]# umount –t acfs /u02
Once unmounted, we can “repair” the global bitmap:
[root@node02 oracle]# fsck -y -t acfs /dev/asm/acfsdisk_u02-98 fsck from util-linux-ng 2.17.2 version = 11.2.0.4.0 ***************************** ********** Pass: 1 ********** ***************************** Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 39.0 ACFS file system created at: Thu Jan 2 17:08:02 2014 checking primary file system Files checked in primary file system: 25% Files checked in primary file system: 100% fsck.acfs: ACFS-07728: The Global_BitMap file has reached the maximum number of extents (5). The file system can no longer be expanded. Running fsck.acfs in fixer mode will attempt to consolidate the storage bitmap into fewer extents which would allow for file system expansion Checking if any files are orphaned... 0 orphans found Checker completed with no errors.
So lets fix it – output seriously trimmed, but with the important bit
[root@node02 oracle]# /sbin/fsck.acfs -a -v /dev/asm/acfsdisk_u02-98 fsck from util-linux-ng 2.17.2 version = 11.2.0.4.0 ***************************** ********** Pass: 1 ********** ***************************** Oracle ASM Cluster File System (ACFS) On-Disk Structure Version: 39.0 ACFS file system created at: Thu Jan 2 17:08:02 2014 checking primary file system Files checked in primary file system: 25% Files checked in primary file system: 100% fsck.acfs: ACFS-07729: The Global_Bitmap file has been consolidated into 2 extents. This may allow for file system expansion via the 'acfsutil size' command. Checking if any files are orphaned... 0 orphans found Checker completed with no errors.
So, we’re done and can re-mount ON EVERY NODE. Given it’s now 2 extents, and the max we can have is 5, we have 3 more dynamic extensions before we need to do this again.
mount –t acfs /dev/asm/acfsdisk_u02-98 /u02
And re-attempt to expand the filesystem
node01:/u01/grid>df –h /u02 Filesystem Size Used Avail Use% Mounted on /dev/asm/acfsdisk_u02-98 325G 36G 290G 12% /u02 node01:/u01/grid>/sbin/acfsutil size +10G /u02 acfsutil size: new file system size: 359703511040 (343040MB) node01:/u01/grid>df -h node01:/u01/grid>df -h /u02 Filesystem Size Used Avail Use% Mounted on /dev/asm/acfsdisk_u02-98 335G 36G 300G 11% /u02 node01:/u01/grid>
Yey! Bigger filesystem! Lets minimise the amount of times it needs to be extended in the future but doing it in big lumps. Might just save a planned outage.
Alternatively, upgrade Grid Infra to at least 11.2.0.4 and set advm compatibility to 11.2.0.4 and the restriction will be gone for good:
ALTER DISKGROUP acfsdisk SET ATTRIBUTE 'compatible.asm' = '11.2.0.4', 'compatible.rdbms' = '11.2.0.4', 'compatible.advm' = '11.2.0.4'; (or ASMCMD [+] > setattr -G acfsdisk compatible.advm 11.2.0.4) (or right-click on the disk group in asmca and click "edit attributes")