Sponsored Content
Full Discussion: inode = which block
Operating Systems Solaris inode = which block Post 50350 by s93366 on Thursday 22nd of April 2004 06:15:22 AM
Old 04-22-2004
use the fsdb (filesystem debugger) .. Use with care Smilie

create a file..

ls -i filename
get inode
say its 3211
fsdb /dev/rdsk/slice_file_is_on
in fsdb use :

0t3211:ino
/(where 3211 is the inode nr of the file)
.?ino
(this will print inode info and the block its pointing to....)
db#0 BLOCKNR
db#1 BLOCKNR

To verify use (will only work on textfiles Smilie )
BLOCKNR:bl
.,50/c
(this will print first 50 chars from block)

to quit the fsdb type
:quit

have fun Smilie

/Peter

Last edited by s93366; 04-22-2004 at 07:21 AM..
 

10 More Discussions You Might Find Interesting

1. Solaris

How to map a disk block to filename/ Inode

Hi, I want to find out a particular disk block belong to which file. in solaris 2.8 Can anyone help. Thanks and Regards Bala (1 Reply)
Discussion started by: Balamurugan
1 Replies

2. AIX

%Inode used full

Hello I have used 100% of inode in a file system can you increase thie number of inode without backup-make the file system again-restore ? thank you (0 Replies)
Discussion started by: pascalbout
0 Replies

3. Shell Programming and Scripting

INode

hi i am nitin... jus a new kid on the block... my query is... does the concept of region invovle sharin of inodes wen the sticky it is set... eg... if two process share two text regions... wat actually happens thank u (1 Reply)
Discussion started by: nitinsharma_ssn
1 Replies

4. Filesystems, Disks and Memory

Inode number

as kernel keeps track of user activities on a file by its INODE number and I node table . what is the structure of Inode table. and where does this Inode table mapped into?user space or kernel space? is the Inode Number is fixed for a file till its deletion? thanks (1 Reply)
Discussion started by: compbug
1 Replies

5. UNIX for Dummies Questions & Answers

incore inode

Dear Friend , what is incore inode ? and what is difference between incore inode and inode ????? sanjay (1 Reply)
Discussion started by: sanjaygoyan
1 Replies

6. Solaris

about inode

how can i see inode table information of a perticler inode.anybody knows pls tell me. Than.Q (3 Replies)
Discussion started by: nag.mi2000
3 Replies

7. AIX

FS inode 58%

Hi Guys, I have this filesystem got big with inode: /dev/hd4 3670016 183664 95% 63705 58% /var I don't know why the system doesn't give alerts on this FS although it's 95% and why the inode is 58%. Any comments will be highly appreciated. Thanks, itik (1 Reply)
Discussion started by: itik
1 Replies

8. Solaris

how inode works

HI, Just another dummies questions: How i can determine what number of inode to use when creating filesystem? Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

9. Solaris

inode in solaris

Dear, How can i check inode information in my Solaris box? With Regards, Mjoshi (4 Replies)
Discussion started by: mjoshi87
4 Replies

10. UNIX for Advanced & Expert Users

Deciding whether to get a buffer cache block or inode block

I was reading a book on UNIX internals "The design of the UNIX Operating system." There are two memory structures that are confusing me: 1) Buffer cache 2) Inode cache My questions are 1) Does a process get both buffer cache and Indoe cache allocated when it opens/creates a file? 2) if no,... (1 Reply)
Discussion started by: sreeharshasn
1 Replies
CGREAD(3)						   BSD Library Functions Manual 						 CGREAD(3)

NAME
cgread, cgread1, cgwrite1 -- read/write cylinder groups of UFS disks LIBRARY
UFS File System Access Library (libufs, -lufs) SYNOPSIS
#include <sys/param.h> #include <sys/mount.h> #include <ufs/ufs/ufsmount.h> #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> #include <libufs.h> int cgread(struct uufsd *disk); int cgread1(struct uufsd *disk, int c); int cgwrite1(struct uufsd *disk, int c); DESCRIPTION
The cgread() and cgread1() functions provide cylinder group reads for libufs(3) consumers. The cgread1() function reads from one cylinder group, specified by c into the d_cg field of a userland UFS disk structure. It sets the d_lcg field to the cylinder group number c. The cgread() function operates on sequential cylinder groups. Calling the cgread() function is equivalent to calling cgread1() with a cylin- der group specifier equivalent to the value of the current d_ccg field, and then incrementing the d_ccg field. The cgwrite1() function stores cylinder group specified by c from d_cg field of a userland UFS disk structure on disk. RETURN VALUES
Both functions return 0 if there are no more cylinder groups to read, 1 if there are more cylinder groups, and -1 on error. ERRORS
The function cgread() may fail and set errno for any of the errors specified for the library function bread(3). The function cgread1() has semantically identical failure conditions to those of cgread(). The function cgwrite1() may fail and set errno for any of the errors specified for the library function bwrite(3). SEE ALSO
bread(3), bwrite(3), libufs(3) HISTORY
These functions first appeared as part of libufs(3) in FreeBSD 5.1. AUTHORS
Juli Mallett <jmallett@FreeBSD.org> BSD
June 4, 2003 BSD
All times are GMT -4. The time now is 06:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy