<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
df -ha + /proc/partitions will give Madison much more info than all
other approaches.<br>
<br>
<br>
All the Best!<br>
Sergey.<br>
<br>
Lennart Sorensen wrote:
<blockquote cite="mid20041130173009.GM8632-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys@public.gmane.org"
type="cite">
<pre wrap="">On Tue, Nov 30, 2004 at 11:32:01AM -0500, Madison Kelly wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">cat /proc/partitions any use?
</pre>
</blockquote>
<pre wrap=""><head slap>
Yes, quite actually! Thank you!
</pre>
</blockquote>
<pre wrap=""><!---->
It doesn't give anymore than a list of partitions the kernel knows
about. Free space and such and actual size are probably a different
problem. Actually free space on partition would require mounting or
filesystem specific tools to figure out.
To figure out actual disk size, partition sizes and unused space, well
that would need fdisk, and it probably requries at least read access to
the raw disk device node.
Now on my system (running debian), any user added to the 'disk' group
has full raw access to the disk and can hence use /sbin/fdisk. probably
not a safe idea in general as it lets the user modify the disk at will.
Having just an sudo entry for running fdisk -l (and no other fdisk
options) should actually be safe. Sudo can be quite restrictive in how
you are allowed to run a command. You should be able to say something
like 'only allow user to run fdisk -l' and then not allow passing any
arguments. It should then just list every partition on every disk and
how big they are and how much unpartitioned space is on the disk and
such.
Now if you add software raid or lvm to the mix, you need additional
tools to determine volume sizes and such. :)
Lennart Sorensen
--
The Toronto Linux Users Group. Meetings: <a class="moz-txt-link-freetext" href="http://tlug.ss.org">http://tlug.ss.org</a>
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: <a class="moz-txt-link-freetext" href="http://tlug.ss.org/subscribe.shtml">http://tlug.ss.org/subscribe.shtml</a>
</pre>
</blockquote>
<br>
</body>
</html>