shrinking filesystem error


 
Thread Tools Search this Thread
Operating Systems AIX shrinking filesystem error
# 1  
Old 07-07-2009
shrinking filesystem error

Hi Guys,

probably a standard issue, so what do I miss here?

Error message:
> chfs -a size=-128M /export/nim/aix/5300-10
chfs: 0506-964 There is not enough free space to shrink the file system.


df shows 0.75GB free

> df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/lvnimaix5300-10 4.47 0.75 84% 15324 8% /export


du shows about 3.7GB files in use.
> du -sm *
0.00 lost+found
3298.62 lpp
490.47 spot

further info:
/tmp has 512MB free
defragsfs has run on the filesystem
PP SIZE: 32 megabyte(s)

> lsfs -q /dev/lvnimaix5300-10
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/lvnimaix5300-10 -- /export/nim/aix/5300-10 jfs2 9371648 rw yes no
(lv size: 9371648, fs size: 9371648, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no)


How can I see the real-free space of the volume and why can't I shrink this filesystem.??

thanx

Randy
# 2  
Old 07-07-2009
AFAIK there is no command available yet to tell how much an existing filesystem can be shrunk. The problem you encounter is related to filesystem fragmentation (and probably metadata). However, you could try to reduce filesystems size not in one step of 128 MB but in several steps of 32 MB (repeatedly run defragfs then shrink by one PP) and see how far you get. If you need the free space desperately you might be forced to backup the FS content, delete it from the FS, reduce size of empty FS and restore data from backup.
# 3  
Old 07-07-2009
in a new filesystem 4GB large, the files couldn't be copied over (disk-full message)

question is: How can I tell the fs is 100% full instead of the 83% the df-command shows?
# 4  
Old 07-07-2009
Quote:
Originally Posted by raba
[...]question is: How can I tell the fs is 100% full instead of the 83% the df-command shows?
df does not show information about FS metadata. Can you backup the data with compression?
# 5  
Old 07-07-2009
if you mean tar or gzip
size after tar: 3.8GB
size after gzip:2.2GB

I extracted everything successfully in a new and smaller filesystem. see below:

> du -sm *
0.00 lost+found
3298.50 lpp
505.18 spot

> df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/fslv00 3.75 0.03 100% 15324 68% /mnt

why is this possible?
# 6  
Old 07-07-2009
By restoring data from the archive it was written contiguously into the FS. I.e. no fragmentation (at least for the moment being Smilie )
# 7  
Old 07-07-2009
RE: Shrinking filesystem eroor

Hello Randy,

What is the state of the VG where export/nim/aix/5300-10 is located?
lsvg <vgname>

I have had the same problem. Looking at the VG showed that there were no free PP's in this VG. Normally one would think you do not need free space in de VG to shrink a filesystem. When I added an extra LUN/disk to the VG. I was able to shrink the filesystem. Afterwards I removed the extra LUN/disk.

Regards,

Patrick Prevoo

Quote:
Originally Posted by raba
Hi Guys,

probably a standard issue, so what do I miss here?

Error message:
> chfs -a size=-128M /export/nim/aix/5300-10
chfs: 0506-964 There is not enough free space to shrink the file system.


df shows 0.75GB free

> df -g .
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/lvnimaix5300-10 4.47 0.75 84% 15324 8% /export


du shows about 3.7GB files in use.
> du -sm *
0.00 lost+found
3298.62 lpp
490.47 spot

further info:
/tmp has 512MB free
defragsfs has run on the filesystem
PP SIZE: 32 megabyte(s)

> lsfs -q /dev/lvnimaix5300-10
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/lvnimaix5300-10 -- /export/nim/aix/5300-10 jfs2 9371648 rw yes no
(lv size: 9371648, fs size: 9371648, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no)


How can I see the real-free space of the volume and why can't I shrink this filesystem.??

thanx

Randy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shrinking partitions in enterprise

Hello , to invent some software we need to massive shrink system volumes in our company (800 pc windows xp) . For that purpose we are planing to run remotely some linux distro with fdisk script. Some one have similar experience? ? Any information would be helpfull . THanks.;) (3 Replies)
Discussion started by: Y2J
3 Replies

2. Solaris

Shrinking zpool

Hello experts, I have a solaris 10 (SunOS 5.10 Generic_148888-05 sun4u sparc SUNW,SPARC-Enterprise) that by mistake I added a second san space of 700g to the pool. the whole pool is now 1.2T and, I need to take the space away from the pool and, make the pool 700g total. this is live oracle... (7 Replies)
Discussion started by: afadaghi
7 Replies

3. Linux

About shrinking LVM and then adding the freed space to another OS on dualboot system

Hi all, Fedora 17, 64bit Ubuntu 12.04 desktop 64bit HD 160G I installed Ubuntu 12.04 on the HD first taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and save the bootloader on /dev/sda1 to make them dualboot. Installation is successful with... (0 Replies)
Discussion started by: satimis
0 Replies

4. Ubuntu

error in displaying filesystem %

Hi, The below command is expected to display the filesystem along with the used % and available % in each of the filesystem in the linux box. df -k / | grep -v 'capacity' | gawk '{ print $5 }' But instead of displaying the actual used %, it is showing as 'Use%'. Could anyone please let... (2 Replies)
Discussion started by: lg123
2 Replies

5. UNIX for Dummies Questions & Answers

hwo to find shared filesystem and local filesystem in AIX

Hi, I wanted to find out that in my database server which filesystems are shared storage and which filesystems are local. Like when I use df -k, it shows "filesystem" and "mounted on" but I want to know which one is shared and which one is local. Please tell me the commands which I can run... (2 Replies)
Discussion started by: kamranjalal
2 Replies

6. Windows & DOS: Issues & Discussions

Consolidating Freespace to allow shrinking partition?

i have an "old" laptop with 84gb used space, 203gb free, running 32bit Windows Vista. i've tried all defragmenting programs i could find and though some offer Free Space Defrag, they don't seem to take into account where on the disk to consolidates the space to. what i am trying to achieve is... (4 Replies)
Discussion started by: Sterist
4 Replies

7. Solaris

Filesystem - error when extend the filesystem

Hi all, currently , my root filesystem already reach 90 ++% I already add more cylinder in the root partition as below Part Tag Flag Cylinders Size Blocks 0 root wm 67 - 5086 38.46GB (5020/0/0) 80646300 1 swap wu 1 - ... (11 Replies)
Discussion started by: SmartAntz
11 Replies

8. Linux

shrinking root partition and using free space to create a block device

We are intending to protect a set of user specified files using LVM mirroring where the protected space on which the user files are stored is mirrored on an LV on a different disk. Our problem is that for a user with a custom layout has installed linux with 2 partitons for swap and / and there is... (0 Replies)
Discussion started by: kickdgrass
0 Replies

9. Solaris

[help] filesystem error on solaris 10

Hi All, please help me about filesystem error on sun fire 245 sparc solaris 10, i have installed solaris 10 os on sun fire 245 and done with mirroring disk. but after reboot the server i having this error below shown by system : checking ufs filesystems /dev/md/rdsk/d60: is logging.... (4 Replies)
Discussion started by: bucci
4 Replies

10. Shell Programming and Scripting

Shrinking a file

Hi All I have a somewhat complex requirement. I have a file containing about 1 million records The records in the file are of fixed length Every record begins with 03,04 ,05 or 06 03 record is parent record. 04 05 and 06 are child records Every 03 record can have zero ,1 or more than 1... (5 Replies)
Discussion started by: aashoo_5
5 Replies
Login or Register to Ask a Question