ONTAP Discussions

Cloning a Volume/Lun

oberatixx
8,940 Views

Hi, I was wondering if I could get some help on cloning a volume/lun.

Right now I have 8 servers and only 1 of them has an OS installed (RHEL 5.5, pre-patch). I would like to clone the volume/lun to deploy the OS faster. Would I clone the entire volume or just the LUN?

Also, which method woul dbe the best to use, Snapmirror or a LUN clone?

Thanks in advance.

19 REPLIES 19

ekashpureff
8,877 Views

My preference would be to clone the volume so you can snapshot the LUNs independently.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
8,877 Views

Would you mind helping me map out the steps on how to do this, it's actually my first time. Thanks

ekashpureff
8,877 Views

I don't mind - I'll try !

Shut down the server with your original LUN.

See the man pages for:

'vol clone create' to clone your volume with the LUN in it for each new LUN.

'igroup create' to create an igroup for each new machine.

'lun map' to map each new LUN to each new igroup.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
8,877 Views

I apologize, but where would you enter the commands to clone the volume if the server is down.

ekashpureff
8,877 Views

It's the RedHat server you need to shut down, not the filer.

You'd want it to be shut down so that the LUN is in a consistent state when you take the snapshot for the clone.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
6,504 Views

Right, so I'll shutdown the RedHat server, but where would I be able to enter in the commands on the Filer?

scottgelb
8,877 Views

There is also a 3rd way... we have vol and lun clone which are tied to snapshots...you can split to release the snap... but there is also the "clone start" command which was originally called sis clone... it creates a clone of a lun or volume (in the same volume) using the dedup (asis) process..  so there is no additional overhead to the lun after creation and it is not tied to a snapshot either after creation.  The volume does need sis enabled since sis is used to create the clone.  This method requires a flexclone license... the same as vol clone.. but lun clone is free.  You could lun clone, clone split, then run asis to get the same result but in 3 steps instead of one.

oberatixx
8,877 Views

I believe we have a flexclone license. Would you mind helping me with the steps on how to proceed with that. Thank you

scottgelb
8,877 Views

Syntax for the clone (sis clone) command...specify a lun or file /vol/volname/qtreename/lun1.lun for example..

clone start <src_path> <dest_path> [-n] [-l]  
    # -n to NOT create temp snapshot during clone
    # -l to enable change logging on all clone blocks and that will be used by deduplication

Data ONTAP performs necessary metadata operations for LUN cloning

clone start <src_path> [dest_path] [-n] [-l] <-r <src_fbn>:<dest_fbn>:<fbn_cnt> ...>.
    # for API to clone file within a lun from a host (src/dest_fbn)

clone status [vol-name [ID]]
clone stop <vol-name> <ID>
clone clear <vol-name> <ID>

ekashpureff
8,877 Views

Or use the 'vol clone' command to clone the volume instead of the LUN.

Advantage is to be able to take seperate snapshots for each of the 8 machines.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
6,504 Views

It looks like we are licensed for Flexclone. Is that an easier thing to do? Would I just use the option that's built into the Filer?

Also, since half of the servers are on one filer and the other half on another, is it possible to transfer the vol over to a different filer?

ekashpureff
6,504 Views

'vol clone' or 'lun clone' or using the new 'clone' command are all easy.

See the man pages for the syntax of each.

You can copy the volume from one filer to the other with the 'ndmpcopy' command.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
6,504 Views

I apologize, just one more question, if the server is powered off, where would I enter in the commands such as ndmpcopy?

ekashpureff
6,504 Views

On a console or telnet session to the CLI on the filer ...


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
6,504 Views

Would you happen to know which config files I will need to configure after the clone?

ekashpureff
5,541 Views

They aren't config files - there's a few commands.

For each clone -

'igroup create' to create a new igroup to map each LUN to it's server.

'lun map' to map each LUN to the each server.


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
5,541 Views

I'm looking t the Filer and on the left pane, there's an option that allows you to create a FlexClone Volume. Is this the same as entering the command to create the volume? Do I need to split the volume if I plan to map it to a different server? Also, is there any configuring that needs to be done or will that be taken care of.

ekashpureff
5,541 Views

Yes - you can clone from FilerView as well as the command line.

No - you don't want to split the clone from the parent. You'd miss out on space savings and performance gains.

There's the 'igroup create' and 'lun map' steps I wrote of in my earlier post you will still need to take care of ...


I hope this response has been helpful to you.

At your service,


Eugene E. Kashpureff
ekashp@kashpureff.org
NetApp Instructor and Independent Consultant
http://www.linkedin.com/in/eugenekashpureff

(P.S. I appreciate points for helpful or correct answers.)

oberatixx
5,541 Views

So even though I'm using the cloned volume/lun as the primary OS for other servers, it's a good idea to not split it from the parent? What exactly does it mean to split from the parent.

As for the igroup, I can add that in FilerView correct? That would be the server that is using the volume/lun?

The newly created lun appears to be offline, will that come online after I add the initiator group?

Also, do I need to configure the /etc/hosts, /etc/network, /etc/sysconfig/network-scripts/bond0, /etc/sysconfig/network-scripts/ifcfg-eth0  +ifcfg-eth1 ? Would I have to recreate the last two since they have the MAC from the source system? Will the /etc/multipath.conf have the UIDs from the source system?

Public