Announcement

Collapse
No announcement yet.

check disk for bad clusters on disk

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    check disk for bad clusters on disk

    hi... I need an equivalent function to windows' check disk. my external hard drive seems to have bad clusters as every time I try to mount it it shows different weired behaviors. sometimes it fails to mount, sometimes it mounts but with no contents and when its neither of those, meaning it mounts with contents, it is really slow to surf it and READ/WRITE from/into it.
    any suggestions...?
    Cheers, -Linda

    #2
    Re: check disk for bad clusters on disk

    Top 20 Kubuntu FAQs & Answers -> BONUS FAQ: "I'm a little worried worried about my hard drive -- how do I test it and verify it is OK?"
    Have you tried ?

    - How to Ask a Question on the Internet and Get It Answered
    - How To Ask Questions The Smart Way

    Comment


      #3
      Re: check disk for bad clusters on disk

      Originally posted by OneLine
      Top 20 Kubuntu FAQs & Answers -> BONUS FAQ: "I'm a little worried worried about my hard drive -- how do I test it and verify it is OK?"
      great post to refer to... -thanks for that!-
      but im stuck...
      while using smartmontools, im stuck in detecting which type i should use for my device. the command is:
      Code:
      smartctl -ia /dev/sdb
      which gives me this error:
      Code:
      /dev/sdb: Unknown USB bridge [0x0411:0x0108 (0x104)]
      Smartctl: please specify device type with the -d option.
      Im having a Buffalo 1TB external hard drive which I connect it through my eSATA port.
      so when I want to choose a type, which one of these I should use?
      under smartmontools:
      sat - the device type is SCSI to ATA Translation (SAT). This is for ATA disks that have a SCSI to ATA Translation
      (SAT) Layer (SATL) between the disk and the operating system. SAT defines two ATA PASS THROUGH SCSI commands, one
      12 bytes long and the other 16 bytes long. The default is the 16 byte variant which can be overridden with either
      ´-d sat,12´ or ´-d sat,16´.

      usbcypress - this device type is for ATA disks that are behind a Cypress USB to PATA bridge. This will use the
      ATACB proprietary scsi pass through command. The default SCSI operation code is 0x24, but although it can be over‐
      ridden with ´-d usbcypress,0xN´, where N is the scsi operation code, you're running the risk of damage to the device
      or filesystems on it.

      usbjmicron - this device type is for SATA disks that are behind a JMicron USB to PATA/SATA bridge. The 48-bit ATA
      commands (required e.g. for ´-l xerror´, see below) do not work with all of these bridges and are therefore disabled
      by default. These commands can be enabled by ´-d usbjmicron,x´. If two disks are connected to a bridge with two
      ports, an error message is printed if no PORT is specified. The port can be specified by ´-d usbjmicron[,x],PORT´
      where PORT is 0 (master) or 1 (slave). This is not necessary if the device uses a port multiplier to connect multi‐
      ple disks to one port. The disks appear under separate /dev/ice names then. CAUTION: Specifying ´,x´ for a device
      which does not support it results in I/O errors and may disconnect the drive. The same applies if the specified
      PORT does not exist or is not connected to a disk.

      usbsunplus - this device type is for SATA disks that are behind a SunplusIT USB to SATA bridge.
      Cheers, -Linda

      Comment


        #4
        Re: check disk for bad clusters on disk

        1. You may need to run smartctl as sudo, even just to read the information:

        sudo smartctl -ia /dev/sdb

        2. Try running the gui version and see if it picks up the drive. You will need to install the package gsmartcontrol. It can be run two ways, as gsmartcontrol for reading information, and gsmartcontrol-root for changing things (careful!). Note that you do not need to run gsmartcontrol-root as kdesudo, it does that automatically on its own.
        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: check disk for bad clusters on disk

          http://sourceforge.net/apps/trac/sma...ed_USB-Devices is suggesting: "-d sat" option. More: http://sourceforge.net/apps/trac/smartmontools/wiki/USB
          Have you tried ?

          - How to Ask a Question on the Internet and Get It Answered
          - How To Ask Questions The Smart Way

          Comment


            #6
            Re: check disk for bad clusters on disk

            Further:

            I notice that when I plug in my usb drive, I *have* to run gsmartcontrol-root, the non-root version just won't work with the usb drive plugged in.

            Hope this helps.
            We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

            Comment


              #7
              Re: check disk for bad clusters on disk

              thx for all the info.
              I followed your says, but im not sure how to run it. based on its man page, i got that i have to run it as:
              Code:
              #gsmartcontrol-root kde
              is that right? [gtk]: i get an error saying cannot open display : :0
              Cheers, -Linda

              Comment


                #8
                Re: check disk for bad clusters on disk

                gsmartcontrol-root

                it will ask you for your password.

                Edit: you could also run

                kdesudo gsmartcontrol

                they do exactly the same thing.
                We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                Comment


                  #9
                  Re: check disk for bad clusters on disk

                  Originally posted by doctordruidphd
                  gsmartcontrol-root

                  it will ask you for your password.

                  Edit: you could also run

                  kdesudo gsmartcontrol

                  they do exactly the same thing.
                  ok I get the GUI interface that I got previously as well.. (i just didnt know the root one is also the same)
                  anyways, it detects my external hard drive, but when I right click on the drive to perform test, that option is disabled.
                  i tried it on my other hard disk and the option is enabled, so I'm sure the problem is with this drive. how can I solve this? I've formatted this drive recently as well many times. but problems are still there.
                  Cheers, -Linda

                  Comment


                    #10
                    Re: check disk for bad clusters on disk

                    I am wondering at this point if maybe your external hard drive does not support SMART.

                    What does

                    sudo smartctl -i /dev/sd? (where ? is your device)

                    tell you? If it says smart is not enabled. then try

                    sudo smartctl -s on /dev/sd?

                    If you don't know the /dev/sd? for your external disk, then

                    sudo blkid

                    will tell you.

                    In the gui, when you hover the mouse pointer over the drive, does it say, "Smart status: enabled" ? Does the "View Details" option give you a screen with drive information?

                    I can't duplicate the problem, it works here.

                    Other than SMART, there are a few utilities out there for checking disks, but they are primarily partition tools, as opposed to hardware diagnostics. e2fsck would be the main one for linux file systems, but there again, it must be run as root, so use care.

                    Edit: Some second thoughts on this.
                    Im having a Buffalo 1TB external hard drive which I connect it through my eSATA port.
                    I'll admit I don't know what an "eSATA" port is. Is this something that plugs into a usb socket? Whether yes or no, you might try plugging your drive in and type

                    lsusb

                    and see what shows up there. you might, after all, need to use the -d option with smartctl, and to do so you will need to know what type of usb bridge is involved (lsusb will tell you that).

                    Also, there may be an issue with whether the drive is plugged in during bootup. Do you have the external drive connected before booting the system?

                    (I'm just going through the things I would check if this happened to me)


                    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                    Comment


                      #11
                      Re: check disk for bad clusters on disk

                      If the attached external disk is seen by
                      Code:
                      sudo fdisk -l
                      then you could use GParted to check it, as well as e2fsck as said by Dr. D. In either case, make sure the drive is unmounted first.

                      Comment


                        #12
                        Re: check disk for bad clusters on disk

                        Originally posted by doctordruidphd
                        I'll admit I don't know what an "eSATA" port is. Is this something that plugs into a usb socket? Whether yes or no, you might try plugging your drive in and type
                        eSATA defines the specifications and connectors for external SATA drives. Most newer machines have an eSATA port:

                        [img width=240]http://genesisonestudio.com/blog/wp-content/uploads/2010/06/esata1.jpg[/img]

                        But the voltages and connectors are different:

                        [img width=240]http://www.amitbhawani.com/blog/Images/S/sata-esata.jpg[/img]

                        It's much faster than USB. Unfortunately, eSATA doesn't provide power, so you have to find +5V someplace else. Commonly that's from a USB port. An unofficial eSATAp exists to fix this, but neither the SATA nor the USB standards bodies have approved it.

                        Comment


                          #13
                          Re: check disk for bad clusters on disk

                          I see. OK, then going through a usb bridge isn't the problem.
                          Don't know why smartctl isn't picking up the disk, unless either the disk doesn't support
                          SMART (unlikely) or it really does have a problem, maybe even a bad connector or something like that inside the box.
                          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                          Comment


                            #14
                            Re: check disk for bad clusters on disk

                            If it is USB-connected, that connection can be a little iffy on some hardware -- for example if the system has started going into sleep or hibernate after a period of inactivity. I've got an Asus desktop motherboard that has zero USB capability when you wake it up from sleep.

                            FYI, a sturdy laptop with an e-SATA port, like a Dell E6500, along with an e-SATA to SATA cable and a power adapter, makes a pretty fair tool for hooking up a virus-laden Windows drive for scanning purposes. The SATA channel runs about 3X - 4X faster than USB2 (the spec shows 5X faster but you don't realize that in practice).

                            Comment


                              #15
                              Re: check disk for bad clusters on disk


                              thanks for all responses...

                              Originally posted by doctordruidphd
                              I am wondering at this point if maybe your external hard drive does not support SMART.

                              What does

                              sudo smartctl -i /dev/sd? (where ? is your device)

                              tell you? If it says smart is not enabled. then try

                              sudo smartctl -s on /dev/sd?

                              If you don't know the /dev/sd? for your external disk, then

                              sudo blkid

                              will tell you.
                              unable to fetch IEC (SMART) mode page [unsupported field in scsi command]
                              A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.



                              Originally posted by doctordruidphd
                              In the gui, when you hover the mouse pointer over the drive, does it say, "Smart status: enabled" ?
                              no

                              Originally posted by doctordruidphd
                              Does the "View Details" option give you a screen with drive information?
                              no, it says "unsupported"

                              Originally posted by doctordruidphd
                              I can't duplicate the problem, it works here.

                              Other than SMART, there are a few utilities out there for checking disks, but they are primarily partition tools, as opposed to hardware diagnostics. e2fsck would be the main one for linux file systems, but there again, it must be run as root, so use care.

                              Edit: Some second thoughts on this.
                              Im having a Buffalo 1TB external hard drive which I connect it through my eSATA port.
                              I'll admit I don't know what an "eSATA" port is. Is this something that plugs into a usb socket? Whether yes or no, you might try plugging your drive in and type

                              lsusb

                              and see what shows up there. you might, after all, need to use the -d option with smartctl, and to do so you will need to know what type of usb bridge is involved (lsusb will tell you that).
                              Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                              Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                              Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
                              Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
                              Bus 001 Device 003: ID 064e:a213 Suyin Corp.
                              Bus 001 Device 004: ID 0489:e00f Foxconn / Hon Hai Foxconn T77H114 BCM2070 [Single-Chip Bluetooth 2.1 + EDR Adapter]
                              Bus 002 Device 005: ID 0411:0108 MelCo., Inc.

                              Originally posted by doctordruidphd

                              Also, there may be an issue with whether the drive is plugged in during bootup. Do you have the external drive connected before booting the system?
                              nope...

                              Originally posted by doctordruidphd
                              (I'm just going through the things I would check if this happened to me)
                              yup... and thanks alot for your patients in pointing out carefully all the details...

                              Originally posted by dibl
                              If the attached external disk is seen by
                              Code:
                              sudo fdisk -l
                              then you could use GParted to check it, as well as e2fsck as said by Dr. D. In either case, make sure the drive is unmounted first.
                              yes I can see it and i did install gparted, but it right now im facing problems with starting gparted itself (!) which probably I shouldnt post under this topic so I've started a new topic for that problem here>>http://kubuntuforums.net/forums/inde...opic=3119286.0
                              will get back to you guys as soon as its solved.
                              Cheers, -Linda

                              Comment

                              Working...
                              X