XFS-formatted external SSD keeps unmounting itself - how to fix?
by penyuan from LinuxQuestions.org on (#6NV17)
Hello,
I have a fully-updated Rocky Linux 9.4 system where I use fstab to automatically mount an external USB SSD on boot. I only log into this headless system remotely. This USB drive has one XFS partition with this fstab entry:
Code:UUID=[UUID] [mount path] xfs defaults,nofail 0 2This has worked very well for the first half of 2024.
However, over the past month, I would log in and see that this volume is unmounted. I tried running `sudo mount -a` but would get this error:
Code:mount: [path to mount point]: wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.(Note that this error refers to "/dev/sde1", but when the drive was originally mounted, it's always "/dev/sda1".)
I have no idea what this means, but if I run `sudo reboot` to reboot the system, the external drive is mounted again and I can read/write it with no problems!
I also tried running `xfs_repair` on it but it didn't help.
The problem is that the drive keeps unmounting itself in less than a day, `sudo mount -a` still doesn't work, and I'd have to reboot the whole system in order to get it mounted.
How can I troubleshoot and fix this problem???
Thank you in advance.
P.S. This is the `xfs_repair` output:
Code:sudo xfs_repair /dev/sda1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- agno = 4
- agno = 5
- agno = 6
- agno = 7
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 1
- agno = 0
- agno = 4
- agno = 2
- agno = 3
- agno = 5
- agno = 6
- agno = 7
Phase 5 - rebuild AG headers and trees...
- reset superblock...
Phase 6 - check inode connectivity...
- resetting contents of realtime bitmap and summary inodes
- traversing filesystem ...
- traversal finished ...
- moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
I have a fully-updated Rocky Linux 9.4 system where I use fstab to automatically mount an external USB SSD on boot. I only log into this headless system remotely. This USB drive has one XFS partition with this fstab entry:
Code:UUID=[UUID] [mount path] xfs defaults,nofail 0 2This has worked very well for the first half of 2024.
However, over the past month, I would log in and see that this volume is unmounted. I tried running `sudo mount -a` but would get this error:
Code:mount: [path to mount point]: wrong fs type, bad option, bad superblock on /dev/sde1, missing codepage or helper program, or other error.(Note that this error refers to "/dev/sde1", but when the drive was originally mounted, it's always "/dev/sda1".)
I have no idea what this means, but if I run `sudo reboot` to reboot the system, the external drive is mounted again and I can read/write it with no problems!
I also tried running `xfs_repair` on it but it didn't help.
The problem is that the drive keeps unmounting itself in less than a day, `sudo mount -a` still doesn't work, and I'd have to reboot the whole system in order to get it mounted.
How can I troubleshoot and fix this problem???
Thank you in advance.
P.S. This is the `xfs_repair` output:
Code:sudo xfs_repair /dev/sda1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- agno = 4
- agno = 5
- agno = 6
- agno = 7
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 1
- agno = 0
- agno = 4
- agno = 2
- agno = 3
- agno = 5
- agno = 6
- agno = 7
Phase 5 - rebuild AG headers and trees...
- reset superblock...
Phase 6 - check inode connectivity...
- resetting contents of realtime bitmap and summary inodes
- traversing filesystem ...
- traversal finished ...
- moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done