0

I have 2 HDDs:

  • 80 GB dedicated for Ubuntu 20.04
  • 1 TB for storage

The 1 TB HDD keeps changing permission to read only though I have changed it several times using this command:

sudo chown $USER:$USER /mnt/stuff

I am tired of changing it again and again. Why is this happening and what is the permanent solution for this issue?

Zanna
  • 70,465
  • 1
    If a file-system was mounted as RW (read-write) and flips to RO (read-only), it's usually a sign of errors/problems being detected on the file-system and the flipping to RO is to prevent data-loss. The messages found in logs will confirm reason for flip. I'd suggest checking drive health (if the drive is good, it's PSU or power-supply is next thing to check). https://help.ubuntu.com/community/Smartmontools – guiverc Aug 14 '21 at 09:35
  • @guiverc where can I find these logs to check the reason? – Milind Khobragade Aug 14 '21 at 09:43
  • If it's the current session (ie. since boot), I'd look via dmesg. Messages may also appear in systemd journals (journalctl) which allows you to look beyond the current session (ie. prior boots) – guiverc Aug 14 '21 at 09:45
  • dmesg command shows lot of things. I don't know which information to look at. blk_update_request: I/O error, dev sdb, sector 522806727 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Is above line means anything ralated to my issue? – Milind Khobragade Aug 14 '21 at 09:50
  • I/O error means the drive maybe failing; so check it's health using the drive's inbuilt SMART (self-monitoring advanced ...) as per the link with the prior command (you didn't say if you're using desktop or server, but if using a desktop you can use GUI tools too to check the health). You should not use the drive until you've concluded it's safe to use, as each use maybe bringing it closer to dead & SMART reads from chips so won't impair any life left; leaving more life to recover data from the drive. – guiverc Aug 14 '21 at 09:54
  • EXT4-fs warning (device sdb1): ext4_clear_journal_err:5658: Filesystem error recorded from previous mount: IO failure EXT4-fs warning (device sdb1): ext4_clear_journal_err:5660: Marking fs in need of filesystem check. EXT4-fs (sdb1): warning: mounting fs with errors, running e2fsck is recommended

    what to do?

    – Milind Khobragade Aug 14 '21 at 09:55
  • If it's logical errors and not hardware; you can fsck (file-system check) your drive and any logical errors will be fixed & you won't see issues again. Repeated issues usually mean it's hardware though (be it the drive failing, or bad power (good devices behave badly if they don't have good power) etc... Don't bother with fsck until you know drive is healthy though (the more you use the drive; the greater data loss you risk) – guiverc Aug 14 '21 at 09:57

0 Answers0