AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  JFS2 fs need to shrink a large fs

    Posted Sat August 11, 2012 10:49 AM

    Originally posted by: GurpreetSingh


    Hi Guys,

    I used to think that we can reduce jfs2 fs anytime we want but now I am faced up with situation where I am not able to reduce it after certain limit. I have to shrink some jfs2 filesystems and I am left with no other option then to create a new fs with smallest size in which I can fit all the contents, copying the content and then removing the old fs.

    Painful job :( .. Have any of you guys faced up with such situation? is there any other workaround for this?

    Would appreciate all sort of suggestion.

    Thanks & Regards,
    Gurpreet
    #AIX-Forum


  • 2.  Re: JFS2 fs need to shrink a large fs

    Posted Sat August 11, 2012 11:50 AM

    Originally posted by: sajjadhashimi


    Can you give more specifics on the issue? commands being run, errors recieved etc etc.
    #AIX-Forum


  • 3.  Re: JFS2 fs need to shrink a large fs

    Posted Sat August 11, 2012 11:59 AM

    Originally posted by: GurpreetSingh


    1. chfs -a size=-50G /fsname
    chfs: 0506-964 There is not enough free space to shrink the file system.

    although there is 500G + free space in the fs :(

    its 2 TB fs
    #AIX-Forum


  • 4.  Re: JFS2 fs need to shrink a large fs

    Posted Sat August 11, 2012 12:15 PM

    Originally posted by: sajjadhashimi


    How much space you have free in /tmp?
    #AIX-Forum


  • 5.  Re: JFS2 fs need to shrink a large fs

    Posted Sat August 11, 2012 12:19 PM

    Originally posted by: sajjadhashimi


    Look at this too, I think it'll help you. Two good suggestions there, one to shrink in chunks, 2nd is to add a disk to vg and then try shrinking it, I'd try combination of both if needed.

    http://www.unix.com/aix/113794-shrinking-filesystem-error.html
    Hth.
    #AIX-Forum


  • 6.  Re: JFS2 fs need to shrink a large fs

    Posted Mon August 22, 2016 10:44 AM

    Originally posted by: byzantium


    Hello 

    Make sure that nothing is writing to the file system.  I had the same issue and stopped the process writing to the file system and was able to shrink it with no issues.


    #AIX-Forum


  • 7.  Re: JFS2 fs need to shrink a large fs

    Posted Wed August 24, 2016 12:10 PM

    Originally posted by: AncientAIXer


    About 7 years ago I worked at IBM.  I had a PMR opened where I could not shrink an FS on AIX 5.3 at the time.  The FS was 15 Tb with a target size of 8 Tb.  I could only shrink it by 2 PP at first, then 1 PP, then none.  IBM support told me that in order for the shrink to work there needs to be contiguous free space.  Unfortunately, AIX spreads the used space for performance.  I asked about defragfs and was told that it does not create contiguous free space.  I suggested that they have a flag to tell it to consolidate the free space so that the FS could be shrunk and then it could be used normally.  About that time I was laid off in IBM's yearly lay offs so I don't know what came of it.

    Looking at AIX 6.1's man page for defragfs, it states that the purpose is "Increases a file system's contiguous free space.".   If you are still having issues, you might try it...


    #AIX-Forum