rahmad1
1 Copper

How to shrink a filesystem

Hi,
Being a novice, I'm wonder if anyone can provide guidance on how to shrink a filesystem in an NS702. What I have now is fs0 with 100GB, and it's apparently has been over allocated. Now that I have limited free diskspace, I need to shrink this filesystem to accomodate new one.

Pls advise on how I can resize it while maintaining the data, and retaining the filesystem name.

Thanks in advance.
Tags (2)
0 Kudos
15 Replies
dynamox
6 Thallium

Re: How to shrink a filesystem

looking at Celerra documentation i do not see an option to reduce file system size. You might have to create another file system and copy the data manually (emcopy, robocopy on the host side) or server_archive on the celerra side ...i had a threat about copying fs to fs and somebody posted a very good script to do this.

Message was edited by:
dynamox
0 Kudos
Rainer_EMC
5 Osmium

Re: How to shrink a filesystem

correct - there currently is no way to shrink a file system.

All you can do is create a new, smaller one and copy the data. Either thru client-side utils like emcopy/robocopy/rdist or using server_archive

If you feel strongly about it you can file a Product Enhancement Request thru Powerlink

For smaller file data spaces its easier to create a larger file system and put multiple tree quoatas in it - tree quotas are subdirs that can be enlarged and shrunk on the fly.
dynamox
6 Thallium

Re: How to shrink a filesystem

there is one thing i wish tree quotas had ..being able to apply them to existing directory structure. So for migration from Windows system to Celerra...you have to pre-create your directories with tree quotas set and then migrate your data ...pain pain pain :)
0 Kudos
Rainer_EMC
5 Osmium

Re: How to shrink a filesystem

go to Powerlink, then Contact Customer Serice and open a Product Enhancement request

These requests get tracked and influence future Celerra capabilities
0 Kudos
Highlighted
rajans
1 Copper

Re: How to shrink a filesystem


here is one way .

This needs a bit of outage .

Assumption : fs01 is the filesystem that has been extended beyond limit say it was 10GB and now became 100GB which was not intended and used up space is 9GB

fs01 is mounted on /fs01 and shared as "fs01"

1. Create a required small size filesystem fs01 = 10GB

2. unmount the fs01 and mount it as ro as we do not want any changes during the copy.

3. mount the new filesystem fs02 as /fs02

4. use the ndmptool in the /nas/tools/ndmptool

5. use the copy filesystem functionality in the ndmptool and copy the

contents from fs01 to fs02

6. once the copy is finished unmount /fs02 and /fs01

7. mount the new fs02 as /fs01 ( reuse of the old mountpoint)

8. mount the fs01 as /fs01_temp

9. verify the access and data

10. once you are satisfied  rename the old filesystem fs01 to fs01_delete

11. rename the newfilesystem fs02 as fs01  ( now you have the old shape of the fs01 with 10GB)

12 once you are happy with everything you can unmount the fs01_delete permanently and delete to reclaim space.

Make sure you disable the autoextend on the new filesystem so that it does not happen again .

or enforce quota for users .

The above procedure is same as .

backing up the filesystem using ndmp,

creating a new filesystem and restoring instead we use simple procedure  without involving the DMA .

dynamox
6 Thallium

Re: How to shrink a filesystem

it's much easier to use server_archive

0 Kudos
rajans
1 Copper

Re: How to shrink a filesystem

server_archive can fail some times .

ndmptool is reliable ....

0 Kudos
dynamox
6 Thallium

Re: How to shrink a filesystem

used it to migrate many terabytes, solid tool. Different strokes for different folks ..same result.

0 Kudos

Re: How to shrink a filesystem

Dynamox,  Is it require any down time. Can you please share the procedure for the same.

Thanks in advance.

0 Kudos