LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2009, 03:22 AM   #1
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Rep: Reputation: 15
Question Unable to view i-node values for Partition


I am not able to view the i-node values for my Linux partition by using
df -i
.The output of df -i is


linux-hqif:/ # df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda5 0 0 0 - /
udev 224087 432 223655 1% /dev
/dev/sda1 0 0 0 - /boot



The Os Version: SUSE 10.2.

But i can able to view the I-node values of files by using ls -i ( The files are located in same partition(/)).

Is there any other command's to view the i-node information for partition?

Thanks
 
Old 02-11-2009, 05:46 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
A partition doesn't have an i-node. df -i will give you the number of i-nodes used and the number available on the filesystem.

Looking at "df -i /dev/sda*" will list the i-node counts for each partiton on the first disk.

Are you instead looking for the i-node number of the special file itself?
e.g.
ls -i /dev/sda1

Last edited by jschiwal; 02-11-2009 at 05:47 AM.
 
Old 02-12-2009, 01:15 AM   #3
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
Exclamation

Thanks For Ur Reply

But I am getting same Error.

inux-hqif:~ # df -i /dev/sda1
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 0 0 0 - /boot
linux-hqif:~ #
 
Old 02-12-2009, 01:24 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
What file system are we talking about?

Not all fs's are based on i-nodes.
 
Old 02-12-2009, 01:30 AM   #5
msivadass
LQ Newbie
 
Registered: Nov 2007
Location: India
Distribution: RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
i want to know how many i-nodes are free for particular partition.
 
Old 02-12-2009, 01:33 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The answer could depend on whether the device is mounted or not.
Code:
df -i /dev/sda2
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda2             255552  190801   64751   75% /mnt/vista
sudo umount /dev/sda2
df -i /dev/sda2
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
udev                  506053    1379  504674    1% /dev
The first is the number of inodes, which is from the virtual layer (VFS) of the mounted filesystem. These inodes are in memory or memory cache.
The second line after unmounting is the inodes of the root filesystem.
 
Old 02-12-2009, 01:42 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by msivadass View Post
i want to know how many i-nodes are free for particular partition.
I don't understand that phrase at all.

Anyway, what you don't seem to understand is that the i-nodes are not a partition thing. They are just internal structures of the filesystem, and only for some filesystems. There are not i-nodes on a partition, and there are not i-nodes on a disk. You only have i-nodes on a filesystem after you've created it, and only on some of them.

Some others organize the information using different base structures.

So, again: if that partition formated? And if it is: what filesystem are we talking about?

PS. What it seems to me is that you are trying to find how many i-nodes are free for a FAT32 volume, which isn't supported since FAT is not a filesystem based on i-nodes (hence, it truly contains zero i-nodes, and if my memory serves correctly, two File Allocation Tables).

Last edited by i92guboj; 02-12-2009 at 01:49 AM.
 
Old 02-12-2009, 02:02 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
OP probably has the same “bug?” as I have:
Code:
[yves@localhost ~]$ df -i /dev/sda6
Sys. de fich.         Inodes   IUtil.  ILib. %IUti. Monté sur
/dev/sda6                  0       0       0    -  /
All numbers are zero, although the partition is definitely mounted (that's / !) and the reiserfs filesystem does use inodes!

Yves.
 
Old 02-12-2009, 02:12 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by theYinYeti View Post
OP probably has the same “bug?” as I have:
Code:
[yves@localhost ~]$ df -i /dev/sda6
Sys. de fich.         Inodes   IUtil.  ILib. %IUti. Monté sur
/dev/sda6                  0       0       0    -  /
All numbers are zero, although the partition is definitely mounted (that's / !) and the reiserfs filesystem does use inodes!

Yves.
What do
sudo df -i /dev/sda6
and
sudo df -i /

return.

If you look at the device itself, you need to have read access to the raw device.
 
Old 02-12-2009, 02:16 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Thanks for that info, theYinYeti. I wasn't aware of that reiserfs bug. One more -though minor- reason to stay away from reiserfs, I guess.

I googled and indeed it seems that there are people having this same issue. However every post that I can find is like 5 or 6 years old.
 
Old 02-12-2009, 02:25 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I think that reminds me of something I read, how reiserfs does things its own way instead of integrating into the way things are done by the kernel. It makes the reiserfs not to popular with the kernel authors.

I looked in the manpage and -i is not in the posix manpage. Also, be careful if the target is a link.
 
Old 02-12-2009, 03:10 AM   #12
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Don't confuse ReiserFS 3, and ReiserFS 4. While the latter has a long history of clashing with the kernel team, and has quite a record of unstability, the former and older ReiserFS is nothing like that.

The ReiserFS 3 filesystem was the first journaling filesystem to be made available to the “non-tech public” (that was in Mandrake 7.2 if I remember correctly) and I have used it since day one of its availability in the distribution.
The disks went through many brutal power-off, I had electric outages due to storms and such, and there were the occasional game-related- or X-driver-related-crash which meant unclean power off. To this date, the filesystems were ALWAYS recovered.

More over, ReiserFS is still one of the fastest filesystem in usage (although slower to boot).

In contrast, I lost a filesystem once with Ext3, even though I use this one much less. So if the most obvious bug of ReiserFS is a bad output in “df -i” (and is ReiserFS the cause?), then it's OK with me.

Now some more information, before some more people jump on the ReiserFS-fud-bandwagon:
Code:
[root@localhost ~]# df -i
Sys. de fich.         Inodes   IUtil.  ILib. %IUti. Monté sur
/dev/sda6                  0       0       0    -  /
/dev/sda7                  0       0       0    -  /home
none                    111K      28    111K    1% /tmp
//remote_RHCE_2/share      0       0       0    -  /home/yves/.mnt/smb/remote_RHCE_2
//remote_RHCE_1/share   629K     13K    617K    3% /home/yves/.mnt/smb/remote_RHCE_1

[root@localhost ~]# mount
/dev/sda6 on / type reiserfs (rw,noatime,notail,user_xattr)
none on /proc type proc (rw)
/dev/sda7 on /home type reiserfs (rw,noatime,notail,user_xattr)
none on /tmp type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/yves/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=yves)
//remote_RHCE_2/share on /home/yves/.mnt/smb/remote_RHCE_2 type cifs (rw,mand)
//remote_RHCE_1/share on /home/yves/.mnt/smb/remote_RHCE_1 type cifs (rw,mand)
As you can see, the CIFS filesytem shows the “bug” for one remote server but not the other. I actually think that:
— this is not a bug, and could be explained somehow,
— it has nothing to do with the filesystem being used.

Yves.
 
Old 02-12-2009, 03:32 AM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by theYinYeti View Post
— this is not a bug, and could be explained somehow,
It depends on how do you interpret it. We could just say that df and reiserfs are not fully compatible. Just like with vfat and many others.

Quote:
— it has nothing to do with the filesystem being used.
I've never seen this on ext[234], can't comment on other filesystems. This behavior is only expected on fs's where there aren't inodes. However today I've learned that reiserfs can fail at this as well. So I think that the fs matters.

I know nothing about how will CIFS handle this but maybe it emulates the inode properties copying them from the original fs. So, just out of curiosity, what are the underlying fs's for those CIFS shares?





About the reiserfs vs ext3 thingie, better let's keep it out of the thread. There's already enough of that in the net, and neither of us is going to change his mind no matter the arguments.
 
Old 02-12-2009, 06:48 AM   #14
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Quote:
Originally Posted by i92guboj View Post
I know nothing about how will CIFS handle this but maybe it emulates the inode properties copying them from the original fs. So, just out of curiosity, what are the underlying fs's for those CIFS shares?
Both are Ext3 on LVM.

Yves.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqld node of mysql cluster system not connecting to management node coal-fire-ice Linux - Server 1 07-27-2015 08:33 AM
unable to view the contents!!! a1ora0 Slackware 1 09-29-2007 12:58 PM
Unable to view hda zorba11 Mandriva 2 08-04-2006 06:06 PM
Created new partition. No device node for it. udev Slack10.2 myslfkeepslippin Linux - General 5 02-01-2006 02:16 PM
Unable to view cd files erycz Linux - General 1 11-04-2003 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration