[ltp] Disk damage?
Marius Gedminas
linux-thinkpad@linux-thinkpad.org
Tue, 13 Jul 2004 22:06:55 +0300
--vGgW1X5XWziG23Ko
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Jul 13, 2004 at 08:43:31PM +0200, Ch. Veith wrote:
> I got a strange morning today...When I was booting my R40 I was=20
> wondering why my normal-user could not login to X-server, but root could!
> I thought that it might be a matter of diskspace and called df -h. It=20
> told me that that 0% were free - so I removed about 1GB to another=20
> machine. After that I called df again and still got 0% !!!
By default 5% (or 10%, I can't remember now) of free disk space is
reserved for the root user. (The primary reason for this is that
ext2/ext3 does not suffer from fragmentation unless the partition fills
up, so keeping 10% always free is a good idea. Also, the extra space
can be used in emergencies when some other user fills the disk.)
> After some testing around I removed another 2GB, and got the following:
>=20
> Filesystem Size Used Avail Use% Mounted on
> /dev/hda2 37G 33G 1.7G 96% /
These 10% are not included in the "avail" column of df, so you now
actually have 1.7 + 1.5 GB =3D 3.2 GB physically free.
You can see the actual numbers with tune2fs -l /dev/hdaX:
$ sudo tune2fs -l /dev/hda2
tune2fs 1.35 (28-Feb-2004)
Filesystem volume name: <none>
...
Inode count: 3784704
Block count: 7567560
Reserved block count: 378378
Free blocks: 544080
Free inodes: 3223487
First block: 0
Block size: 4096
...
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
...
On my 29 GB partition (7567560 * 4KB) 1.4 GB is reserved for user root
and group root. 2 GB is still free, but df -h only shows 648M free.
HTH,
Marius Gedminas
--=20
As far as we know, our computer has never had an undetected error.
-- Weisert
--vGgW1X5XWziG23Ko
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA9DLOkVdEXeem148RApgfAKCGuDDJD5lnaVGLsEXGM8ihXVVEMACfZacP
mVwuihHipj9LiDGGSD1MRYA=
=VP/j
-----END PGP SIGNATURE-----
--vGgW1X5XWziG23Ko--