Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Power Outage and Improper Shutdown

  1. #1
    Join Date
    Aug 2007
    Location
    Chattanooga, TN
    Beans
    192
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Power Outage and Improper Shutdown

    today i had a power outage and my ubuntu server was running (not plugged in to an UPS) so it was immediately shutdown. i booted the machine, how do i check if everything is ok on it? it wasn't really running anything when it got shutdown, i don't think it was even logged in, but it was powered on.

    what kind of checks should i do? is there something i could do like chkdsk on windows?

  2. #2
    Join Date
    Apr 2008
    Location
    Australian in Germany
    Beans
    4,010
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Power Outage and Improper Shutdown

    I think one possibility is "fsck"
    https://help.ubuntu.com/community/Sy...istration/Fsck
    Michael

  3. #3
    Join Date
    Aug 2007
    Location
    Chattanooga, TN
    Beans
    192
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Outage and Improper Shutdown

    ok so I was about to execute this command when it tells me the following:

    Code:
    fsck -yt ext3 /
    Code:
    WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. 
    
    Do you really want to continue (y/n)?
    I said no because this scared the crap out of me... what am I supposed to do?

  4. #4
    Join Date
    Feb 2009
    Beans
    107
    Distro
    Ubuntu Development Release

    Re: Power Outage and Improper Shutdown

    do not fsck mounted partitions, rather you could force a check on next reboot, run this "sudo touch /forcefsck" and reboot
    ...when you look long into the abyss, the abyss also looks back at you

  5. #5
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Power Outage and Improper Shutdown

    If the drive you are checking is mounted, don't run the scan. Best thing to do is boot from a live CD and run a check there.

    EDIT: Or follow Ichtyandr's advice, which is way simpler.

  6. #6
    Join Date
    Apr 2008
    Location
    Australian in Germany
    Beans
    4,010
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Power Outage and Improper Shutdown

    Easiest would be to run it from the live CD. I am pretty sure it is on there. I used it about 4 weeks ago, and can't remember having had to download it to do so.
    Michael

  7. #7
    Join Date
    Aug 2007
    Location
    Chattanooga, TN
    Beans
    192
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Outage and Improper Shutdown

    Quote Originally Posted by Ichtyandr View Post
    do not fsck mounted partitions, rather you could force a check on next reboot, run this "sudo touch /forcefsck" and reboot
    will this command automatically attempt to fix errors?

    EDIT: I've ran this command twice and both times it has rebooted and told me that /dev/sda3 has 1.1% non-contiguous files and /dev/sda2 has 2.3% non-contiguous files. Does this mean there are errors on the disk? How do i know if the errors were fixed?
    Last edited by LRT; February 5th, 2010 at 04:36 PM.

  8. #8
    Join Date
    Apr 2008
    Location
    Australian in Germany
    Beans
    4,010
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Power Outage and Improper Shutdown

    read
    Code:
    man fsck
    for a full explanation of the options. I don't know enough about what it does to be willing to make a statement.
    Michael

  9. #9
    Join Date
    Feb 2009
    Beans
    107
    Distro
    Ubuntu Development Release

    Re: Power Outage and Improper Shutdown

    Quote Originally Posted by LRT View Post
    will this command automatically attempt to fix errors?
    well "man fsck" says that "fsck is used to check and optionally repair one or more Linux file systems" read if for the explanation of what it does, or look here: http://linux.die.net/man/8/fsck

    generally however I never had errors on power outages on Linux so far it behaves really well. Today e.g. I had about 10-15 sudden power interruptions due to abnormal weather conditions, last one while I was typing this and so far its ok
    ...when you look long into the abyss, the abyss also looks back at you

  10. #10
    Join Date
    Aug 2007
    Location
    Chattanooga, TN
    Beans
    192
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Power Outage and Improper Shutdown

    Quote Originally Posted by Ichtyandr View Post
    well "man fsck" says that "fsck is used to check and optionally repair one or more Linux file systems" read if for the explanation of what it does, or look here: http://linux.die.net/man/8/fsck
    the manpage for fsck says to use the -a flag to "Automatically repair the file system without any questions". But how do I use this flag with:

    Code:
    sudo touch /forcefsck
    reboot
    there is no manpage for forcefsck.

    please read my edit from post #7.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •