Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can we now shrink file systems with smit? 2

Status
Not open for further replies.

rondebbs

MIS
Dec 28, 2005
109
US
Hello, I have a p570 running aix 5.3. I have a VG called sasvg1 - 544GB. I have one LV (saslv1) and a file system called /sasfs1. The LV and file system are about 500GB but only 55GB are currently being used by the file system.

I would like to shrink the file system to 100GB. This would give me several hundred GB free space in the VG. I would then create a second LV and file system that would be around 300GB.

I beleive we can now shrink an online file system with 5.3. I have never done this although I have increased many file systems while they were up and running. I go to smit - Change/Show Characteristics of an Enhanced Journaled File System. I use the tab key to change the unit size to GBs. I then go to "number of units" and type +10 to increase the file system by 10GB.

Can I simply type -400 to shrink it? This is a 24/7 application. Can I shrink it while users are logged on? If needed I could probably get an outage. My biggest concern is that I don't want to hose something.

VOLUME GROUP: sasvg1 VG IDENTIFIER: 00cda5cf00004c0000000000291aa747
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2125 (544000 megabytes)
MAX LVs: 256 FREE PPs: 2 (512 megabytes)
LVs: 3 USED PPs: 2123 (543488 megabytes)
OPEN LVs: 2 QUORUM: 2
TOTAL PVs: 3 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 3 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
root@wfssas01/#
 
All you need to do is this:

chfs -a size=-400G /sasfs1

You can do this while the users are using the same without affecting any thing (though i guess it might take some time so be patient)!

Regards,
Khalid
 
Almost missed one very important thing! You can only do this if your filesystem is jfs2 (on AIX 5.3 as you are already)!

Regards,
Khalid
 
As you state that it is an Enhanced JFS, that's OK - is the same as JFS2.

I wouldn't think twice about doing that kind of stuff online. However it is a big chunk you want to take out. The system might complain that it doesn't have enough "free" space to reduce the FS in one go, online, for 400GB. I once had the same problem and had to move some big files around inside the FS to "create" free space (contiguous enough for shrinkfs to cooperate...


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top