ONTAP Discussions

will I truncate data if I shrink vol size

JohnChen
10,472 Views

I want to shrink my vol size from 1T to be 500 GB.

My data size on this vol is 400GB.

If I shrink my vol size, will I truncate my data even my data size is 400GB?

What is ther best way for me to shrink vol size without truncate my data?

This is a NFS vol and my Ontap cluster version is 8.3.1.

 

6 REPLIES 6

bobshouseofcards
10,459 Views

Hi John -

 

You are perfectly safe to reduce the size of a volume.  You can't reduce the size of a volume to a point smaller than the amount of data it contains.  DoT will not let you do that.

 

Remember when you think of size, a volume is not a contiguous nor even a specific set of blocks in the aggregate.  Literally the volume is "everywhere" in the aggregate.  That's part of the reason NetApp calls the underlying system WAFL - Write Anywhere File Layout.  The size of a volume is only a number which says how many total blocks a volume might contain.  The space guarantee (thin or think provisioning) tells you whether the needed blocks are set aside for that volume (guarantee = volume) or whether it's first come first serve and you might not get what you want (guarantee = none).  Even when reserved, you aren't setting aside any sepcific blocks, just a certain number of blocks.

 

Since the blocks are already there, DoT will just change the maximum number of blocks associated with the volume, but will not throw away any you are currently using.  Nor does any data have to be moved around or realigned simply because the size changes.  This isn't like changing a partition on a disk where the data has to reside in a certain section.  Go ahead and set what's appropriate for your needs.

 

 

I hope this helps you.

 

Bob Greenwald

Lead Storage Engineer

Huron Legal | Huron Consulting Group

NCDA, NCIE - SAN Clustered, Data Protection

 

Kudos and accepted solutions are always appreciated.

 

hokie1999
10,280 Views

I want to re-ask this question. I see it posed and answered in a number of posts on this community.

 

I have a NetApp FAS2552 controller with a DS4246 shelf, 24 3.5" drives. UNIX/NFS volumes. Due to changing business needs, my group needs to create a new volume on this NetApp that is already full. I see a volume, vol_research, where there are 7.25 TB free, see attached screenshot.

 

If I shrink vol_research to 10 TB, will the existing data be ok?

JohnChen
10,274 Views

First, it will not allow you to shrink the vol if the data will be truncated.

However, you do not want to cut it too short just in case - you need to check snapshot, compression, and etc to leave some room for it.

 

hokie1999
10,271 Views

So you're saying it will give me a warning, ok, I'm good with that. Thanks.

aborzenkov
10,272 Views
You cannot reduce volume size below actually consumed by current data. Is this volume used for NAS or SAN data?

hokie1999
10,269 Views

@aborzenkov this is NAS, and no I would not shrink below what's already there. I would keep the data there and with the new space, I'd create a volume for my group.

Public