Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
First off, I just wanted to make it clear that I have searched through many forums for a while, and I have not found any answers. So, I am hoping ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    5

    Can't mount hard drive!


    First off, I just wanted to make it clear that I have searched through many forums for a while, and I have not found any answers. So, I am hoping someone here can help me out with this headache of a problem.

    I have an Arch Linux server running. It's been up for about six months now, with few issues. However, recently the location the server is in has had a few power outages. After one of the outages, my server stopped mounting the USB hard drive attached to it. I checked the hard drive in Windows, and all of the data is there, perfectly intact.

    I run:
    Code:
    #mount /dev/sda1 /mnt/usb
    mount: according to mtab, /dev/sda1 is already mounted on /mnt/usb
    
    #mount /dev/sda1 /media/external
    mount: according to mtab, /dev/sda1 is already mounted on /media/external
    I have also tried unmounting, but the system says that the drive isn't mounted (even though mtab thinks it is).

    Here's my fstab:
    Code:
     
    devpts                 /dev/pts      devpts    defaults            0      0
    shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
    /dev/sda1              /mnt/usb      ntfs      defaults  0 2
    This is the way my fstab has always been. Do I need to change something in it?

    Any suggestions would be greatly appreciated. Thanks!

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    Post the output of fdisk -l command here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Sep 2011
    Posts
    5
    Hi, and thanks for the quick reply. Here's my fdisk -l.

    Code:
    # fdisk -l
    
    Disk /dev/mtdblock0: 1 MB, 1048576 bytes
    255 heads, 63 sectors/track, 0 cylinders, total 2048 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/mtdblock0 doesn't contain a valid partition table
    
    Disk /dev/mtdblock2: 33 MB, 33554432 bytes
    255 heads, 63 sectors/track, 4 cylinders, total 65536 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/mtdblock2 doesn't contain a valid partition table
    
    Disk /dev/mtdblock3: 95 MB, 95420416 bytes
    255 heads, 63 sectors/track, 11 cylinders, total 186368 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/mtdblock3 doesn't contain a valid partition table
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x2973ae33
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048   976769023   488383488    7  HPFS/NTFS/exFAT
    
    Disk /dev/sdb: 2003 MB, 2003795968 bytes
    32 heads, 63 sectors/track, 1941 cylinders, total 3913664 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0bb22328
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63     3913055     1956496+  83  Linux
    The 500GB drive (sda) is the one I'm trying to mount. Thanks!

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    What kind of file is your mtab?
    Code:
    ls -l /etc/mtab
    What does your mtab file look like?
    Code:
    cat /etc/mtab
    On some systems, /etc/mtab is a stand-alone file, but on others, it is a symlink to /proc/mounts (which I think is the preferred way to do it). If it is indeed a file, maybe move it to a temp file, like /etc/mtab.bak, then try to mount your USB drive.

    If mtab is indeed a static, file, then if you check /proc/mounts, it should accurately reflect what is actually mounted, e.g.:

    Code:
    cat /proc/mounts
    You can change the 6th column in your fstab line to be '0', as the NTFS filesystem does not need to be fscked, e.g.:
    Code:
    /dev/sda1              /mnt/usb      ntfs      defaults  0 0

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    You should set umask=0 to enable read/write access for all users.
    Code:
    /dev/sda1       /mnt/usb    ntfs      defaults,umask=0   0  0
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Just Joined!
    Join Date
    Sep 2011
    Posts
    5
    I edited fstab as devils casper recommended.

    However, I'm having issues getting to my mtab. I try:
    Code:
    # ls -l /etc/mtab
    ls: cannot access /etc/mtab: Input/output error
    When I change directory to /etc and ls, I can see the mtab file. So it's there. But, If I try to edit it (nano /etc/mtab) all I get is a blank file (edit: it actually prompts me to create a new file). I tried sudo as well, still nothing. Any ideas? Is there something wrong with my mtab file?

    EDIT: I just did this:
    Code:
     #ls -l /etc
    and this is what it shows for mtab:
    Code:
     -????????? ? ?    ?         ?            ? mtab
    Any suggestions?

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    It looks like Machine wasn't shut down properly or for some other reason, /etc/mtab file has been corrupted.
    Delete it, create a new empty file and reboot.

    Run following commands as root user. Make sure to type correct command. There shouldn't be any typo.
    Code:
    rm -f /etc/mtab
    touch /etc/mtab
    Reboot machine.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #8
    Just Joined!
    Join Date
    Sep 2011
    Posts
    5
    Code:
    # rm -f /etc/mtab
    rm: cannot remove `/etc/mtab': Input/output error
    I am logged in as root. Doesn't seem like it will let me delete the file, though.

    Also, thanks for your continued help... I really appreciate it.

  9. #9
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I think the only way to delete that is by using a LiveCD. I noticed in your other forum threads that the problem went away and then came back..is that correct? Have you done a disk check on the drive? It might be failing.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  10. #10
    Just Joined!
    Join Date
    Sep 2011
    Posts
    5
    Using a Live CD isn't really an option for me, I'm actually SSH'ing into the server remotely. Also, my server is actually a modified Pogoplug, so the capabilities are really limited on it (no DVD drive, and the whole OS is actually running from a flash drive).

    The problem actually hasn't gone away at all, it just came and stayed Also, the disk drive is fine, had it unplugged and checked in a Windows machine.

    If you know of another way I could delete the mtab or fix the issue, I would really appreciate it. Worst case scenario, I could always just do a clean install of Arch next time I'm physically at the server.
    Last edited by knewhouse; 09-14-2011 at 02:55 AM. Reason: typo.

Page 1 of 2 1 2 LastLast

Posting Permissions

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