Active IQ and AutoSupport Discussions

LUN Snapshot restore

NETAPPORATI
8,925 Views

Hi All,

I have a LUN mounted on a Windows host which holds around 3TB of data, this LUN is inside a volume and the space inside this volume left is around 2TB. I have snapshots on volume level and when I right click the LUN (NETAPP SYS MGR) I can see snapshots for the LUN itself too.

How can I mount one of these snapshots inside a windows host (either same box or a different box) in order to do some data restore / recovery ?

If you can provide a step by step on the Netapp side and then the steps required to access this mounted snapshot onto the same or another host - that will be very helpful,

Also, is this possible that if I had to use the whole data set from the snapshot, can I take that into production and delete the old LUN ?

Will be grateful for your assistance - Thanks

1 ACCEPTED SOLUTION

scottgelb
6,155 Views

SnapDrive is licensed and has multiple operating system versions including Windows.

The advantage (besides provisioning) is a consistent NTFS snapshot so you don't have to check disk the clone... crash consistent without snapdrive would require a check disk after..

View solution in original post

13 REPLIES 13

aborzenkov
8,884 Views

You can use “lun clone” to create virtual LUN copy based on specific snapshot. It behaves like a normal LUN which you then map to host and mount. Be sure to disable any scheduled snapshots while LUN clone exists to avoid busy snapshots that cannot be deleted.

If you have flexclone license, you could clone the whole volume. It avoids “busy snapshot” issue.

SnapDrive for Windows will use either method depending on Data ONTAP version and available licenses and is preferred way to mount snapshots if you use it.

If you have snaprestore license, you can also revert volume to previous snapshot. This is the fastest method. Be aware that all changes since this snapshots are lost forever.

scottgelb
8,886 Views

if dedup is enabled "clone" is a good option also since it doesn't tie up a snapshot and uses the asis engine.  Most (including me) don't use it a lot but it is slick to use asis to create the clone with no overhead for a lun/file.  3 ways to clone is all good

NETAPPORATI
8,884 Views

Hi Aborzenkov and Scott Gelb,

Thank you for your prompt replies - you both have always been very helpful - really appreciate that !!

Now - by now you both know that I am new to the netapp world and as this box is already into production with a couple of LUNS (in the same VOLUME) already mounted and in production.

I will be grateful if you could provide a step by step (which should be non disruptive and clearly safe) to clone a PRODUCTION LUN in the same Volume and Mount it on the other server (I don't have snapdirve / snapmanager) (I have Netapp system manager 1.1 and the good old CLI).

What I want to achieve is to create a LUN CLONE and mount it on my backup box and then start replicating from my primary windows host to the secondary windows host, that would save me time of copying the entire data on the primary LUN to the new LUN on the backup box ?

Will be most grateful - for a walk through /step by step (Ontap 8.0.2P6 7 Mode)

Looking forward to your reply

scottgelb
8,884 Views

It would be good to create some test Luns or use the vsim. But syntax for Lun clone..

lun clone create /vol/volname/pathtolun -b /vol/parentlunpath snapname

Or if you have dedup enabled you can clone without looking a snapshot.

clone start srclun destlun

You then need an igroup and Lun map. All documented in man pages an ontap docs. Do you have a vsim setup to run commands on?

NETAPPORATI
8,884 Views

Hi Scott,

Thank you for your prompt reply, no I haven't got a vsim configured ;

I have had deduped this volume before but then I had to delete all LUNS and then create new ones, I can run a dedup on the volume though during off-peak hours.

So, I would :

Run Dedupe on the volume, wait till it's finished
Then, log-on via SSH on the respective controller
type "clone start <original production lun name> <new cloned lun name> (Do I need to specify the full path as well or just the names would do ? )

Is this a disk intensive or cpu intensive operation ?
Would it occupy disk space straight away or until I start writing to it ?

Do I need to disable snapshots on to it or not ?

Thanks again

scottgelb
8,884 Views

Full path. Yes. It takes some CPU for ASIS. But no backing snapshot once completed. It does create a temp snap by default for the dedup creation of the Lun. A Flexclone license is needed for this to work.

You can also use Lun clone with a backing Snap.

You can also Flexclone the entire volume.

All 3 method have no space usage until changes are made

Sent from my iPhone 4S

NETAPPORATI
8,884 Views

Flexclone license 🙂 - I think we don't have that, I would have to check that though.

I do have snapshots enabled on the volume, I guess I am left with "lun clone"

lun clone create /vol/volname/new-lun-NAME -b /vol/original-lun-name snapname

Hope the above is correct ?

scottgelb
8,884 Views

That looks right.

Sent from my iPhone 4S

NETAPPORATI
8,884 Views

Hi Scott,

Thank you for your prompt and very helpful replies ; I haven't yet experimented with the commands as I am seeing the following :

From Autosupport page, Notices :

Snapshot usage on this volume exceeds 80% of the allotted capacity. Snapshot capacity should be monitored closely to ensure that enough space is set aside for snapshots. Increase the amount of space reserved for snapshots using the "snap reserve" command.

On this volume, "Space Setting = Volume", I have Fractional Reserve = 0 ; Delete Snapshots automatically is selected ; Snapshot reserve is set to 10%, I have deduped this volume "manually - full scan", volume auto-grow is NOT SELECTED ; this volume holds two Thin Provisioned LUNs, volume is showing ample free space but snapshot over flow is being displayed in NetAPP MMC ; I don't understand why it is not deleting snapshots automatically and complaining ?

Also, the schedule is a bit complicated, what would you recommend for a snapshot schedule ? Hourly = 1 x Daily ?? and Weekly = 1 ?

At this moment, our snapshot schedule is : Weekly = 1, Daily = 2, Hourly = 2

Under Hourly Snapshot schedules via MMC ; I have 02 and 08 then 14 and 20 hours ? so does this mean that it will create a snapshot at 2AM and 8AM ; then it will create a snapshot at 14:00 and 20:00 PM ?

Will be grateful for your support - Thanks so much !!

scottgelb
6,116 Views

I would use snapdrive to create snaps. Not ontap schedule for Luns. From this method in ontap it doesn't quiesce the file system so the Luns are crash consistent in the snaps

NETAPPORATI
6,117 Views

Do you mean snapdrive is a windows application which I should install on my server to create snapshots of volumes / luns etc ?

Do we need to purchase snapdrive?

Also, can you please (if you get time) elaborate a bit on the point / benefit of creating snaps via snapdrive to get crash-consistent LUNS ?

Thank you so much for your all your help so far

scottgelb
6,156 Views

SnapDrive is licensed and has multiple operating system versions including Windows.

The advantage (besides provisioning) is a consistent NTFS snapshot so you don't have to check disk the clone... crash consistent without snapdrive would require a check disk after..

NETAPPORATI
6,117 Views

I think I should mark your last post as Correct 🙂 as this thread is getting too long for others and I know my questions aren't finishing soon 🙂

Thanks so much for your help, I am about to open new threads -

Thanks Again !!!

Public