Find the answer to your Linux question:
Results 1 to 3 of 3
how do i run fsck on my drives? all are ext2 power went out. $ sudo fdisk -l Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders ...
  1. #1
    Linux Newbie
    Join Date
    Jan 2010
    Location
    usa
    Posts
    124

    check more then one hard drive with fsck

    how do i run fsck on my drives? all are ext2 power went out.

    $ sudo fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x2a732a72

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 19458 156289024 83 Linux

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000a1f25

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 121602 976760832 83 Linux

    Disk /dev/sdc: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000d0647

    Device Boot Start End Blocks Id System
    /dev/sdc1 1 60802 488385536 83 Linux

    /dev/sda1 / #root
    /dev/sdb1 /home/1tb #another hard drive mounted in home
    /dev/sdc1 /home/500gb #another hard drive mounted in home

  2. #2
    Just Joined!
    Join Date
    Dec 2010
    Posts
    9

    Smile

    fsck -p

    This can fix minor problems!!
    Last edited by mnvamsi; 12-20-2010 at 09:51 AM.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,977
    In a case like this, as long as the system is still bootable then the OS should detect that the drivers were shut down improperly and run fsck automatically. If it fails to boot, then you need to boot from a recovery / live CD/DVD/USB drive and run fsck on them manually. You may also need to restore some files/drivers/whatever if booting after fixing the drives fails. Normally, ext2/ext3 file systems will be pretty resiliant to power failures.

    Final bit of advice - NEVER run a system without a UPS or some sort of battery backup. My workstation/server runs on a good quality UPS and it has been saved numerous times from power failures and brown-outs. My other systems are laptops and the internal battery is their own UPS so I don't bother to hook their external power brick into the UPS-served power, but just into a regular wall jack or power strip.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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