A question which I frequently get asked is, how do I a resize my Oracle XFS file system ?
As I needed to resize an Oracle FRA area today, I thought this would make a great topic for a Blog post.
Ok, lets start be checking the current size and geometry using the Linux df -h and xfs_growfs -n commands.
[root@z-oracle ~]# df -h
Filesystem Size Used Avail Use% Mounted on
..
/dev/mapper/psta-orafra 1.0T 33M 1.0T 1% /u04/app/oracle/fast_recovery_area
..
[root@z-oracle ~]# xfs_growfs /dev/mapper/psta-orafra -n
meta-data=/dev/mapper/psta-orafra isize=256 agcount=4, agsize=67108864 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=268435456, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=131072, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Now run the multipath command to check the current size of the LUN, look for the friendly device name within the list of devices.
[root@z-oracle ~]# multipath -ll
…
psta-orafra (3624a937050c939582b0f46c0000a8f84) dm-17 PURE ,FlashArray
size=1.0T features=’0′ hwhandler=’0′ wp=rw
`-+- policy=’queue-length 0′ prio=1 status=active
|- 10:0:3:20 sdgl 132:16 active ready running
|- 10:0:4:20 sdiq 135:160 active ready running
|- 10:0:5:20 sdkq 66:480 active ready running
|- 10:0:6:20 sdmo 70:256 active ready running
|- 10:0:7:20 sdom 129:288 active ready running
|- 1:0:0:20 sdai 66:32 active ready running
|- 1:0:1:20 sdcr 69:240 active ready running
|- 1:0:2:20 sder 129:48 active ready running
|- 1:0:3:20 sdgr 132:112 active ready running
|- 1:0:4:20 sdil 135:80 active ready running
|- 1:0:5:20 sdkk 66:384 active ready running
|- 1:0:6:20 sdmk 69:448 active ready running
|- 1:0:7:20 sdop 129:336 active ready running
|- 10:0:0:20 sdau 66:224 active ready running
|- 10:0:1:20 sdck 69:128 active ready running
`- 10:0:2:20 sdel 128:208 active ready running
…
Now resize the volume using the Pure FlashArray UI, command line or REST API.
We now need to perform a rescan of the SCSI devices on our Linux server to identify any LUNS which have been resized.
[root@z-oracle ~]# rescan-scsi-bus.sh -s
Scanning SCSI subsystem for new devices
Searching for resized LUNs
We can now resize the multipath device using the following command:
[root@z-oracle mapper]# multipathd -k’resize map /dev/dm-17‘
ok
Great, ok now use the Linux command xfs_growfs to extend the file system, note if you do not specify -D xfs_growfs will grow to use all available space.
[root@z-oracle ~]# xfs_growfs /dev/mapper/psta-orafra
meta-data=/dev/mapper/psta-orafra isize=256 agcount=4, agsize=67108864 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0 spinodes=0
data = bsize=4096 blocks=268435456, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=0
log =internal bsize=4096 blocks=131072, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 268435456 to 536870912
Ok, lets check the results
[root@z-oracle ~]# df -h
Filesystem Size Used Avail Use% Mounted on
…
/dev/mapper/psta-orafra 2.0T 33M 2.0T 1% /u04/app/oracle/fast_recovery_area
..
As you see from above, within a few minutes I have been able to increase my Oracle fast_recovery_area from 1TB to 2TB.
[twitter-follow screen_name=’RonEkins’ show_count=’yes’]
Leave a Reply