On 31-Oct-98 [EMAIL PROTECTED] wrote:
> 
> On 30-Oct-98 15:03:46 Cort wrote:
>> 
>> On 30-Oct-98 h-to-he wrote:
>>> Problem again,..
>>> I couldn't create a file or directory when I log as "user",.the message is
>>> "no space left on device".
>>> but not when I log as "root". I already tried to change permission on
>>> /home,.but faile
>>> Anyone could help me?
>> 
>> A second extended filesystem will by default reserve a certain percentage of
>> disk space for the superuser. This is to prevent normal users from hogging
>> all
>> the disk space and prevent root and root owned process from having
>> sufficient
>> disk space to work in.
>> 
>> You can modify this behavior by using the tune2fs utility. Be sure to read
>> through the man pages carefully before using it.
>> 
> Thanks to you Cort, also to Bill Kocik to respond me.
> I have read the man pages about tune2fs,..but I'm still "blind"
> Could you give clue to use this tune2fs?

Well, I intentionally omitted any detail instruction on the use of "tune2fs" as
this utility can cause serious damages to your filesystem if improperly used.

Anyway, try the following, but be sure to read through the tune2fs man page
again before you do anything.

First, obtain some additional information on your filesystems. Run "mount" and
find out the filesystem as well as the device that "/home" is on.

        /dev/hda1 on / type ext2 (rw)
        none on /proc type proc (rw)

In this example, the "/home" directory is on the "/dev/hda1" device with a
second extended filesystem.

        /dev/hda1 on / type ext2 (rw)
        none on /proc type proc (rw)
        /dev/hdc on /home type umsdos (rw)

In this example, the "/home" directory is on the "/dev/hdc" device with a
umsdos filesystem. In this case, you cannot fix the problem using "tune2fs",
you will need to use an alternative method. Only proceed if your "/home"
directory is on a second extended filesystem.

Next, you'll need more information on the relevant filesystem. Run "df" command
as well as the following command "tune2fs -l /dev/hda1", but remember to
replace "/dev/hda1" with the device your "/home" directory is on. Most of the
information that is listed by the program can be safely ignored, but pay
attention to the following.

>From df
        Filesystem         1024-blocks  Used Available Capacity Mounted on
        /dev/hda1             372721  282562    70910     80%   /

>From tune2fs -l
        Reserved block count:     19249
        Free blocks:              90159
        Reserved blocks uid:      0 (user root)
        Reserved blocks gid:      0 (group root)

df will tell you how many blocks is available to a normal user. The "Free
blocks" listed by "tune2fs -l /dev/hda1" will tell you how many blocks are
really available. While the "Reserved block count" will tell you how many
blocks are being reserved.

The "Reserved blocks uid" and the "Reserved blocks gid" tells you which user
and group respectively can make use of the "Reserved blocks".

        "Free blocks" - "Reserved block count" = "Available blocks"
        90159         - 19249                  = 70910

Your situation is quite possibly due to the fact that you have no "Available
blocks" for use by a normal user, but root can still use the "Reserved blocks".

One solution is to reduce the amount of "Reserved blocks" to allow more
"Available blocks". Another solution is to change the "Reserved blocks gid" to
allow a normal user to use the "Reserved blocks". I would not recommend the
second method.

Before you make any changes, remember to un-mount the filesystem to be
modified. Or at least re-mount it in read-only mode. This step is essential!

To change the "Reserved blocks count", run the following command. Remember to
change "/dev/hda1" to the device of your filesystem, and
"reserved-blocks-percentage" to the percentage of blocks you want to reserve.
The default is 5 so provide a value that is less than 5.

        tune2fs -m reserved-blocks-percentage /dev/hda1

To change the user group which can use the reserved blocks, run the following
command. Remember to change "/dev/hda1" to the device of your filesystem, and
"group" to the group that your user is in.

        tune2fs -g group /dev/hda1

That should be it.

Important note! These changes may eventually cause root to run out of disk
space. I have absolutely no idea how the running of your system will be
affected when this occur, but you might what to keep a few boot disk with you
just in case.

As always, I'm not responsible if anything goes wrong.

Cort
[EMAIL PROTECTED]

Reply via email to