file lose inode in Memory-Based file system.
my syetem is FreeBSD 8.2. i build a memory disk : mdmfs -s 10G -i 512 -o rw md1 /home/test1 After a period of time,some file in the memory disk lose their inode: #ls 90020595.o #ls -l 90020595.o ls: 90020595.o: No such file or directory it seem the inode of this file was lost. how to solve this problem? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Building an inode
On Wed, 29 Oct 2008 19:47:47 -0700, Jeremy Chadwick <[EMAIL PROTECTED]> wrote: > Try re-posting your question to -fs, wait a week, then try -hackers. Thank you for this advice, I'll do that - after rewriting the message I prepared. I'm stupid: writing a message and experimenting with ffs2recov is a bad idea. :-) panic: ffs_write: type 0xc5d37e04 0 (0,16384) Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Building an inode
On Wed, 29 Oct 2008 19:47:47 -0700, Jeremy Chadwick <[EMAIL PROTECTED]> wrote: > This is really a question for -fs or -hackers. -questions is > for generic stuff -- what you're doing is fairly low-level. > > Try re-posting your question to -fs, wait a week, then try -hackers. I'll do that, thanks! I hope I'll be able to understand the answers because I'm quite new to low-level stuff. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Building an inode
On Thu, Oct 30, 2008 at 03:35:04AM +0100, Polytropon wrote: > Hi again, > This is really a question for -fs or -hackers. -questions is for generic stuff -- what you're doing is fairly low-level. Try re-posting your question to -fs, wait a week, then try -hackers. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Building an inode
Hi again, coming back to my problem with the inode of my home directory having disappeared, I found out that the tool ffs2recov from the ports is able to establish an inode entry for a directory where you can explicitely name the inode and the directory. I know which inode number my former home directory had, and of course I know its name. Would it be sufficient to % fs2recov -c 12345 -n poly ad0s1f.dd I think there's more to establish an intact directory structure. As far as I've already learned, when "walking back" the path from a file deep within a directory structure, every inode contains a field "where it comes from", let's say, where CWD and .. are (as an inode number): bla.txt dingens/ foo/poly// 12380 -> 12370 -> 12360 -> 12345 -> 2 This would be /home/poly/foo/dingens/bla.txt on ad0s1f (where / is then mounted as /home). When I can assume that every inode still knows "where it came from", what would be a useful tool to build poly/ (12345) again? I think I'll need to construct its content again, because just by creating poly/ as 12345, where does the filesystem know from what's the content of poly/? Is the term "directory slots" I came across related to that topic? Which sources could give good hints? Sadly, fsck_ffs doesn't do the job... but maybe if I fix the file system a bit (instead of fixing fsck_ffs)...? Hey, it's not that I try to build my own nuclear plant in the living room... :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode numbering
On Sun, 19 Oct 2008 19:18:00 -0700, [EMAIL PROTECTED] wrote: > You may be able to reuse some code from dump(8). Hey, that's a good idea! After having had a short look at the source of dump, I developed another idea: dump applies some criteria weather to access (and dump) an inode or not. Maybe it's possible to change these criteria within dump, recompile it and then use it to dump any (!) existing inode. The only problem would be to implement a workaround for those that don't have a parent inode anymore (file name lost), i. e. those on the 1st hierarchy stage within the home directory. > Dump's purpose is to ensure that the dump will be complete in the > sense of containing the full path to any file that is on the tape, > and your purpose is different, but I suspect much of the "find > parent" logic may be reusable. I have to admit that it's a bit complicated. Programming applications in C is my forte, hehe, but dump's C code is very much lowlevel. I'm so lucky FreeBSD has the right attitude towards documentation. So I will find a way to implement it, I hope. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode numbering
Because I didn't find sufficient informations and "try and error" would be incomplete (and insecure regarding the result), I'd like to ask the following question: Let's assume we have a directory D with an inode number i(D). It contains a file F with its inode number i(F). May I state that i(D) < i(F)? usually but not always. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode numbering
Polytropon <[EMAIL PROTECTED]> wrote: > ... It will force me to > do what I originally intended to do: Iterate from 2 up > to the maximal number and then check the availability, > and, if given, "trace back" the ".. chain" to an existing > directory entry point - or re-create one, if it is missing, > too. Will be a lot of work, but I think I can learn much > from this. You may be able to reuse some code from dump(8). When doing an incremental dump, it reads through the inodes, makes a list of those which are newer than the previous dump, then recursively locates all parent directories of selected inodes and adds them to the list. (When doing a level 0 dump, it does the same thing but by definition every inode is selected.) Having done all that, it dumps all the selected directories followed by the rest of the selected inodes. Dump's purpose is to ensure that the dump will be complete in the sense of containing the full path to any file that is on the tape, and your purpose is different, but I suspect much of the "find parent" logic may be reusable. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode numbering
On Sat, 18 Oct 2008 22:46:04 -0700, [EMAIL PROTECTED] wrote: > It might work in the special case where nothing > on the filesystem is ever moved or removed, and no hard links are > ever added. > > As a simple example, suppose I have directories foo and foo/bar, > and file foo/baz, with i(foo) == 15, i(foo/baz) == 20, and > i(foo/bar) == 25, satisfying your criterion. If I do > > mv foo/baz foo/bar > > (so baz is now foo/bar/baz), I will have i(foo/bar) == 25 and > i(foo/bar/baz) == 20. Thank you for this example. So I cannot assume inode numbers to be in a specific order. It will force me to do what I originally intended to do: Iterate from 2 up to the maximal number and then check the availability, and, if given, "trace back" the ".. chain" to an existing directory entry point - or re-create one, if it is missing, too. Will be a lot of work, but I think I can learn much from this. Remember, kids: Learning is fun. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode numbering
Polytropon <[EMAIL PROTECTED]> wrote: > Let's assume we have a directory D with an inode number i(D). > It contains a file F with its inode number i(F). > > May I state that i(D) < i(F)? In general, no. It might work in the special case where nothing on the filesystem is ever moved or removed, and no hard links are ever added. As a simple example, suppose I have directories foo and foo/bar, and file foo/baz, with i(foo) == 15, i(foo/baz) == 20, and i(foo/bar) == 25, satisfying your criterion. If I do mv foo/baz foo/bar (so baz is now foo/bar/baz), I will have i(foo/bar) == 25 and i(foo/bar/baz) == 20. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Inode numbering
Hi! Because I didn't find sufficient informations and "try and error" would be incomplete (and insecure regarding the result), I'd like to ask the following question: Let's assume we have a directory D with an inode number i(D). It contains a file F with its inode number i(F). May I state that i(D) < i(F)? I need to ask this in order to solve my data loss problem: I will need to write a inode recovery program (having iintensive looks at fsck_ffs' and fsdb's source code) to iterate over all the inodes. Maybe this additional question can be answered: Is there a mechanism that output inode numbers according to a certain algorithm, or is it random? If I would try to check every imaginable inode nummer according to the states "connected", "not connected - orphan" or "not connec- ted - not used", could I iterate from 1 to the maximum of the type ino_t, which is __uint32_t? My idea is to "trace back" orphaned inodes by "brute force" because fsck_ffs doesn't do the job, but similar to fsck_ffs, they will be reconnected to the directory they originally have been gnereated in, or in a kind of lost+found directory when the information from the respective superstructure (e. g. file names) are lost. I may assume that at least the inode of my former home directory has gone away, so if everything else is still there (I have some evidences from fsdb to assume this), after reconnecting everything should be accessible. Only the file names from the first hierarchy level (the files and subdirs directly within the home directory) would change into #123456 as you know it from fsck_ffs' lost+found, but the content inside the subdirs should still be present with the original filenames - assumed that the corresonding inode information structures are still complete. Thanks for comments! And please tell me if there's already a tool that does this! :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kgdb of kernel issues FB7.0 (mangled inode)
> I wasn't sure if I should have edited this. > -- > > Message: 29 > Date: Thu, 16 Oct 2008 18:48:31 -0700 > From: "Kayven Riese" <[EMAIL PROTECTED]> > Subject: kgdb of kernel issues FB7. > To: freebsd-questions@freebsd.org, [EMAIL PROTECTED], >[EMAIL PROTECTED] > Message-ID: ><[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > I was running my FreeBSD 7.0-RELEASE (160GB HD) on this laptop: > > http://www.monkeyview.net/id/965/fsck/dmesg/PB12001901.vhtml > > Right now I am swapped out > > http://www.monkeyview.net/id/965/fsck/torrent/p5120212.vhtml > > but I have the problem disk mounted using this: > > http://www.monkeyview.net/id/965/fsck/torrent/p5120226.vhtml > > This is a much older disk with 60GB and > $ uname -a > FreeBSD 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC > 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP i386 > $ > > It makes clunking sounds sometimes, but for the most part it seems to run > fine. > > Some diagnostics on the 160GB HD FB 7.0 that have been done: > > # mount /dev/da0s4 /mnt/usr > # fsck_ufs -y /mnt/usr > ** /dev/da0s4 (NO WRITE) > ** Last Mounted on /mnt/usr > ** Phase 1 - Check Blocks and Sizes > INCORRECT BLOCK COUNT I=2779162 (4 should be 0) > CORRECT? no > > fsck_ufs: cannot alloc 871186332 bytes for inoinfo > # > > I have been told that doing fsck while mounted is a very bad thing, but I > did fsck before the > above depicted instantiation of the fsck command and after this and it > always did the same > thing. I have done fsck using the argument /dev/da0s4, > I have done fsck in single user mode (the 160GB hard boots a character > based shell, but crashes > and reboots during "startx") and always the fsck looks the same. My > configuration of the 160GB > is a little goofy, in my estimation, just to explain. I currently have > three hard drives representing > all the times I have installed FreeBSD, two of them are dual booted with MS > Vista, and this latest > one with 160GB has FreeBSD all to itself, but when I was creating it, I > mistook partitions for > slices so I configured 4 partitions, leaving some of the disk unallocated > thinking that would be > good for that 10% utilization thing. I mount three partitions on /, /var, > and /usr; respectively > and the last one as swap. I learned the vi editor in 1985 and tend to > recount the flavor of > unix as "evax" but at this point I wonder if this "evax" concept is > mistaken. I have done a bunch > of c programming in university courses, but also spent some time doing > molecular biology but > they had me on a SUN SPARCstation I guess. Didn't mess with that source > code. > > Anyway. Sorry for not being concise. I thought maybe my background might > be > useful information. > I was told to do another diagnostic, alleged to pin the disk down as having > no bad sectors: > > # dd if=/dev/da0 bs=65536 of=/dev/null > 2442045+1 records in > 2442045+1 records out > 160041885696 bytes transferred in 5718.122211 secs (27988539 bytes/sec) > # echo $? > 0 > # > > I was told that the fact that it returns 0 was good. > > > I also tried the port called recoverdisk, but that was taking extremely > long. I accidently disconnected the > USB port > > # /usr/src/tools/tools/recoverdisk > zsh: permission denied: /usr/src/tools/tools/recoverdisk > # set -o vi > # ls /usr/src/tools/tools/recoverdisk > Makefilerecoverdisk.1 recoverdisk.c > # cd /usr/src/tools/tools/recoverdisk > # make > Warning: Object directory not changed from original > /usr/src/tools/tools/recoverdisk > cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall > -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter > -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c > recoverdisk.c > cc -O2 -fno-strict-aliasing -pipe -Wsystem-headers -Werror -Wall > -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter > -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -o > recoverdisk recoverdisk.o > gzip -cn recoverdisk.1 > recoverdisk.1.gz > # ls > Makefilerecoverdisk.1 recoverdisk.c > recoverdisk recoverdisk.1.gzrecoverdisk.o > # ./recoverdisk > usage: recoverdisk [-r worklist] [-w worklist] source-drive [destination] > # ./recoverdisk /dev/da0s4 >startsize len state done remaining% > done >590348288 1048576 134551002112 0 590348288 134551002112 > 0.0043684 > > It had run for perhaps half an hour and still was only 0.3% done or so. > > > finally, the guy downstairs told me to debug the kernel so I found this > page: > > > http://www.freebsd.org/doc/en/books/developers-ha
Re: Data loss after power out - fsck: bad inode number to nextinode
> What should I do? In theory, clri {special-file} 306176 should wipe the inode containing the bad pointer and allow fsck to continue, perhaps recovering the files pointed to by that directory into lost+found. Definitely try this on a copy first if at all possible. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Data loss after power out - fsck: bad inode number to nextinode
On Tuesday 08 July 2008, Polytropon wrote: > Hi, > > since last week I'm in big trouble: After an power outage my main > system didn't boot up anymore, so I checked its hard disk (FreeBSD > 5.4) in my new system (FreeBSD 7.0). > > I booted the system in SUM and ran fsck on the partitions. / on > /dev/ad1s1a could be repaired, /var on 1d too, /usr on 1e lost > many directory entries (X11R6, for exmaple), but all files and > directory entry points got restored to lost+found. Okay, that's > as I know it should be. But it doesn't matter, because everything > there could be reinstalled. > > Problems occured when checking /home on /dev/ad1s1f. After lot > of > > 1101472 DUP I=260035 > UNEXPECTED SOFT UPDATE INCONSISTENCY > > and > > EXCESSIVE DUP BLKS I=260039 > CONTINUE? yes > > and > > 7310315658325879925 BAD I=260051 > UNEXPECTED SOFT UPDATE INCONSISTENCY > > fsck ended up this way: > > INCORRECT BLOCK COUNT I=290557 (3104 should be 736) > CORRECT? yes > > fsck_4.2bsd: bad inode number 306176 to nextinode > > The result: The home directories of all other users where present, > but mine (!) - /home/adec - was missing. I may explain this a bit > more precise: When looking at the files using the Midnight > Commander, the name of my home directory was displayed, preceeded > by "?", and in red colour, with a strange date (the epoch?). > > |?adec| 0|Jan 1 1970| > > So I could not change into this directory and get my files out > of there. > > In order not to damage the system more, I made a ddrescue dump > of the partition: > > % ddrescue -d -r 3 -n /dev/ad1s1f home.ddrescue logfile > > The data could be read without problems. The resulting file seemed > to be an 1:1 copy of the partition. > > % file home.ddrescue > home.ddrescue: Unix Fast File system [v2] (little-endian) last > mounted on /mnt, last written at Wed Jul 2 18:51:06 2008, > clean flag 0, > readonly flag 0, > number of blocks 44322272, > number of data blocks 42925108, > number of cylinder groups 472, > block size 16384, > fragment size 2048, > average file size 16384, > average number of files in dir 64, > pending blocks to free 0, > pending inodes to free 0, > system-wide uuid 0, > minimum percentage of free blocks 8, > TIME optimization > > When checking it with > > % fsck -t ufs -yf /dev/md10 > > fsck gives the same error message as above. > > Then I mounted the image: > > % sudo mdconfig -a -t vnode -u 10 -f home.ddrescue > % mount -t ufs -o ro /dev/md10 mnt > > And guess what? Same problem: Directory name shown, but directory > not changable. > > But then, I noticed something interesting: > > % df -h > Filesystem SizeUsed Avail Capacity Mounted on > /dev/md10 82G 75G716M99% > /export/home/adec/rescue/mnt > > See the size differences? Something seems to be missing. I hope it > is the content of my home directory that's still on the disk. Some > checking: > > % sudo du -sch mnt > du: mnt/adec: Bad file descriptor > du: mnt/archiv/cr/clips.w32/s01.wmv: Bad file descriptor > du: mnt/archiv/cr/clips.w32/s02.wmv: Bad file descriptor >52Gmnt >52Gtotal > > This reveals that it seems to be possible that approx. 30 GB are > not marked as free. > > % file mnt/adec > mnt/adec: cannot open `mnt/adec' (Bad file descriptor) > > % cd mnt/adec > mnt/adec: Not a directory. > > Before bothering anyone here at this list, I checked information on > the net and found that only one (!!!) person except me seemd to > have this problem. And he got no help. Do I? =^_^= > > Of course I took the time to read about the FFS architecture. If I > did understand it correctly, fsck stops working, showing the > informative error message "bad inode number 306176 to nextinode" > because it cannot get the next inode from a concatenated list that > represents the file and directory hierarchy, so there must be a > "bad pointer". While the names of the next things represented by > inodes reside within a data structure at level N, the corresponting > data entries reside at level N + 1 where a pointer should lead to. > This may be an explaination why the name "adec" is still in > ad1s1f's root directory, but the data that says "I'm a directory, > this is my content" is not referenced anym
Data loss after power out - fsck: bad inode number to nextinode
Hi, since last week I'm in big trouble: After an power outage my main system didn't boot up anymore, so I checked its hard disk (FreeBSD 5.4) in my new system (FreeBSD 7.0). I booted the system in SUM and ran fsck on the partitions. / on /dev/ad1s1a could be repaired, /var on 1d too, /usr on 1e lost many directory entries (X11R6, for exmaple), but all files and directory entry points got restored to lost+found. Okay, that's as I know it should be. But it doesn't matter, because everything there could be reinstalled. Problems occured when checking /home on /dev/ad1s1f. After lot of 1101472 DUP I=260035 UNEXPECTED SOFT UPDATE INCONSISTENCY and EXCESSIVE DUP BLKS I=260039 CONTINUE? yes and 7310315658325879925 BAD I=260051 UNEXPECTED SOFT UPDATE INCONSISTENCY fsck ended up this way: INCORRECT BLOCK COUNT I=290557 (3104 should be 736) CORRECT? yes fsck_4.2bsd: bad inode number 306176 to nextinode The result: The home directories of all other users where present, but mine (!) - /home/adec - was missing. I may explain this a bit more precise: When looking at the files using the Midnight Commander, the name of my home directory was displayed, preceeded by "?", and in red colour, with a strange date (the epoch?). |?adec| 0|Jan 1 1970| So I could not change into this directory and get my files out of there. In order not to damage the system more, I made a ddrescue dump of the partition: % ddrescue -d -r 3 -n /dev/ad1s1f home.ddrescue logfile The data could be read without problems. The resulting file seemed to be an 1:1 copy of the partition. % file home.ddrescue home.ddrescue: Unix Fast File system [v2] (little-endian) last mounted on /mnt, last written at Wed Jul 2 18:51:06 2008, clean flag 0, readonly flag 0, number of blocks 44322272, number of data blocks 42925108, number of cylinder groups 472, block size 16384, fragment size 2048, average file size 16384, average number of files in dir 64, pending blocks to free 0, pending inodes to free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME optimization When checking it with % fsck -t ufs -yf /dev/md10 fsck gives the same error message as above. Then I mounted the image: % sudo mdconfig -a -t vnode -u 10 -f home.ddrescue % mount -t ufs -o ro /dev/md10 mnt And guess what? Same problem: Directory name shown, but directory not changable. But then, I noticed something interesting: % df -h Filesystem SizeUsed Avail Capacity Mounted on /dev/md10 82G 75G716M99% /export/home/adec/rescue/mnt See the size differences? Something seems to be missing. I hope it is the content of my home directory that's still on the disk. Some checking: % sudo du -sch mnt du: mnt/adec: Bad file descriptor du: mnt/archiv/cr/clips.w32/s01.wmv: Bad file descriptor du: mnt/archiv/cr/clips.w32/s02.wmv: Bad file descriptor 52Gmnt 52Gtotal This reveals that it seems to be possible that approx. 30 GB are not marked as free. % file mnt/adec mnt/adec: cannot open `mnt/adec' (Bad file descriptor) % cd mnt/adec mnt/adec: Not a directory. Before bothering anyone here at this list, I checked information on the net and found that only one (!!!) person except me seemd to have this problem. And he got no help. Do I? =^_^= Of course I took the time to read about the FFS architecture. If I did understand it correctly, fsck stops working, showing the informative error message "bad inode number 306176 to nextinode" because it cannot get the next inode from a concatenated list that represents the file and directory hierarchy, so there must be a "bad pointer". While the names of the next things represented by inodes reside within a data structure at level N, the corresponting data entries reside at level N + 1 where a pointer should lead to. This may be an explaination why the name "adec" is still in ad1s1f's root directory, but the data that says "I'm a directory, this is my content" is not referenced anymore. So fsck cannot continue. The missing inodes need to get reconnected. In most cases, that's what lost+found usually contains: unreferenced inodes that are not marked free: their names are gone (N), but their content is still there (N + 1), and the new file name is "#" plus their inode number. What should I do? Help is VERY welcome! If you have any ideas what to do, I'd be glad to save the money I would have to spend when sending the disk to a data recovery service - 1000 Euro and more are nothing I can afford. And when you're low on money, adequate tap
Re: mapping inode to file name
On Friday 12 January 2007 16:55, Robert Huff wrote: > Is there a program (or a standard function) that, provided the > inode #, returns the associated filename? find / -inum - Pieter ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
mapping inode to file name
Is there a program (or a standard function) that, provided the inode #, returns the associated filename? Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: how to locate file by inode?
In the last episode (Mar 23), Eugene M. Minkovskii said: > Does anybody know how to locate file by inode? For example, using > fstat(1) I see: > > USER CMD PID FD MOUNT INUM MODE SZ|DV R/W > ... > user some_program 84130 0 /dev 68 crw--w ttyp0 rw > user some_program 84130 1 /usr 595890 -rw-r--r-- 0 w > user some_program 84130 2 /dev 68 crw--w ttyp0 rw > ... > > I see that some_program using file whith inode 595890 on mount point > /usr like STDOUT. To find it I do following: > > $ find -x /usr -inum 595890 > > to find two files: > > $ find -x /usr \( -inum 595890 -o -inum $other_inum \) -ls > > but this is too slow. Does any body know other, more directly > method? Not in the general case. If the process still has the file open, though, lsof (in ports) might be able to print the filename by digging through the kernel's name cache. Oddly enough, lsof on my 5.4 box is able to resolve filenames for all open fds, even ones I know I have never used (lpd's lockfile, for example :) # lsof -c lpd COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME lpd 532 root cwd VDIR 4,16 1024 2 / lpd 532 root rtd VDIR 4,16 1024 2 / lpd 532 root txt VREG 4,2072180 784475 /usr/sbin/lpd lpd 532 root txt VREG 4,16 443266 21269 /libexec/ld-elf.so.1 lpd 532 root txt VREG 4,16 2610745 21248 /lib/libc.so.5 lpd 532 root0u VCHR2,2 0t0 18 /dev/null lpd 532 root1u VCHR2,2 0t0 18 /dev/null lpd 532 root2u VCHR2,2 0t0 18 /dev/null lpd 532 root3u unix 0xc286aa20 0t0->0xc27643cc lpd 532 root4wW VREG 4,194639 /var/spool/output/lpd.lock lpd 532 root5u unix 0xc286e144 0t0/var/run/printer lpd 532 root6u IPv4 0xc288e8ac 0t0TCP *:printer (LISTEN) -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
how to locate file by inode?
Hello! Does anybody know how to locate file by inode? For example, using fstat(1) I see: USER CMD PID FD MOUNT INUM MODE SZ|DV R/W ... user some_program 84130 0 /dev 68 crw--w ttyp0 rw user some_program 84130 1 /usr 595890 -rw-r--r-- 0 w user some_program 84130 2 /dev 68 crw--w ttyp0 rw ... I see that some_program using file whith inode 595890 on mount point /usr like STDOUT. To find it I do following: $ find -x /usr -inum 595890 to find two files: $ find -x /usr \( -inum 595890 -o -inum $other_inum \) -ls but this is too slow. Does any body know other, more directly method? -- Sensory yours, Eugene Minkovskii Сенсорно ваш, Евгений Миньковский ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
my server gives an error kernel: free inode /var/XXXX had X blocks
Hello I use Freebsd6.0 release. qmail server runs on the server. Today the server was locked and the server has given the screen an error as below; free inode /var/14579103 had 104 blocks the above error that the server gave a several times. I had to push the reset button to reboot the machine. I booted in single user mode and I ran fsck -y After the fsck operation the server rebooted normally. But the server was locked about half an hour. I think the file system corrupted. What shall I do ? How can I restore the system? Thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
noob question on disk sizes and inode density
Ok I have an md(4) file system that I changed the block size and inode density on. The file was about 1.3GB in size originally and when using newfs with standard parameters shows about 1.3GB in size. My new parameters to newfs ( -f 512 -b 4096 -i 1024 -U -O 2) are meant to allow a lot of small files (basically lots of files around 170bytes long). (holding mail "tuples" for a sort of grey listing) However, df (df -h or df -m etc) shows 1.0Gb instead of 1.3Gb for the file system size. Is the "missing" ~ 300mb the extra space needed to store the actual extra inodes themselves or is it an artifact of changing the parameters so that df gets confused? Thanks Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On 03/16/05 08:06:03, Giorgos Keramidas wrote: On 2005-03-16 13:49, Gert Cuykens <[EMAIL PROTECTED]> wrote: >On Wed, 16 Mar 2005 14:27:21 +0200, Giorgos Keramidas ><[EMAIL PROTECTED]> wrote: >> >> Show us the output of: >> >> # df -ik > > $ df -ik > Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on > /dev/ad0s1a253678 35430 19795415% 981 320413% / > devfs 1 1 0 100% 0 0 100% /dev > /dev/ad0s1e253678 6 233378 0% 3 330190% /tmp > /dev/ad0s1f673024 332902 28628254% 87038 0 100% /usr Here you are. Your /usr partition has no free i-nodes. Probably because you used too large block/fragment sizes when it was newfs'd. You have two options, both of which involve a reinstallation: a) Resplit the disk giving more space to /usr. b) Use a single, big root partition. One possible layout, if you choose (a) could be: FilesystemSize Mount-point Other /dev/ad0s1a 100-200 MB/ - /dev/ad0s1b ??? MB- (swap, tmpfs) /dev/ad0s1e 200-300 MB/var- /dev/ad0s1f rest /usrthe rest of the disk You can then use /usr/home for the home directories of users, and have most of your space in /usr (where it is needed). Maybe you could do 100-200MB for / and /var. Here is my system: $ df -h Filesystem SizeUsed Avail Capacity Mounted on /dev/ad0s2a248M 66M162M29%/ devfs 1.0K1.0K 0B 100%/dev /dev/ad0s2e248M 21M207M 9%/tmp /dev/ad0s2f 27G 19G5.4G78%/usr /dev/ad0s2d248M 40M188M17%/var /dev/ad0s1 8.0G7.9G153M98%/usr/ntfs $ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
* Giorgos Keramidas [2005-03-16 15:06 +0200] > > Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on > > /dev/ad0s1a253678 35430 19795415% 981 320413% / > > devfs 1 1 0 100% 0 0 100% /dev > > /dev/ad0s1e253678 6 233378 0% 3 330190% /tmp > > /dev/ad0s1f673024 332902 28628254% 87038 0 100% /usr > > You have two options, both of which involve a reinstallation: > > a) Resplit the disk giving more space to /usr. > b) Use a single, big root partition. If he should not have the possibility to just wipe the entire disk to reinstall it (eg. this is his only disk and it is full of valuable data), he might be able to boot into single user, mount /usr and /tmp, and cram the entire contents of /usr into /tmp (using some sort of compression, e.g gzip) and then newfs /usr with more sensible values before restoring the contents from /tmp. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On 2005-03-16 14:21, Gert Cuykens <[EMAIL PROTECTED]> wrote: >> Here you are. Your /usr partition has no free i-nodes. Probably >> because you used too large block/fragment sizes when it was newfs'd. > > I pict default partitioning ? How big does the /usr need to be for > base, ports mysql php apache ? Well, the default is just that: a "default". It certainly doesn't fit all the possible setups and all the possible installations. It's not that bad to diverge from the default a bit, when needed. > Is there a make command that tells you how much space it needs to install ? None that I know of. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
> Here you are. Your /usr partition has no free i-nodes. Probably > because you used too large block/fragment sizes when it was newfs'd. I pict default partitioning ? How big does the /usr need to be for base, ports mysql php apache ? Is there a make command that tells you how much space it needs to install ? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On 2005-03-16 13:49, Gert Cuykens <[EMAIL PROTECTED]> wrote: >On Wed, 16 Mar 2005 14:27:21 +0200, Giorgos Keramidas ><[EMAIL PROTECTED]> wrote: >> >> Show us the output of: >> >> # df -ik > > $ df -ik > Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on > /dev/ad0s1a253678 35430 19795415% 981 320413% / > devfs 1 1 0 100% 0 0 100% /dev > /dev/ad0s1e253678 6 233378 0% 3 330190% /tmp > /dev/ad0s1f673024 332902 28628254% 87038 0 100% /usr Here you are. Your /usr partition has no free i-nodes. Probably because you used too large block/fragment sizes when it was newfs'd. You have two options, both of which involve a reinstallation: a) Resplit the disk giving more space to /usr. b) Use a single, big root partition. One possible layout, if you choose (a) could be: FilesystemSize Mount-point Other /dev/ad0s1a 100-200 MB/ - /dev/ad0s1b ??? MB- (swap, tmpfs) /dev/ad0s1e 200-300 MB/var- /dev/ad0s1f rest /usrthe rest of the disk You can then use /usr/home for the home directories of users, and have most of your space in /usr (where it is needed). ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On Wed, 16 Mar 2005 14:27:21 +0200, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > On 2005-03-16 13:22, Gert Cuykens <[EMAIL PROTECTED]> wrote: > >On Wed, 16 Mar 2005 14:13:09 +0200, Giorgos Keramidas > ><[EMAIL PROTECTED]> wrote: > >> On 2005-03-16 13:05, Gert Cuykens <[EMAIL PROTECTED]> wrote: > >> > What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it > >> > tells me there are not enough inodes ? Aldo there is diskspace > >> > availeble ? > >> > > >> > Does it mean there are to many directories ? Can you fix this ? > >> > >> i-nodes are the areas where the file system saves information such as > >> the owner, the size and pointers to the data area of a normal or special > >> file or a directory. > >> > >> 2 GB is a lot of space for a virgin FreeBSD installation. The base > >> system takes up to 170 MB on a clean disk here. > >> > >> - Have you tweaked the newfs options that sysinstall used? > >> - Have you installed any extra packages? How many and which? > > > > No i just installed 5.3 i386 base and ports and there is plenty of > > freespace on all default partitions availeble but when i do mkdir it > > tells me no inodes availeble. > > Show us the output of: > > # df -ik > $ df -ik Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/ad0s1a253678 35430 19795415% 981 320413% / devfs 1 1 0 100% 0 0 100% /dev /dev/ad0s1e253678 6 233378 0% 3 330190% /tmp /dev/ad0s1f673024 332902 28628254% 87038 0 100% /usr /dev/ad0s1d253678240 233144 0% 98 329240% /var $ Its only the /usr partition that seems to have inode problems ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On 2005-03-16 13:22, Gert Cuykens <[EMAIL PROTECTED]> wrote: >On Wed, 16 Mar 2005 14:13:09 +0200, Giorgos Keramidas ><[EMAIL PROTECTED]> wrote: >> On 2005-03-16 13:05, Gert Cuykens <[EMAIL PROTECTED]> wrote: >> > What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it >> > tells me there are not enough inodes ? Aldo there is diskspace >> > availeble ? >> > >> > Does it mean there are to many directories ? Can you fix this ? >> >> i-nodes are the areas where the file system saves information such as >> the owner, the size and pointers to the data area of a normal or special >> file or a directory. >> >> 2 GB is a lot of space for a virgin FreeBSD installation. The base >> system takes up to 170 MB on a clean disk here. >> >> - Have you tweaked the newfs options that sysinstall used? >> - Have you installed any extra packages? How many and which? > > No i just installed 5.3 i386 base and ports and there is plenty of > freespace on all default partitions availeble but when i do mkdir it > tells me no inodes availeble. Show us the output of: # df -ik ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On Wed, 16 Mar 2005 14:13:09 +0200, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > On 2005-03-16 13:05, Gert Cuykens <[EMAIL PROTECTED]> wrote: > > What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it > > tells me there are not enough inodes ? Aldo there is diskspace > > availeble ? > > > > Does it mean there are to many directories ? Can you fix this ? > > i-nodes are the areas where the file system saves information such as > the owner, the size and pointers to the data area of a normal or special > file or a directory. > > 2 GB is a lot of space for a virgin FreeBSD installation. The base > system takes up to 170 MB on a clean disk here. > > - Have you tweaked the newfs options that sysinstall used? > - Have you installed any extra packages? How many and which? > No i just installed 5.3 i386 base and ports and there is plenty of freespace on all default partitions availeble but when i do mkdir it tells me no inodes availeble. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
On 2005-03-16 13:05, Gert Cuykens <[EMAIL PROTECTED]> wrote: > What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it > tells me there are not enough inodes ? Aldo there is diskspace > availeble ? > > Does it mean there are to many directories ? Can you fix this ? i-nodes are the areas where the file system saves information such as the owner, the size and pointers to the data area of a normal or special file or a directory. 2 GB is a lot of space for a virgin FreeBSD installation. The base system takes up to 170 MB on a clean disk here. - Have you tweaked the newfs options that sysinstall used? - Have you installed any extra packages? How many and which? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode
Gert Cuykens wrote: What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it tells me there are not enough inodes ? Aldo there is diskspace availeble ? Does it mean there are to many directories ? Can you fix this ? I suppose there is no disk space available on some partition. When this message apears ? Or, you can check it out bu df -h command. Vladimir ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
inode
What is a inode ? I installed freebsd 5.3 on a 2gb harddisk and it tells me there are not enough inodes ? Aldo there is diskspace availeble ? Does it mean there are to many directories ? Can you fix this ? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
los+found - INODE Addres and filename
Suddenly when I started my system the disk check flagged ALL (I mean all, including directory) files of a user as errenous and started to unlink them. I init 1 and unounted the volume and ran fsck direct on it. Then it created a lost+found directory and after a few millions 'y' 'enter' key presses I had got a lot of files back. They are however completely organised and thet all are named after the address where they where found. Is there a tool to map those names with the current filename? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
fsck: cannot find inode X
Hello, Tonight, a server crashed and, when it came up, required a manual fsck. Normally, this is not a big deal, especially on our customer web servers, where there isn't much "real" activity at the time the server crashed (~5:00am). This time, though, I saw this error for the first time, while running fsck on /dev/rccd0c (mounted normally as /usr/home): fsck: cannot find inode 71683 I searched around a bit for the error, and didn't find a whole lot, and nothing that solved the problem. I remembered the fsdb utility, and ran it, like so: fsdb /dev/rccd0c which put me in interactive mode. I poked around a bit, hoping I'd be smarter than fsck, and would find the inode on my own. Turns out, fsck was right - I couldn't find the inode. Not knowing of a better way (any suggestions are welcome, of course), I cleared the inode: clri 71683 I was then able to successfully complete a fsck on that partition, and the server booted with no problems (so far). I'm writing this mainly so that it'll go into the archives, and hopefully help someone else out later. I'm no longer on the freebsd-questions list (too much traffic for my poor brane), so CC me on replies, if you want to. -Todd ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
inode problems...
Just to bring you (and the -questions list) up to date re my 4.9-RELEASE snafu. I did a upgrade last night. I have stable-supfile pointing to RELENG_4_9. I was trying to get back to 4.9-STABLE. No-joy. I now have FreeBSD 4.9-RELEASE-p4 #4: Thu Apr 8 19:50:47 PDT 2004. I don't know if this upgrade made any difference, but I think I fixed my partially alloc'd and otherwise bad inode by hand. find / -inum [inode] -print showed me what was whhere and I dealt with each one. Bottom line is that fsck now runs clean; no errors. I think I'll hack fsck to output a -L logfile in /var/log. I could script it with " |& tee logfile" too. In rare cases like these, having a log of inodes could be a great help. gary -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: any unusual inode problems with 4.9-RELEASE?
On Fri, Apr 09, 2004 at 01:33:53AM +0300, Ion-Mihai Tetcu wrote: > On Thu, 8 Apr 2004 15:10:42 -0700 > Gary Kline <[EMAIL PROTECTED]> wrote: > > > On Thu, Apr 08, 2004 at 11:17:40PM +0300, Ion-Mihai Tetcu wrote: > > > On Thu, 8 Apr 2004 10:13:04 -0700 > > > Gary Kline <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > For the past few days I'm seeing serious inode problems > > > > on my 40G drive. Has anybody seen unusual troubles with > > > > inodes on FreeBSD-4.9-RELEASE? If not, maybe I'd better > > > > get a second drive and dd over? I was running 4.9-STABLE > > > > prev, and didn't see any major problems. > > > > > > Could you give some details ? > > > > > > At leas twice my 4.9-RELEASE has died and upon > > trying to reboot, I've gotten stalled and thrown > > into single-user mode and asked to fsck by-hand. > > Giving up buffers, printing something useful or ? Grepping logs disk > problems shows something ? Nothing. This server has been busy recently--load averages > 5.00 sometimes. But the strength of FBSD is that it is designed for heavy use. > > [..] > > > > > Suggestions? Do I have to create one huge slight filesystem, > > > > mount it and dd or what? > > > > > > If your asking how to use dd for moving your data to another (bigger) > > > disk please see the faq, it has an entry on this. > > > > > > URL, please? > > /usr/share/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK > or > http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK > > Great! thanks again, gary -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: any unusual inode problems with 4.9-RELEASE?
On Thu, 8 Apr 2004 15:10:42 -0700 Gary Kline <[EMAIL PROTECTED]> wrote: > On Thu, Apr 08, 2004 at 11:17:40PM +0300, Ion-Mihai Tetcu wrote: > > On Thu, 8 Apr 2004 10:13:04 -0700 > > Gary Kline <[EMAIL PROTECTED]> wrote: > > > > > > > > For the past few days I'm seeing serious inode problems > > > on my 40G drive. Has anybody seen unusual troubles with > > > inodes on FreeBSD-4.9-RELEASE? If not, maybe I'd better > > > get a second drive and dd over? I was running 4.9-STABLE > > > prev, and didn't see any major problems. > > > > Could you give some details ? > > > At leas twice my 4.9-RELEASE has died and upon > trying to reboot, I've gotten stalled and thrown > into single-user mode and asked to fsck by-hand. Giving up buffers, printing something useful or ? Grepping logs disk problems shows something ? [..] > > > Suggestions? Do I have to create one huge slight filesystem, > > > mount it and dd or what? > > > > If your asking how to use dd for moving your data to another (bigger) > > disk please see the faq, it has an entry on this. > > > URL, please? /usr/share/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK or http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK -- IOnut Unregistered ;) FreeBSD "user" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: any unusual inode problems with 4.9-RELEASE?
On Thu, Apr 08, 2004 at 11:17:40PM +0300, Ion-Mihai Tetcu wrote: > On Thu, 8 Apr 2004 10:13:04 -0700 > Gary Kline <[EMAIL PROTECTED]> wrote: > > > > > For the past few days I'm seeing serious inode problems > > on my 40G drive. Has anybody seen unusual troubles with > > inodes on FreeBSD-4.9-RELEASE? If not, maybe I'd better > > get a second drive and dd over? I was running 4.9-STABLE > > prev, and didn't see any major problems. > > Could you give some details ? At leas twice my 4.9-RELEASE has died and upon trying to reboot, I've gotten stalled and thrown into single-user mode and asked to fsck by-hand. fsck -y has worked so far---it failed once this morniing; then worked. I've found some bad, partially-allocated inodes. fsck rm'd/cleared these and I lost several essential files. I've been up/booted since around 10.00 and have been been tarballing and scp'ing things to other servers... just in case. -STABLE seemed to be stable, surprise:), but then, who knows? It's a 3-year-old IDE and it might have been bumped. (?) > > > Suggestions? Do I have to create one huge slight filesystem, > > mount it and dd or what? > > If your asking how to use dd for moving your data to another (bigger) > disk please see the faq, it has an entry on this. URL, please? gary > > > > -- > IOnut > Unregistered ;) FreeBSD "user" > -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: any unusual inode problems with 4.9-RELEASE?
On Thu, 8 Apr 2004 10:13:04 -0700 Gary Kline <[EMAIL PROTECTED]> wrote: > > For the past few days I'm seeing serious inode problems > on my 40G drive. Has anybody seen unusual troubles with > inodes on FreeBSD-4.9-RELEASE? If not, maybe I'd better > get a second drive and dd over? I was running 4.9-STABLE > prev, and didn't see any major problems. Could you give some details ? > Suggestions? Do I have to create one huge slight filesystem, > mount it and dd or what? If your asking how to use dd for moving your data to another (bigger) disk please see the faq, it has an entry on this. -- IOnut Unregistered ;) FreeBSD "user" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
any unusual inode problems with 4.9-RELEASE?
For the past few days I'm seeing serious inode problems on my 40G drive. Has anybody seen unusual troubles with inodes on FreeBSD-4.9-RELEASE? If not, maybe I'd better get a second drive and dd over? I was running 4.9-STABLE prev, and didn't see any major problems. Suggestions? Do I have to create one huge slight filesystem, mount it and dd or what? thanks much, gary -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Error when installing FreeBSD 5.2: " /mnt/usr: create symlink failed, no inode free"
Dave Vollenweider <[EMAIL PROTECTED]> writes: > Been trying to install FreeBSD 5.2 using the kern.flp and mfsroot.flp images on > floppies and proceeding with a network install via FTP on an old Acer Aspire with a > Pentium 120 MHz processor and 80 MB of RAM on a 1.6 GB hard drive (the second on the > system; I have another OS on the other hard drive which shall remain nameless). > > The install goes fine until it begins to extract the files to the /usr directory, at > which it then spits out this error multiple times: > > /mnt/usr: create symlink failed, no inode free > > and continues to do so whenever something is added to the hard drive during the > installation. Curiously enough, though, the installation continues, even though I > got that error message again and again when the base install was completed and the > extra packages were being installed. I decided at that point to abort the > installation. > > Is there any way for me to fix this, and if so, how can I do it? Try allocating all of the disk space to a single root partition. This will make backups a little more difficult, but not much. Alternatively, try a more minimal installation at first, and then add things later, when you can follow the inode usage more closely. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Error when installing FreeBSD 5.2: " /mnt/usr: create symlink failed, no inode free"
Hello, Been trying to install FreeBSD 5.2 using the kern.flp and mfsroot.flp images on floppies and proceeding with a network install via FTP on an old Acer Aspire with a Pentium 120 MHz processor and 80 MB of RAM on a 1.6 GB hard drive (the second on the system; I have another OS on the other hard drive which shall remain nameless). The install goes fine until it begins to extract the files to the /usr directory, at which it then spits out this error multiple times: /mnt/usr: create symlink failed, no inode free and continues to do so whenever something is added to the hard drive during the installation. Curiously enough, though, the installation continues, even though I got that error message again and again when the base install was completed and the extra packages were being installed. I decided at that point to abort the installation. Is there any way for me to fix this, and if so, how can I do it? - Dave V. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode state
> Hmm. Kqueue should be thread-safe in that it's a system call, but I can't > speak to the safety of various arguments/parameters. I don't know if > linuxthreads tries to provide locking around file descriptors and might > have reference problems if kqueue were held over a call to close(), but it > could be kqueue will "just work" with linuxthreads. Do calls like > select()/poll() require thread-safe versions in linuxthreads? Yeah, select/poll is not needed, but the thing is that my app, which I just changed from pthreads to linuxthreads, did all ok, launched threads and all, but it crashed when running kevent() and all the referrences it gave to kevent() were fine. > Do you have an outstanding PR on the LSI problem, and/or a stack trace for > the trap? In the past, our LSI drivers have been fairly well maintained > on the LSI side. I can certainly try shaking some branches and see if > anything falls down, if there's a detailed bug report I can point at. I have no PR nor do I have a stack trace for the trap right now. How would I exactly get a stack trace of the trap? It happends when booting from the 5.2-beta cd-rom. Let me know when you need from me and I'll get all that. The box is at a hosting provider so I'll have to get the info from them. > I know some work has been done relating to this problem at Yahoo, > especially relating to disk fragmentation resulting from allocation using > mmap on sparse files. You might want to try posting about this problem on > freebsd-fs or freebsd-current and see if you manage to hook someone who's > been looking at this. Thanks, I'll give that a try. Fabian ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode state
On Tue, 9 Dec 2003, Fabian Thylmann wrote: > thanks for the reply, and yea, totally forgot the version. its 4.9. > > Now, the problem is: > 1) I can not use linuxthreads since my server is also multiplexing via > kqueue's and I can not find any version of linuxthreads which implements a > thread-safe version of kqueue. Hmm. Kqueue should be thread-safe in that it's a system call, but I can't speak to the safety of various arguments/parameters. I don't know if linuxthreads tries to provide locking around file descriptors and might have reference problems if kqueue were held over a call to close(), but it could be kqueue will "just work" with linuxthreads. Do calls like select()/poll() require thread-safe versions in linuxthreads? > 2) I can not use freebsd 5.2 because it fails to boot on a dell > poweredge 1750 with two harddisks. The LSILogic SCSI Controller the > server uses (mpt driver) seems to not find any hdds and gives up with an > error. If I remove one of the two disks 5.2 boots but the kernel traps > as soon as it tries to write to the hdd. Do you have an outstanding PR on the LSI problem, and/or a stack trace for the trap? In the past, our LSI drivers have been fairly well maintained on the LSI side. I can certainly try shaking some branches and see if anything falls down, if there's a detailed bug report I can point at. > Is there some way to keep the number of kernl-level locks as low as > possible? This all seems to be associated to flushing dirty buffers and > I wonder if there is no way to make it flush in way smaller bursts or > why exactly it has to lock the process while doing so. I know some work has been done relating to this problem at Yahoo, especially relating to disk fragmentation resulting from allocation using mmap on sparse files. You might want to try posting about this problem on freebsd-fs or freebsd-current and see if you manage to hook someone who's been looking at this. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Senior Research Scientist, McAfee Research > > Fabian > > - Original Message - > From: "Robert Watson" <[EMAIL PROTECTED]> > To: "Fabian Thylmann" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, December 09, 2003 7:38 PM > Subject: Re: inode state > > > > On Tue, 9 Dec 2003, Fabian Thylmann wrote: > > > > > I have a heavily used threaded server program running on one of my Dell > > > Poweredge 1750 servers. Its a statistical analysis package for websites. > > > Currently it analyses over 60 million requests a day, which (because of > > > many different reasons) causes it to handle around 120 million http > > > requests a day. At peaks around 1500 requests a second. > > > > > > The system stores most many statistics in memory which is flushed to > > > disk in circles by a worker thread. > > > > > > Another big part is stored in an on-disk database which is mmap()'d into > > > memory. Because we do not have enough memory to keep everything in > > > memory at one time the mmap() system of course pages data in and out. > > > > > > When I look in systat -v I see that dirtybuf climbs to about 1700 and > > > then they get flushed to disk, causing high disk usage of around 300-400 > > > tps whcih renders the disks useless for anything else. > > > > > > When those flushes occure, my apps state as displayed by top(1) gets > > > into inode state, PRI is set to -14 and cpu usage rapidly drops. The > > > program and ALL of its threads are stalled at that time. Those inode > > > states take around 2 oe 3 seconds and happen every 30 seconds or so. > > > > > > In those 3 seconds we lose around 1500 hits at peak times for processing > > > because the app can not handle them fast enough. This results in around > > > 2 million or so hits lost over the day for processing. > > > > > > I am now wondering if anyone can explain to me why ALL threads and not > > > just the threads that actually do I/O work get blocked when dirty > > > buffers are flushed and what to do to fix this problem. > > > > > > I would be very happy if someone could reply and point me into the right > > > direction! > > > > You don't mention which version of FreeBSD you're running -- if 4.x, you > > probably want to relink your application against the "linuxthreads" port. > > This is because libc_r implements threads inside a single process without > > the support of the kernel, which means that if the process is bloc
Re: inode state
Hi Robert, thanks for the reply, and yea, totally forgot the version. its 4.9. Now, the problem is: 1) I can not use linuxthreads since my server is also multiplexing via kqueue's and I can not find any version of linuxthreads which implements a thread-safe version of kqueue. 2) I can not use freebsd 5.2 because it fails to boot on a dell poweredge 1750 with two harddisks. The LSILogic SCSI Controller the server uses (mpt driver) seems to not find any hdds and gives up with an error. If I remove one of the two disks 5.2 boots but the kernel traps as soon as it tries to write to the hdd. Is there some way to keep the number of kernl-level locks as low as possible? This all seems to be associated to flushing dirty buffers and I wonder if there is no way to make it flush in way smaller bursts or why exactly it has to lock the process while doing so. Fabian - Original Message - From: "Robert Watson" <[EMAIL PROTECTED]> To: "Fabian Thylmann" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, December 09, 2003 7:38 PM Subject: Re: inode state > On Tue, 9 Dec 2003, Fabian Thylmann wrote: > > > I have a heavily used threaded server program running on one of my Dell > > Poweredge 1750 servers. Its a statistical analysis package for websites. > > Currently it analyses over 60 million requests a day, which (because of > > many different reasons) causes it to handle around 120 million http > > requests a day. At peaks around 1500 requests a second. > > > > The system stores most many statistics in memory which is flushed to > > disk in circles by a worker thread. > > > > Another big part is stored in an on-disk database which is mmap()'d into > > memory. Because we do not have enough memory to keep everything in > > memory at one time the mmap() system of course pages data in and out. > > > > When I look in systat -v I see that dirtybuf climbs to about 1700 and > > then they get flushed to disk, causing high disk usage of around 300-400 > > tps whcih renders the disks useless for anything else. > > > > When those flushes occure, my apps state as displayed by top(1) gets > > into inode state, PRI is set to -14 and cpu usage rapidly drops. The > > program and ALL of its threads are stalled at that time. Those inode > > states take around 2 oe 3 seconds and happen every 30 seconds or so. > > > > In those 3 seconds we lose around 1500 hits at peak times for processing > > because the app can not handle them fast enough. This results in around > > 2 million or so hits lost over the day for processing. > > > > I am now wondering if anyone can explain to me why ALL threads and not > > just the threads that actually do I/O work get blocked when dirty > > buffers are flushed and what to do to fix this problem. > > > > I would be very happy if someone could reply and point me into the right > > direction! > > You don't mention which version of FreeBSD you're running -- if 4.x, you > probably want to relink your application against the "linuxthreads" port. > This is because libc_r implements threads inside a single process without > the support of the kernel, which means that if the process is blocked in > kernel, all threads will be blocked in kernel. The linuxthreads package > uses a model similar to Linux's threading implementation (hence the name) > to allow the threads to be scheduled using lightweight versions of > processes (shared file descriptors, etc). This isn't quite > POSIX-compliant, but it works quite well for disk-bound applications such > as databases. > > If you're running on 5.x, especially recent 5.1 or 5.2 prereleases, you > probably want to give libkse a try. It's the new m:n threading > implementation that will become the default in 5.3, and also permits > parallelism (only in a more POSIX-compliant way, and in theory offering > much greater scalability for large numbers of threads). I stick the > following lines in my /etc/libmap.conf on 5.x boxes to force all > applications linked against libc_r to use libkse instead: > > libc_r.so.5 libkse.so.1 > libc_r.so libkse.so > > One particularly nice thing about the m:n thread support is that you can > run-time plug the thread library between several options (libc_r, libthr, > libkse) to pick the one that performs best for your application. Another > benefit of running with a non-libc_r threads package is that if you have > an SMP box, you'll see real parallelism. > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > [EMAIL PROTECTED] Senior Research Scientist, McAfee Research > > > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: inode state
On Tue, 9 Dec 2003, Fabian Thylmann wrote: > I have a heavily used threaded server program running on one of my Dell > Poweredge 1750 servers. Its a statistical analysis package for websites. > Currently it analyses over 60 million requests a day, which (because of > many different reasons) causes it to handle around 120 million http > requests a day. At peaks around 1500 requests a second. > > The system stores most many statistics in memory which is flushed to > disk in circles by a worker thread. > > Another big part is stored in an on-disk database which is mmap()'d into > memory. Because we do not have enough memory to keep everything in > memory at one time the mmap() system of course pages data in and out. > > When I look in systat -v I see that dirtybuf climbs to about 1700 and > then they get flushed to disk, causing high disk usage of around 300-400 > tps whcih renders the disks useless for anything else. > > When those flushes occure, my apps state as displayed by top(1) gets > into inode state, PRI is set to -14 and cpu usage rapidly drops. The > program and ALL of its threads are stalled at that time. Those inode > states take around 2 oe 3 seconds and happen every 30 seconds or so. > > In those 3 seconds we lose around 1500 hits at peak times for processing > because the app can not handle them fast enough. This results in around > 2 million or so hits lost over the day for processing. > > I am now wondering if anyone can explain to me why ALL threads and not > just the threads that actually do I/O work get blocked when dirty > buffers are flushed and what to do to fix this problem. > > I would be very happy if someone could reply and point me into the right > direction! You don't mention which version of FreeBSD you're running -- if 4.x, you probably want to relink your application against the "linuxthreads" port. This is because libc_r implements threads inside a single process without the support of the kernel, which means that if the process is blocked in kernel, all threads will be blocked in kernel. The linuxthreads package uses a model similar to Linux's threading implementation (hence the name) to allow the threads to be scheduled using lightweight versions of processes (shared file descriptors, etc). This isn't quite POSIX-compliant, but it works quite well for disk-bound applications such as databases. If you're running on 5.x, especially recent 5.1 or 5.2 prereleases, you probably want to give libkse a try. It's the new m:n threading implementation that will become the default in 5.3, and also permits parallelism (only in a more POSIX-compliant way, and in theory offering much greater scalability for large numbers of threads). I stick the following lines in my /etc/libmap.conf on 5.x boxes to force all applications linked against libc_r to use libkse instead: libc_r.so.5 libkse.so.1 libc_r.so libkse.so One particularly nice thing about the m:n thread support is that you can run-time plug the thread library between several options (libc_r, libthr, libkse) to pick the one that performs best for your application. Another benefit of running with a non-libc_r threads package is that if you have an SMP box, you'll see real parallelism. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Senior Research Scientist, McAfee Research ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
inode state
Hi, I have a heavily used threaded server program running on one of my Dell Poweredge 1750 servers. Its a statistical analysis package for websites. Currently it analyses over 60 million requests a day, which (because of many different reasons) causes it to handle around 120 million http requests a day. At peaks around 1500 requests a second. The system stores most many statistics in memory which is flushed to disk in circles by a worker thread. Another big part is stored in an on-disk database which is mmap()'d into memory. Because we do not have enough memory to keep everything in memory at one time the mmap() system of course pages data in and out. When I look in systat -v I see that dirtybuf climbs to about 1700 and then they get flushed to disk, causing high disk usage of around 300-400 tps whcih renders the disks useless for anything else. When those flushes occure, my apps state as displayed by top(1) gets into inode state, PRI is set to -14 and cpu usage rapidly drops. The program and ALL of its threads are stalled at that time. Those inode states take around 2 oe 3 seconds and happen every 30 seconds or so. In those 3 seconds we lose around 1500 hits at peak times for processing because the app can not handle them fast enough. This results in around 2 million or so hits lost over the day for processing. I am now wondering if anyone can explain to me why ALL threads and not just the threads that actually do I/O work get blocked when dirty buffers are flushed and what to do to fix this problem. I would be very happy if someone could reply and point me into the right direction! Fabian Thylmann ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode Problem
Thanks. I guess I may as well get a bigger disk... ;) Jan Grant wrote: On Sat, 12 Jul 2003, Gerard Samuel wrote: A few weeks ago, I had a problem on one of my partitions where it was running out of inodes. The guy who helped me out, at the time suggested to either rebuild the disk or the partition. I don't remember which one at the moment. So what should I be doing? Rebuilding the disk or the partition (if possible) Thanks I suspect the advice was to recreate the filesystem, allocating more inodes, then restore the FS contents from a backup. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Inode Problem
On Sat, 12 Jul 2003, Gerard Samuel wrote: > A few weeks ago, I had a problem on one of my partitions where it was > running out of inodes. > The guy who helped me out, at the time suggested to either rebuild the > disk or the partition. > I don't remember which one at the moment. > So what should I be doing? Rebuilding the disk or the partition (if > possible) > Thanks I suspect the advice was to recreate the filesystem, allocating more inodes, then restore the FS contents from a backup. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ I am now available for general use under a modified BSD licence. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Inode Problem
A few weeks ago, I had a problem on one of my partitions where it was running out of inodes. The guy who helped me out, at the time suggested to either rebuild the disk or the partition. I don't remember which one at the moment. So what should I be doing? Rebuilding the disk or the partition (if possible) Thanks ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
2 filesystem problems: blst_radix_free and bad inode number
I've got an AMD Duron-700 running FreeBSD 4.8-RC. It's got a Promise IDE RAID card and two identical 40GB Maxtor drives (less than six months old) -- mirrored. No floppy, no CD-ROM, no other IDE drives. The machine is a headless Samba fileserver in my office. A few days ago, it became unreachable by SSH (filesharing still worked). I had to power-cycle it to get it down and plugged into a monitor and keyboard. It's having two problems when booting: 1) if I try to boot normally (multiuser), it panics when loading the root filesystem, then reboots (again and again...): panic: blst_radix_free: freeing free block 2) If I boot single-user, it mounts the root filesystem. When I try to fsck the various filesystems (/, /var, /tmp, /usr) I get this error when fscking /dev/ar0s1g (/usr): fsck: bad inode number 132352 to setinodebuf All the other filesystems come up clean. I don't know if the problems are related. I disassembled the array and booted from one of the mirrored drives alone -- same error -- then I reassambled the array. Any ideas on how to solve one or both of these problems? Thanks! Michael A. Smith ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"