Question about inodes
am 28.07.2008 09:17:30 von Lars Solberg
Hello!
I've always thought at indes as something uniq on every file on the
same file system. Today, I saw something weird that tickled my theory
about this. I found two folders, on the same filesystem that had the
same indoe. It is inode 1. Here is some info..
[root@test ~]# ls -lid /sys
1 drwxr-xr-x 11 root root 0 Jul 25 13:06 /sys
[root@test ~]# ls -lid /dev/pts
1 drwxr-xr-x 2 root root 0 Jul 25 13:06 /dev/pts
[root@test ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
36756152 2138060 32720828 7% /
/dev/hda1 101086 11818 84049 13% /boot
tmpfs 253652 0 253652 0% /dev/shm
[root@test ~]# ls /sys/
block bus class devices firmware fs kernel module power
[root@test ~]# ls /dev/pts/
0
[root@test ~]# stat /sys/ ; stat /dev/pts
File: `/sys/'
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 0h/0d Inode: 1 Links: 11
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-07-28 07:51:41.543581362 -0100
Modify: 2008-07-25 13:06:46.705937679 -0100
Change: 2008-07-25 13:06:46.705937679 -0100
File: `/dev/pts'
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: bh/11d Inode: 1 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2008-07-28 07:51:53.067829410 -0100
Modify: 2008-07-25 13:06:46.707937375 -0100
Change: 2008-07-25 13:06:46.707937375 -0100
[root@larscen ~]# fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4865 38973690 8e Linux LVM
[root@test ~]# uname -a
Linux test 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686
i386 GNU/Linux
As you see, both /sys and /dev/pts have the same inode. This is not an
issue, but a question.
I can see that the device is not the same on these two files/folders,
but they are on the same fs..
I searched for a couple of more inodes (find / -inum NUMBER) to find
out that this is very common..
The OS is centos5, but the same seems to be the case on debian.
Side question: How many % used inodes critical to much? I have a
server that have around 66% used inodes,
and wonder if I should do something or if I should let the problem fix itself.
Thanks
Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Question about inodes
am 28.07.2008 12:15:14 von adamb
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA88197AF7929097A5A9CC5E7
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Hi Lars,
If you are using devfs then /dev is a different file system (as=20
is /dev/pts if you are using devpts). Doing:
df / /dev /dev/pts
should show something like:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 234361956 10748068 211516944 5% /
- 996564 128 996436 1% /dev
devpts 0 0 0 - /dev/pts
Cheers
Adam
Lars wrote:
> Hello!
>=20
> I've always thought at indes as something uniq on every file on the
> same file system. Today, I saw something weird that tickled my theory
> about this. I found two folders, on the same filesystem that had the
> same indoe. It is inode 1. Here is some info..
>=20
>=20
> [root@test ~]# ls -lid /sys
> 1 drwxr-xr-x 11 root root 0 Jul 25 13:06 /sys
>=20
> [root@test ~]# ls -lid /dev/pts
> 1 drwxr-xr-x 2 root root 0 Jul 25 13:06 /dev/pts
>=20
> [root@test ~]# df
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00
> 36756152 2138060 32720828 7% /
> /dev/hda1 101086 11818 84049 13% /boot
> tmpfs 253652 0 253652 0% /dev/shm
>=20
> [root@test ~]# ls /sys/
> block bus class devices firmware fs kernel module power
>=20
> [root@test ~]# ls /dev/pts/
> 0
>=20
> [root@test ~]# stat /sys/ ; stat /dev/pts
> File: `/sys/'
> Size: 0 Blocks: 0 IO Block: 4096 directory
> Device: 0h/0d Inode: 1 Links: 11
> Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ roo=
t)
> Access: 2008-07-28 07:51:41.543581362 -0100
> Modify: 2008-07-25 13:06:46.705937679 -0100
> Change: 2008-07-25 13:06:46.705937679 -0100
> File: `/dev/pts'
> Size: 0 Blocks: 0 IO Block: 4096 directory
> Device: bh/11d Inode: 1 Links: 2
> Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ roo=
t)
> Access: 2008-07-28 07:51:53.067829410 -0100
> Modify: 2008-07-25 13:06:46.707937375 -0100
> Change: 2008-07-25 13:06:46.707937375 -0100
>=20
> [root@larscen ~]# fdisk -l
> Disk /dev/hda: 40.0 GB, 40020664320 bytes
> 255 heads, 63 sectors/track, 4865 cylinders
> Units =3D cylinders of 16065 * 512 =3D 8225280 bytes
>=20
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 13 104391 83 Linux
> /dev/hda2 14 4865 38973690 8e Linux LVM
>=20
> [root@test ~]# uname -a
> Linux test 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686
> i386 GNU/Linux
>=20
>=20
> As you see, both /sys and /dev/pts have the same inode. This is not an
> issue, but a question.
> I can see that the device is not the same on these two files/folders,
> but they are on the same fs..
>=20
> I searched for a couple of more inodes (find / -inum NUMBER) to find
> out that this is very common..
>=20
> The OS is centos5, but the same seems to be the case on debian.
>=20
>=20
> Side question: How many % used inodes critical to much? I have a
> server that have around 66% used inodes,
> and wonder if I should do something or if I should let the problem fix =
itself.
>=20
> Thanks
> Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--------------enigA88197AF7929097A5A9CC5E7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIjZwyfNJVASeK9ugRAqEnAJ9U5drRUvc59DXUEKO5FOVhx4m8IgCa A8Xq
P1aEhOak1m240MyQvHrxpqI=
=9u4S
-----END PGP SIGNATURE-----
--------------enigA88197AF7929097A5A9CC5E7--
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Question about inodes
am 28.07.2008 13:59:16 von Glynn Clements
Lars wrote:
> I've always thought at indes as something uniq on every file on the
> same file system. Today, I saw something weird that tickled my theory
> about this. I found two folders, on the same filesystem that had the
> same indoe. It is inode 1. Here is some info..
>
>
> [root@test ~]# ls -lid /sys
> 1 drwxr-xr-x 11 root root 0 Jul 25 13:06 /sys
>
> [root@test ~]# ls -lid /dev/pts
> 1 drwxr-xr-x 2 root root 0 Jul 25 13:06 /dev/pts
Inode numbers are only unique within a filesystem. /sys and /dev/pts
are separate filesystems.
> [root@test ~]# df
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00
> 36756152 2138060 32720828 7% /
> /dev/hda1 101086 11818 84049 13% /boot
> tmpfs 253652 0 253652 0% /dev/shm
"df" only lists filesystems which correspond to block devices. Use
"mount" or "cat /proc/mounts" for a complete list.
> As you see, both /sys and /dev/pts have the same inode. This is not an
> issue, but a question.
> I can see that the device is not the same on these two files/folders,
> but they are on the same fs..
No they aren't.
/proc, /proc/bus/usb, /sys, /dev, /dev/pts, and /dev/shm are usually
separate filesystems (/dev might not be if you're using static device
files rather than devfs).
--
Glynn Clements
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html