Wednesday, September 21, 2011

Expanding a LUN served from the SVC

Around here, this is a task that MUST be performed like at 1:30 in the afternoon on a Friday.
Why? Procrastination. The filespace monitor (whoever that is) decides that 1 minute after they get back from their lunch they will check 'their' server before they go out of town for the weekend to see what the system admin. overlooked.

This chore is easy and straight forward depending on how much more they want,available resources, how many data drives they currently have on the server we are concerned about..

First, ask how much more space they need (not want) and how many data drives they have on that server. If they have only one data drive then the drive name to extend is <Hostname1>.
If they have more than one data drive and it is Windows, then ask the Sys Admin. how large the drive is currently. If it is a VMware server then ask the system admin for the LUN unique ID.
It will look like this: 6005076801908128C0000000000003C0.
You can match it on the SVC with the next command.

Next, log into the SVC. I will be using the hostname  Goliath in this explanation for my examples.
Then runto find the disks mapped to the host:
 svcinfo lshostvdiskmap  Goliath
the output will look like this

id               name              SCSI_id        vdisk_id       vdisk_name        vdisk_UID
35               Goliath           0              195            Goliath0          6005076801908128C0000000000003C0
35               Goliath           1              197            Goliath1          6005076801908128C0000000000003C1
this will show you all the disks mapped to the host.
Determine which of these drives you want to expand. If they have multiple data drives, then find the drive that is the same size that the Windows Sys. admin. told you or the LUN unique id number the VMware admin gave you.

 Next, run this command:
svcinfo lsvdisk -filtervalue name=Goliath1
id               name              IO_group_id    IO_group_name     status         mdisk_grp_id   mdisk_grp_name    capacity       type           FC_id             FC_name           RC_id          RC_name           vdisk_UID         fc_map_count   copy_count     fast_write_state
33              Goliath1         1              iog1              online         6              mdg2107_15_300    64.00GB        striped                                                                             6005076801908128C0000000000002D5 0              1              empty
Goliath's managed disk group for Goliath1 (its data drive or LUN)  is mdg2107_15_300.
    
In the following step you are looking to see if there is enough space in the managed disk group to expand that LUN to the desired size.
 svcinfo lsmdiskgrp -filtervalue name=mdg2107_15_300   
The output will look like this:
id               name              status         mdisk_count    vdisk_count    capacity       extent_size    free_capacity  virtual_capacity used_capacity  real_capacity  overallocation warning
102              mdg2107_15_300         online         30             31             54.6TB         512            5.7TB          48.89TB          48.89TB        48.89TB        89             0

So, in my example under free_capacity I have 5.7TB. So that extra 500GB is no big deal.
had I not enough space then I'd have to do one of two things:
1)Add a mdisk to the managed disk group
or
2) find an unused vdisk (maybe an old flash copy) make sure its not mapped to a host, and
    do a rmvdisk to it.

To expand the LUN by 500 GB execute:
svctask expandvdisksize -size 500 -unit gb Goliath1

where Goliath1 is the disk that needed to be expanded.
Now contact the windows admin. and tell her that she has the
needed space but she needs to expand the drive.

No comments:

Post a Comment