Quantcast
Channel: iscsi – Jason Nash
Viewing all articles
Browse latest Browse all 15

Read/Write iSCSI Snapshots on a Celerra

$
0
0

If you notice the dates on my posts you’ll see I haven’t been blogging lately but that doesn’t mean I’m not working on some interesting things.  Lately I’ve been doing a lot with snapshots from iSCSI LUNs on Celerras while playing with VMware’s VDM.  The Celerra CLI allows you to do some powerful things with scripting and snapshots.  I’ll have a post soon showing some PowerShell scripts and VDI, but in the mean time….

The first step to creating a snapshot is to list the available iSCSI LUNs on the Celerra.

[nasadmin@ns20demo ~]$ server_iscsi ALL -lun -list
server_2 :
target: VI3_ISCSI_TARGET
lun        size(MB)        filesystem
0          245000          VI3LAB_ISCSI_VMFS ( id=49 )
5          19500           VDI_Demo ( id=55 )

target: VCLAB_ISCSI
lun        size(MB)        filesystem
1          49000           VCLAB_ISCSI ( id=54 )

As you can see we have a few LUNs available.  For this demonstration we’ll be using LUN 5 on iSCSI target VI3_ISCSI_TARGET.  The next step is to create a snapshot from LUN 5.

[nasadmin@ns20demo ~]$ server_iscsi ALL -snap -create -target VI3_ISCSI_TARGET -lun 5
server_2:
Info 26306936878: OK.id=fs55_T2_LUN5_APM00080902485_0000.ckpt452

Note the name of the snapshot, fs55_T2_LUN5_APM00080902485_0000.ckpt452.  You can display information about a snapshot.

[nasadmin@ns20demo ~]$ server_iscsi ALL -snap -info fs55_T2_LUN5_APM00080902485_0000.ckpt452
server_2:
Snap Name = fs55_T2_LUN5_APM00080902485_0000.ckpt452
Lun Number = 5
Target = VI3_ISCSI_TARGET
Promoted Number = 128
Promoted Initiator = iqn.1998-01.com.vmware:labesx1-38e45e34
Application Label = CelerraCS
LUN Size MB = 19500
Create Time = Wed Oct 29 09:16:47 GMT+05:00 2008
Application Data =

Now that you have created the snapshot you can promote it to Read/Write status, connect it to an iSCSI target, and assign any iSCSI initiators for access.

[nasadmin@ns20demo ~]$ server_iscsi ALL -snap -promote fs55_T2_LUN5_APM00080902485_0000.ckpt452 -initiator iqn.1998-01.com.vmware:labesx1-38e45e34
server_2:
OK

Notice that you didn’t designate a LUN number. By default it will start assigning LUNs at 128.

[nasadmin@ns20demo ~]$ server_iscsi ALL -lun -list
server_2 :
target: VI3_ISCSI_TARGET
lun size(MB) filesystem
0 245000 VI3LAB_ISCSI_VMFS ( id=49 )
5 19500 VDI_Demo ( id=55 )
128 19500 VDI_Demo ( id=55 )

target: VCLAB_ISCSI
lun size(MB) filesystem
1 49000 VCLAB_ISCSI ( id=54 )

At this point you can mount the LUN from an iSCSI client and use it just like you can the original LUN. Once you are finished with that LUN you can demote it.

[nasadmin@ns20demo ~]$ server_iscsi ALL -snap -Demote APM00080902485_0000.ckpt452
server_2:

The key here is that you can easily create a lot of snapshots and Read/Write mountable iSCSI LUNs using scripts and put these to use.  These are also useful for testing and recovery.  Snap a LUN with a database on it, mount it on another system, and then do an upgrade test against the production data without touching the production server.



Viewing all articles
Browse latest Browse all 15

Trending Articles