Results 1 to 5 of 5

Thread: Mounting an External XFS Drive

  1. #1
    Join Date
    Oct 2012
    Beans
    3

    Mounting an External XFS Drive

    Hi Guys,

    bit of a n00b here just need a little help trying to identify if I am doing something incorrectly when mounting a USB external drive formatted in XFS.

    I am typing:

    sudo mount -t xfs /dev/sdb1 /media/external

    And I get the following error:

    mount: wrong fs type, bad option, bad superblock on dev/sdb1, missing code page or helper program or other error In some cases useful info is found in syslog

    I have this external HDD which is written in XFS and connected to a External Network hard drive which allows me to view and use in windows. Last night it just stopped showing the content. I can still see it in the Network HDD GUI and in windows device management and in ubuntu but the only options they are all giving me (expect ubuntu because I havent worked out how to access it yet) is to format it. I do not want to do this as I have almost 2TB of info I want to keep!

    Any help would be great and much appreciated.

  2. #2
    Join Date
    Jul 2012
    Location
    ATL
    Beans
    178
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Exclamation Re: Mounting an External XFS Drive

    Is Windows failing to recognize it also? I would suspect a filesystem error if so. If that's the case you will need a data recovery program to try to salvage your files.

  3. #3
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    813
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Mounting an External XFS Drive

    You should attempt to repair it.
    Install xfs utilities
    Code:
    sudo apt-get install xfsprogs
    Then run a filesystem repair
    Code:
    sudo xfs_repair -v /dev/sdb1
    See man xfs_repair for more options
    Something to take into consideration:
    Disk Errors
    xfs_repair aborts on most disk I/O errors. Therefore, if you are trying to repair a filesystem that was damaged due to a disk drive failure, steps should be taken to ensure that all blocks in the filesystem are readable and writeable before attempting to use xfs_repair to repair the filesystem. A possible method is using dd(8) to copy the data onto a good disk.
    Good luck!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  4. #4
    Join Date
    Oct 2012
    Beans
    3

    Re: Mounting an External XFS Drive

    Ok the repair seemed to work.

    I can now see the USB drive after I mounted it. Only now it is asking me to clean it. Will this remove the data? And if Not how do I do this?

  5. #5
    Join Date
    Oct 2012
    Beans
    3

    Re: Mounting an External XFS Drive

    All good I deleted the log data from the drive and ran the repair again and boom she works... Thank you so much for your help!

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
  •