I have never seen  a method of shrinking a LUN that I trust personally.

 

It's easy to chop off the end of a LUN. ONTAP can easily truncate the LUN. The problem is the filesystem itself. Before you lop off the end of a LUN you have to make sure there is no important data on that region of the disk.

 

The procedure ends up being this:

 

1)      Find a way to move filesystem data away from the region of disk you're about to chop off.

2)      Find a way to update the filesystem metadata itself so it no longer knows about the region of disk you're about to chop off.

3)      Shrink the disk. The word "truncate" is probably more accurate.

 

I once tried to follow a procedure to shrink a LUN on Solaris with ufs and managed to corrupt all my data. I did do it successfully with Windows once, but the procedure was tedious, and if you do your math wrong when performing the final LUN resizing you'll corrupt your data and you might not even notice right away.

 

All things considered, I'd migrate rather than try to shrink a LUN again. With a little help from rsync/robocopy you can usually make the cutover disruption minimal.

 

From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Klise, Steve
Sent: Monday, January 04, 2016 10:39 PM
To: Kevin Richards; Toasters@teaparty.net
Subject: Re: SnapDrive shrink lun

 

I did a quick search, and it sounds like if you can do the data migration, that would be the “safer” route to take.  Might want to review this based on what flavor of ontap you are running.

 

https://kb.netapp.com/support/index?page=content&id=3014860&locale=en_US&access=s

 

 

Thanks

 

Steve Klise

Consulting Solutions Architect – Data Center

World Wide Technology Inc.

408-242-4086 Cell

 

WWT Logo Small

 

 

From: <toasters-bounces@teaparty.net> on behalf of Kevin Richards <krichards1024@gmail.com>
Date: Monday, January 4, 2016 at 1:31 PM
To: "toasters@teaparty.net" <Toasters@teaparty.net>
Subject: SnapDrive shrink lun

 

Happy New Year Toasters!

 

Quick question for the group, we have a lun that was increased from about 3TB to 7TB.  We now would like to shrink it down.  My understanding is that I can only cut it by half due to a limitation of the OS (Win2008R2).  My other concern is data corruption, etc.  I have the option of adding a new lun and migrating data.  Any recommendations from experience?

 

Thank you.

Kevin