I've done some digging around the OpenFiler forums looking for any tips on growing a large XFS volume with out loosing data.
I've got an areca ARC-1260 controller that allows for Online Capacity Expansion, and after adding a few new 1.5TB drives I wanted to grow the XFS volume in OpenFiler to see my new space.
After a bit of digging I did find an article, where a walk-thru was posted. Here are the steps below, trust me I was nervous too... as you must remove and recreate the partition the data sits on.
I tested this with an OpenFiler VM for a comfort level around doing it to my production data. On both systems I had 0 data loss.
Original thread - http://forums.openfiler.com/viewtopic.php?id=1612
The steps are as follow : (Some screen caps at the bottom of this article.) This can be done via direct console to OpenFiler or via SSH into OpenFiler
In step 1a (print) I never did get an Error about the backup GPT table not being at the end of the disk. If you do not either, just continue on thru the steps
Be SURE to make note of your disk geometry, start (typically 0.017) and end.
1. parted /dev/ (e.g. /dev/sdb)
1a. print
make note of the last number from Disk Geometry
"Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Cancel?" fix
1b. mklabel gpt
1c. print - it will show something like:
Disk geometry for /dev/sdb: 0.000-5722045.500 megabytes
Disk label type: gpt
Minor Start End Filesystem Name Flags
make note of the last number from Disk Geometry
1d. mkpart primary 0.017 5722045.500 (fill in your start number as 1a. print states and end as the last number from Disk Geometry)
1e. quit
2. stop all services that use the partition (smb, nfs, etc); ldap is not necessary to be stopped, this can be done in the OpenFiler GUI
3. umount /mnt//
4. vgchange -an (disable all volume groups)
5. partprobe (reread partition tables on all disks)
6. pvresize /dev/ (resize the physical volume eg: pvresize /dev/sdb1)
7. vgchange -ay (enable all volume groups)
8. mount -a (remount all disk partitions)
9. start all previously running services
10. xfs_growfs /mnt//
11. Go to volumes in the web administrator and edit properties of the volume to expand the size
The disk I wanted to grow was /dev/sdb
My original partition was - Start 0.017 End 4291526.854
And the new partition size was going to be - Start 0.017 End 5722045.000
As you see, the disk geometry is 0.000-5722045.00 yet the partition is only 0.017-4291526.854
Upon completing step 1d and running print you can see my partition is now sized correctly at 0.017-5722045.00
Lastly we have to grow the physical volume, Keep in mind the Disk itself is /dev/sdb but now we are working with the physical volume, thus using /dev/sdb1
Last steps to be completed from console are growing the XFS file system. The mount point I'm using for /dev/sdb1 is /mnt/san/media
This will allow you to grow the volume inside the OpenFiler GUI (show below)
As you can see, my volume now has 25% more free space, growing from 4190.94GB to 5587.91GB
This was completed with out loosing any data on my volume.
Please please be sure to make note of the disk geometry prior to doing any of this, the data typically starts at 0.017, do not start the partition at 0.000.
I am not responsible for any data loss by following these steps, please be sure to have backups and test before performing this against any production data volumes.