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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

df -k issue

Status
Not open for further replies.

juggers

IS-IT--Management
Jul 11, 2000
66
0
0
SA
Hi all,

Is it possible that while creating partition you can define it to use half of the hardisk space? We have a hard disk of 36 GB space and it shows 36 GB with df -k. In reality the hard disk gets full on 50% and you can't add a single bit to it. Some support desk said it is partitioned in a wrong way!! is that possible is there any fix for that without loosing the data on that partition.

Regards

time is the father of truth
 
Can you show us the output of format (partition table/print), please?
 
Hi,

this slice is in use. do you mean I should run format > verify? or format > partition ? . I do not want to update anything just display information. I am not good with filesystem issues.

Thanks

time is the father of truth
 
As long as you're careful, you can simply display the disk layout, doing the following:

format

Type s followed by the number of the disk you wish to examine as listed.

partition (or part)

print (or pr)

This will display the layout of the disk in question. Copy that and post it here if possible.

Type q followed by q to exit out of the format utility.

Followin the above steps will not affect anything adversely.


 
Apologies, I neglected to mention that you might also find information using the prtvtoc /dev/dsk/<disk> command. man prtvtoc for more information.
 
prtvtoc /dev/dsk/c0t9d0s0
/dev/dsk/c0t9d0s0 partition map

Dimensions:
512 bytes/sector
248 sectors/track
19 tracks/cylinder
4712 sectors/cylinder
7508 cylinders
7506 accessible cylinders

Flags:
1: unmountable
10: read-only

First Sector Last
Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 0 35368272 35368271 /foip
2 5 00 0 35368272 35368271


time is the father of truth
 
The sector count translates as 16.86 Gb. Can you show the df -k output, please?
 
Is the sector size always 512 bytes on all Sun systems ?
 
df -k
ilesystem kbytes used avail capacity Mounted on
dev/dsk/c0t0d0s0 1192748 63272 1069839 6% /
dev/dsk/c0t0d0s5 3006003 512697 2433186 18% /usr
dev/dsk/c0t0d0s3 828749 635710 135027 83% /var
dev/dsk/c0t9d0s0 17413250 7786981 9452137 46% /foip


time is the father of truth
 
Hmm. The above df -k shows the disk as 16.6 Gb. Are you sure it's a 36 Gb?

As I mention earlier, the format and partition/print might give a better clue as to what's going on.
 
Meant to add (oh for an edit facility). You can check what the system thinks your disk is with format/current (having selected the appropriate disk) too. Again, this is non-destructive.
 
Hi,

Teh ahrd is 18 GB I am sorry, but I mean whernever it is used at 50% wich is 9 GB it is giving us device is full.

Is it possible that it has a bad sector or somehting similar?

Regards

time is the father of truth
 
Can you run an fsck on the disk? If not, as I mention, let us see the format output. Another shot in the dark - could it be an inode issue? Is there anything in /var/adm/messages or on the console to indicate a problem?
 
is fsck destructive can it be run while users are online.

Regards

time is the father of truth
 
man fsck, but you can use the -m option to check but not repair (if any problems found). At least then you will know whether you have a problem which might be fixed by fsck. The filesystem will need to be unmounted so users would have to come off the machine.
 
Just a shot in the dark, but there is a setting for each disk called [tt]minfree[/tt] which is the inimum percentage of free space that's held back from normal users. Type...
Code:
fstyp -v /dev/rdsk/c0t9d0s0 | head -20
Look for [tt]minfree[/tt]. If it's set to somewhere around 50%, then that's your problem. You can change it with [tt]tunefs[/tt]. See the man page for details.
 
You can check your inode usage with [tt]df[/tt]. DO the following...
Code:
df -F ufs -o i
 
Ok Sambones I think we got it
Filesystem iused ifree %iused Mounted on
/dev/dsk/c0t0d0s0 4510 287202 2% /
/dev/dsk/c0t0d0s5 28296 457912 6% /usr
/dev/dsk/c0t0d0s3 3331 415293 1% /var
/dev/dsk/c0t9d0s0 1846145 276991 87% /fiop

What to do now that's the guilty partition compared to
df -k

dev/dsk/c0t0d0s3 828749 634379 136358 83% /var
/dev/dsk/c0t9d0s0 17413250 7811729 9427389 46% /fiop

Now how to fix it?

Regards


time is the father of truth
 
daFranz gives an example here:

Thread60-821339

Based on a Google search I would suggest backing up the filesystem, blowing it away and then using newfs to recreate with new parameters before restoring the data. I'm afraid this means downtime.
 
Check your block counts.. not you kb...
It is entirley possible with files of less than 4k to end up wit less than have the fs full in terms of KB used and as little as 75% inodes and still be out of fs blocks.
see this thread: thread60-1219642
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top