Adding space to server by assigning a new lun


Off we go…
On the filer:
n3601*> lun show
.
.
.
/vol/bcdvb10_web10_dev_boot/bcdvb10_web10_dev_boot   34.0g (36509319168)   (r/w, online, mapped)
.
.
.
n3601*> igroup show
bcdvb10_web10_dev (FCP) (ostype: linux):
21:00:00:1b:32:14:76:6f (logged in on: vtic, 0a)
21:01:00:e0:8b:34:76:6f (logged in on: vtic, 0b)
n3601*> vol create <—– view syntax
n3601*> vol create bcdvb10_web10_dev_home -s none aggr0 550g
Creation of volume ‘bcdvb10_web10_dev_home’ with size 550g on containing aggregate
‘aggr0’ has completed.

n3601*> vol status bcdvb10_web10_dev_home
Volume State      Status            Options
bcdvb10_web10_dev_home online     raid_dp, flex     guarantee=none
Containing aggregate: ‘aggr0’

n3601*> vol size bcdvb10_web10_dev_home
vol size: Flexible volume ‘bcdvb10_web10_dev_home’ has size 550g.

n3601*> snap reserve bcdvb10_web10_dev_home 0
n3601*> snap sched bcdvb10_web10_dev_home 0 0 0
n3601*> vol options bcdvb10_web10_dev_home nosnap on
n3601*> lun create -s 500g -t linux /vol/bcdvb10_web10_dev_home/bcdvb10_web10_dev_home
Thu Mar 12 08:45:36 EST [n3601: lun.vdisk.spaceReservationNotHonored:notice]: Space reservations in bcdvb10_web10_dev_home are not being honored, eithe  r because the volume space guarantee is set to ‘none’ or the guarantee is currently disabled due to lack of space in the aggregate.
lun create: created a LUN of size:  500.1g (536952700928)

n3601*> lun show
/vol/bcdvb10_web10_dev_boot/bcdvb10_web10_dev_boot   34.0g (36509319168)   (r/w, online, mapped)
/vol/bcdvb10_web10_dev_home/bcdvb10_web10_dev_home  500.1g (536952700928)  (r/w, online) <—– online but not mapped yet

n3601*> lun map /vol/bcdvb10_web10_dev_home/bcdvb10_web10_dev_home bcdvb10_web10_dev 1
Thu Mar 12 08:46:35 EST [n3601: lun.map:info]: LUN /vol/bcdvb10_web10_dev_home/bcdvb10_web10_dev_home was mapped to initiator group bcdvb10_web10_dev=1

On the host:
[gconklin@web10.dev ~]$ df -h
/dev/mapper/vg_root-lv_home
2.0G   37M  1.9G   2% /home <—– original size that we are going to extend

[gconklin@web10.dev ~]$ cat /proc/partitions
[gconklin@web10.dev ~]$ cat /etc/multipath.conf

[gconklin@web10.dev ~]$ sudo /sbin/multipath -d -l
mpath0 (360a9800050334f384e4a4e6d45494938)
[size=34 GB][features=”1 queue_if_no_path”][hwhandler=”0″]
\_ round-robin 0 [active]
\_ 2:0:1:0 sdc 8:32  [active]
\_ 3:0:0:0 sde 8:64  [active]
\_ round-robin 0 [enabled]
\_ 2:0:0:0 sda 8:0   [active]
\_ 3:0:1:0 sdg 8:96  [active]

[gconklin@web10.dev ~]$ ls /etc/rc3.d |grep 12
K12dc_client
S12crmultipathboot
S12syslog

[gconklin@web10.dev ~]$ sudo /sbin/reboot && exit
[gconklin@web10.dev ~]$ df -h
[gconklin@web10.dev ~]$ ls /etc/rc3.d |grep 12
[gconklin@web10.dev ~]$ cat /etc/multipath.conf

[gconklin@web10.dev ~]$ sudo /sbin/multipath -d -l
mpath1 (360a9800050334f384e4a4f446b6d7643)
[size=500 GB][features=”1 queue_if_no_path”][hwhandler=”0″]
\_ round-robin 0 [enabled]
\_ 2:0:1:1 sdd 8:48  [active]
\_ 3:0:0:1 sdf 8:80  [active]
\_ round-robin 0 [enabled]
\_ 2:0:0:1 sdb 8:16  [active]
\_ 3:0:1:1 sdh 8:112 [active]

mpath0 (360a9800050334f384e4a4e6d45494938)
[size=34 GB][features=”1 queue_if_no_path”][hwhandler=”0″]
\_ round-robin 0 [active]
\_ 2:0:1:0 sdc 8:32  [active]
\_ 3:0:0:0 sde 8:64  [active]
\_ round-robin 0 [enabled]
\_ 2:0:0:0 sda 8:0   [active]
\_ 3:0:1:0 sdg 8:96  [active]

[gconklin@web10.dev ~]$ sudo /usr/sbin/pvcreate /dev/mapper/mpath1
Physical volume “/dev/mapper/mpath1” successfully created

[gconklin@web10.dev ~]$ sudo vgdisplay
— Volume group —
VG Name               vg_root
System ID
Format                lvm2
Metadata Areas        1
Metadata Sequence No  6
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                5
Open LV               5
Max PV                0
Cur PV                1
Act PV                1
VG Size               31.72 GB
PE Size               32.00 MB
Total PE              1015
Alloc PE / Size       1014 / 31.69 GB <——– original size
Free  PE / Size       1 / 32.00 MB
VG UUID               fUsOC3-61ph-MRlZ-rizM-sstE-cgim-DZDGGr

[gconklin@web10.dev ~]$ sudo vgextend vg_root /dev/mapper/mpath1
Volume group “vg_root” successfully extended

[gconklin@web10.dev ~]$ sudo vgdisplay
— Volume group —
VG Name               vg_root
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  7
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                5
Open LV               5
Max PV                0
Cur PV                2
Act PV                2
VG Size               531.78 GB
PE Size               32.00 MB
Total PE              17017
Alloc PE / Size       1014 / 31.69 GB
Free  PE / Size       16003 / 500.09 GB <——– new size
VG UUID               fUsOC3-61ph-MRlZ-rizM-sstE-cgim-DZDGGr

[gconklin@web10.dev ~]$ df -h

[gconklin@web10.dev ~]$ sudo lvdisplay
— Logical volume —
LV Name                /dev/vg_root/lv_home
VG Name                vg_root
LV UUID                xLKc0z-S32F-utvw-AeQL-mjVx-pK1l-Gvv1Ga
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                2.00 GB <—– original size
Current LE             64
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:6

[gconklin@web10.dev ~]$ sudo lvextend -l +8000 /dev/vg_root/lv_home
Extending logical volume lv_home to 252.00 GB
Logical volume lv_home successfully resized

[gconklin@web10.dev ~]$ df -h

[gconklin@web10.dev ~]$ sudo lvdisplay
— Logical volume —
LV Name                /dev/vg_root/lv_home
VG Name                vg_root
LV UUID                xLKc0z-S32F-utvw-AeQL-mjVx-pK1l-Gvv1Ga
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                252.00 GB <—– new size
Current LE             8064
Segments               3
Allocation             inherit
Read ahead sectors     0
Block device           253:6

[gconklin@web10.dev ~]$ sudo ext2online /dev/vg_root/lv_home
ext2online v1.1.18 – 2001/03/18 for EXT2FS 0.5b

[gconklin@web10.dev ~]$ sudo tune2fs -l /dev/vg_root/lv_home
[gconklin@web10.dev ~]$ df -h
/dev/mapper/vg_root-lv_home
249G   40M  236G   1% /home

[gconklin@web10.dev ~]$ sudo vgdisplay
— Volume group —
VG Name               vg_root
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  8
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                5
Open LV               5
Max PV                0
Cur PV                2
Act PV                2
VG Size               531.78 GB
PE Size               32.00 MB
Total PE              17017
Alloc PE / Size       9014 / 281.69 GB
Free  PE / Size       8003 / 250.09 GB <—– remaining disk space
VG UUID               fUsOC3-61ph-MRlZ-rizM-sstE-cgim-DZDGGr

Phewww…. Got all that???

Advertisements

, , , , , , , , , , , , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: