DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th December 2010
IronForge IronForge is offline
Fdisk Soldier
 
Join Date: Jul 2009
Location: SoCal - "have skills, will travel for projects"
Posts: 55
Default Xtracting Data after Fragmentation / Block Count / Partition Problems on Boot

Greetings:

Another fine mess I found myself intrigued with.

I've had my OpenBSD on an older box for some time; and have upgraded/updated/snapshotted several times.

During the last few installs (snapshot + xfce4), my mouse would freeze on occasion, while working with a browser (FF, Epiphany and Midori). Reading from the other posts (regarding security), I've taken the practice of "resetting the always on modem".

Having the machine freeze forces a manual reset/reboot of the machine. I get the fragmentation notices during the reboot. Since the frequency of the 'freezing" increased, I was about to do a backup and reinstall from another snapshot, when I was notified that
the "/dev/rwd0k (which is /home) had the following output displayed:

1) Incorrect block count (corrected)
2) Partially truncated INODE (I=######)
3) Unexpected Inconsistency, try fsck_ffs
4) "Automatic File System Check failed, Help!", with options to enter a shell directory or pressing <ENTER> for sh:

Since I needed to compile a report for a court hearing very soon - and "home" being the only directory afflicted, other unexplained phenomenon need to be addressed.

There are other peculiar actions going on. For instance, while I was working late at night and noticed the hard drive get very busy for awhile (I was using a browser), I raised "top" on the terminal. I noticed a "find" function being run by root (I wasn't logged in as root; and I'm the only user for this box), which disappeared while I was trying to raise the system monitor app. The "find" app/process wasn't available on both process listings (should be available for a bit, since some history is retained post usage).

Q1 - on "find as root": If this were a background process by the OS, should it be run by "system"? Could this be a hack job?

Q2: Any way I can mount /dev/rwd0k (/home) with its "inconsistencies" and backup the files so I can do a reinstall?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 15th December 2010
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Quote:
Originally Posted by IronForge View Post
4) "Automatic File System Check failed, Help!", with options to enter a shell directory or pressing <ENTER> for sh:
If the automatic file system check failed, it's asking you to run a manual file system check, i.e. 'fsck /dev/<whatever>'

Quote:
Originally Posted by IronForge View Post
There are other peculiar actions going on. For instance, while I was working late at night and noticed the hard drive get very busy for awhile (I was using a browser), I raised "top" on the terminal. I noticed a "find" function being run by root
Code:
# grep -C "find" /etc/{daily,weekly,monthly}
/etc/daily-if [ -d /tmp -a ! -L /tmp ]; then
/etc/daily-     cd /tmp && {
/etc/daily:     find -x . \
/etc/daily-         \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
/etc/daily-             -o -path ./portslocks \) \
/etc/daily-         -prune -o -type f -atime +3 -execdir rm -f -- {} \;
/etc/daily:     find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
/etc/daily-         ! -path ./.ICE-unix ! -path ./portslocks ! -name . \
/etc/daily-         -execdir rmdir -- {} \; >/dev/null 2>&1; }
--
/etc/daily-if [ -d /var/tmp -a ! -L /var/tmp ]; then
/etc/daily-     cd /var/tmp && {
/etc/daily:     find -x . \
/etc/daily-         \( -path './ssh-*' -o -path ./.X11-unix -o -path ./.ICE-unix \
/etc/daily-             -o -path ./portslocks \) \
/etc/daily-         -prune -o ! -type d -atime +7 -execdir rm -f -- {} \;
/etc/daily:     find -x . -type d -mtime +1 ! -path ./vi.recover ! -path ./.X11-unix \
/etc/daily-         ! -path ./.ICE-unix ! -path ./portslocks ! -name . \
/etc/daily-         -execdir rmdir -- {} \; >/dev/null 2>&1; }
--
/etc/daily-if [ -d /var/rwho -a ! -L /var/rwho ] ; then
/etc/daily-     cd /var/rwho && {
/etc/daily:     find . ! -name . -mtime +7 -execdir rm -f -- {} \; ; }
/etc/daily-fi
/etc/daily-
This is cleanup code that gets run each night as root:

Code:
# crontab -l | grep daily
# do daily/weekly/monthly maintenance
30      1       *       *       *       /bin/sh /etc/daily

Last edited by rocket357; 15th December 2010 at 10:55 PM.
Reply With Quote
  #3   (View Single Post)  
Old 15th December 2010
IronForge IronForge is offline
Fdisk Soldier
 
Join Date: Jul 2009
Location: SoCal - "have skills, will travel for projects"
Posts: 55
Default Thanks

I'll give it a shot.
Reply With Quote
  #4   (View Single Post)  
Old 16th December 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,027
Default

STOP!!

Don't fsck that partition until you've backed it up! You are likely to lose data on your way to making it mountable read/write.

You can force mount it in read/only mode un-fscked, and dump(8) it somewhere. Or you can dd(1) the raw device to a file.
Reply With Quote
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Huge FTP transfer file fragmentation problem under Windows eakinasila Other OS 2 13th December 2009 02:50 PM
FreeBSD 7.2@amd64 atheros problem ath0: stuck beacon; resetting (bmiss count 4) asmo FreeBSD General 0 6th June 2009 11:02 AM
Data Structures in C JMJ_coder Programming 9 6th November 2008 02:22 AM
data recovery. LateNiteTV FreeBSD General 8 29th August 2008 08:11 PM
Problems with ntfs partition located on a SATA driver. disappearedng FreeBSD General 3 21st May 2008 10:29 AM


All times are GMT. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick