In this tutorial, we will learn how to increase rpool size in Solaris 11 operating system that may be running out of root disk space.
Table of Contents
Steps Involved to extend rpool size:
- Add a bigger size root hard disk (for example if current root disk is 10GB, then add 15GB hard disk)
- Mirror the rpool using the new 15GB hard disk
- Reboot the system after mirroring
- Split the old disk from rpool
- Set the “autoexpand” property of the rpool
Step 1: Add a bigger size root hard disk
Assuming that the current setup is having 10GB root hard disk c2t0d0 (as seen in the below picture).
Attach a new bigger size hard disk that we will use to extend the rpool. Here we are going to extend from 10GB (old hard disk c2t0d0) to 15GB (new hard disk c2t1d0).
Step 2: Attach new disk and start mirroring
Attach the rpool with the new hard disk and wait for the resilvering to complete.
# zpool attach rpool c2t0d0 c2t1d0
You can track the status using below command:-
# zpool status rpool
Step 3: Reboot the system after mirroring
Once the mirroring is done, boot the system with new mirror disk to verify that everything works fine.
Step 4: Split the old disk from rpool
Once the system boots from the new disk, split the old disk from rpool.
# zpool split rpool oldrpool c2t0d0
Now if you look at the pool status it will show only one device (the new disk) but with the old size(Don’t worry we will fix this in the next step). You will also see a pool called “oldrpool” with the old disk that we split off. At this point, you should be able to boot from either of the two disks, but each will be a distinct rpool.
Step 5: Set the “autoexpand” property of the rpool
You may be wondering after doing all the stuff root disk space is not increased?
In order to expand the rpool size to that of the new disk we added, we need to tell zfs to expand to the capacity of the new disk. To do so, we have to set the autoexpand property on.
# zpool set autoexpand=on rpool
Conclusion
Finally you can see that the rpool size has been extended to 15GB.
Reference Links:-
- https://docs.oracle.com/cd/E37838_01/html/E61017/gmccj.html
- https://docs.oracle.com/cd/E37838_01/html/E61017/ggtia.html