How to change minimal free disk space

How to change minimal free disk space

Post by Rob Zomerdi » Wed, 03 Jun 1992 22:31:17



  Hello,

  Possible a simple question! How can I change the
minimal free disk space allowed (default is 10 percent)
on a ufs-filesystem (Unix SysV.4) without the need of
recreating the filesystem with mkfs.

  Please reply by mail...

  Thanx, Rob

      +-----------------+-------------------------------+

    / Mediasystemen   /        ...!sun4nl!media03!rzo /
   / Postbox 4932    /                               /
  / 2003 EX Haarlem / VOICE: + 31-23-319075         /
 / The Netherlands / FAX  : + 31-23-315210         /
+-----------------+-------------------------------+
        !!! Hello, I must be going !!!

 
 
 

How to change minimal free disk space

Post by edward.m.freedenbu » Thu, 04 Jun 1992 03:47:56



>  Possible a simple question! How can I change the
>minimal free disk space allowed (default is 10 percent)
>on a ufs-filesystem (Unix SysV.4) without the need of
>recreating the filesystem with mkfs.

Try this!

tunefs(1M)

     NAME
       tunefs - tune up an existing file system

     SYNOPSIS
       /usr/sbin/tunefs [-a maxcontig] [-d rotdelay]
                [-e maxbpg] [-m minfree]
          [-o [s | t]] special | filesystem

          DESCRIPTION

       tunefs is designed to change the dynamic parameters of
       a file system which affect the layout policies.  The file
       system must be unmounted before using tunefs.  The
       parameters which are to be changed are indicated by the
       options given below:

       -m minfree

            Specify the percentage of space held back from normal
            users; the minimum free space threshold.  The default
            value used is 10%.  This value can be set to zero,
            however up to a factor of three in throughput will be
            lost over the performance obtained at a 10% threshold.
            Note:  if the value is raised above the current usage
            level, users will be unable to allocate files until
            enough files have been deleted to get under the higher
            threshold.

Ed Freedenburg


 
 
 

How to change minimal free disk space

Post by Omar Sy » Thu, 04 Jun 1992 05:24:55


I have a program which needs to scan the keyboard for any
key presses.  Does anyone know how this is done in UNIX (AT&T
System V enviornment) using a C program.  I can't seem to find any
UNIX system calls that do it and the input routines provided by C
don't return until you enter a return character.  Thanks for any
help you may be able to provide.

Omar

 
 
 

How to change minimal free disk space

Post by Omar Sy » Fri, 05 Jun 1992 00:05:43


Yesterday I posted the following question:

Quote:>I have a program which needs to scan the keyboard for any
>key presses.  Does anyone know how this is done in UNIX (AT&T
>System V enviornment) using a C program.  I can't seem to find any
>UNIX system calls that do it and the input routines provided by C
>don't return until you enter a return character.  Thanks for any
>help you may be able to provide.

Thanks to all people who responded.  I have put together the following
program and routines for anyone else who might have the same question.

Omar

#include <stdio.h>
#include <fcntl.h>
#include <termio.h>

main()
{
  int s;
  char key;

  init();
  for(;;){
    s = keyscan(&key);
    if (s != 0) printf("You pressed '%c'\n",key);
    else printf("no input\n");
    if (key == 'q') break;
  }
  final();

Quote:}

static int stdinfd;
static struct termio tio_save;
static int ff_save;

init()
{
  int ff;
  struct termio tio;

/*      Get the file descriptor for stdin and duplicate it */
  stdinfd = fileno(stdin);
  stdinfd = dup(stdinfd);
/*      Get the termio structure and save it */
  ioctl(stdinfd,TCGETA,&tio_save);
  bcopy((char *)&tio_save,(char *)&tio,sizeof(struct termio));
/*      Disable the ICANON and ECHO flags */
  tio.c_lflag = tio.c_lflag&~(ICANON|ECHO);
/*      Set minimum number of characters in buffer to zero */
  tio.c_cc[4] = 0;
/*      Set amount of time to wait for characters to zero */
  tio.c_cc[5] = 0;
/*      Change the termio structure for stdin */
  ioctl(stdinfd,TCSETA,&tio);
/*      Enable the no delay flag on stdin, so that read() is not blocked */
  fcntl(stdinfd,F_GETFL,&ff_save);
  ff = ff_save | FNDELAY;
  fcntl(stdinfd,F_SETFL,ff);

Quote:}

final()
{
/*      Restore the initial settings */
  ioctl(stdinfd,TCSETA,&tio_save);
  fcntl(stdinfd,F_SETFL,ff_save);

Quote:}

keyscan(c)
  char *c;
{
  int s;

  s = read(stdinfd,c,1);
  return s;

Quote:}

 
 
 

1. FREE E-MAIL, FREE DISK SPACE, FREE UNIX ACCOUNT

FREE E-MAIL ACCOUNT, FREE DISK SPACE, FREE UNIX ACCOUNT.

Sounds unbelievable right?  Well it's true.  What's the catch?
There is no.  Why free accounts?  Well as a Computer Science
major planning on gaining some administrative experience, I
felt it would be the best way of attracting users.  Any risks
involved?  One, the system is going to
be run by me, <Hehehe> an amateur system administrator.  I
have no professional experience with UNIX-based systems.  But I
know what I am doing to an extent.  I'm a 2nd year Computer
Science major at Ramapo College of New Jersey and I've worked on a
UNIX-based system for 2 years and now my new Linux system for a few
months.  Obviously I don't know the
in's and out's of it and so that's the risk you have to deal with.
So how much harm could I do?  Well I could unintentionally delete
your account with about 10 key strokes.  So what do I plan to do
about that?  Well daily/weekly backups will need to be performed.
Anything else I need to know?  Well you need an internet connection
to reach my system.

Well I have much more to tell you, but let me head into one area
which I need to mention.  A free account is great, but if it leads
to abuse there will be problems.  I'll tell you know that I reserve
the right to remove your account at any time if I sense abuse.  That
means all of Megabytes of your important e-mail will be lost.  I'm telling
you this now because I'm sure there will be people on here that know
more about computers than I.  But if I sense anything, I have have to
take action in order to prevent everyone else from being screwed.  Well
that's about it.  If you are still interested and want to know more give me

2. Monitor System Messages

3. FREE E-MAIL ACCOUNT, FREE DISK SPACE, FREE UNIX ACCOUNT.

4. installing NT after Linux- zero write utility

5. Capturing an interupt log

6. FREE E-MAIL ACCOUNT, FREE DISK SPACE, FREE UNIX ACCOUNT

7. Intel AC97, wierd problem

8. FREE EMAIL ACCOUNT FREE DISK SPACE FREE UNIX ACCOUNT

9. Disk space, where are my files, where is my free space?

10. Strange disk free space/used space...

11. How much disk space for minimal Linux/XFree86/Qt/KDE/OpenGL?