Expand LUN on Solaris
After expanding a volume on the SAN, I needed Solaris 10 to now see that the disk has grown and make use of the added space.
Device slice c8t600A0B80002A39FC000004DE47E92C69d0 was 200G with
a filesystem on slice 6. On the SAN, I expanded the volume to 225G. Here is how to expand the disk or partition inside of Solaris.
The steps are:
- Detect larger disk size and relabel disk.
- Grow the filesystem to fill the disk.
Auto detect the disk size
Run format, select the disk, and set the type to 'auto'.
Any filesystems on the disk must be unmounted first, and commented out in /etc/vfstab.
[root@host oradata]# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
...
3. c8t600A0B80002A39FC000004DE47E92C69d0 6140_22P
/scsi_vhci/ssd@g600a0b80002a39fc000004de47e92c69
...
Specify disk (enter its number)[2]: 3
selecting c8t600A0B80002A39FC000004DE47E92C69d0: 6140_22P
[disk formatted]
format> verify
Primary label contents:
Volume name = <6140_22P>
ascii name =
pcyl = 51200
ncyl = 51198
acyl = 2
nhead = 128
nsect = 64
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 31 128.00MB (32/0/0) 262144
1 swap wu 32 - 63 128.00MB (32/0/0) 262144
2 backup wu 0 - 51197 199.99GB (51198/0/0) 419414016
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 64 - 51197 199.74GB (51134/0/0) 418889728
7 unassigned wm 0 0 (0/0/0) 0
format> type
AVAILABLE DRIVE TYPES:
0. Auto configure
...
Specify disk type (enter its number)[24]: 0
c8t600A0B80002A39FC000004DE47E92C69d0: configured with capacity of 224.99GB
selecting c8t600A0B80002A39FC000004DE47E92C69d0
[disk formatted]
OK, that worked. Now the label needs to be updated. Take a peek first.
format> verify
Warning: Primary label on disk appears to be different from
current label.
Warning: Could not read backup labels.
Warning: Check the current partitioning and 'label' the disk or use the
'backup' command.
Primary label contents:
Volume name = <6140_22P>
ascii name =
pcyl = 51200
ncyl = 51198
acyl = 2
nhead = 128
nsect = 64
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 31 128.00MB (32/0/0) 262144
1 swap wu 32 - 63 128.00MB (32/0/0) 262144
2 backup wu 0 - 51197 199.99GB (51198/0/0) 419414016
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 usr wm 64 - 51197 199.74GB (51134/0/0) 418889728
7 unassigned wm 0 0 (0/0/0) 0
format> label
Ready to label disk, continue? yes
Now that it is updated, notice that the volume name has been blanked out. Add that back.
format> verify Primary label contents: Volume name = < > ascii name =pcyl = 57600 ncyl = 57598 acyl = 2 nhead = 128 nsect = 64 Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 31 128.00MB (32/0/0) 262144 1 swap wu 32 - 63 128.00MB (32/0/0) 262144 2 backup wu 0 - 57597 224.99GB (57598/0/0) 471842816 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 64 - 57597 224.74GB (57534/0/0) 471318528 7 unassigned wm 0 0 (0/0/0) 0 format> volname Enter 8-character volume name (remember quotes)[""]:6140_22P Ready to label disk, continue? yes format> quit
Grow the filesystem
This can be done with the filesystem mounted.
[root@host oradata]# mkdir 22P
[root@host oradata]# mount /dev/dsk/c8t600A0B80002A39FC000004DE47E92C69d0s6 /ora/oradata/22P
[root@host oradata]# df -h /ora/oradata/22P
Filesystem size used avail capacity Mounted on
/dev/dsk/c8t600A0B80002A39FC000004DE47E92C69d0s6
197G 64M 195G 1% /ora/oradata/22P
[root@host oradata]# growfs -M /ora/oradata/22P /dev/rdsk/c8t600A0B80002A39FC000004DE47E92C69d0s6
[root@host oradata]# df -h /ora/oradata/22P
Filesystem size used avail capacity Mounted on
/dev/dsk/c8t600A0B80002A39FC000004DE47E92C69d0s6
221G 64M 219G 1% /ora/oradata/22P
Done.
- dale's blog
- Login or register to post comments

Recent comments
50 weeks 5 days ago
50 weeks 5 days ago
1 year 9 weeks ago
1 year 38 weeks ago
1 year 38 weeks ago
1 year 51 weeks ago
2 years 5 weeks ago
2 years 5 weeks ago
2 years 7 weeks ago
2 years 7 weeks ago