Filesystem Issues

7 réponses [Dernière contribution]
Time4Tea
Hors ligne
A rejoint: 07/16/2017

I seem to be having some problems with my root filesystem, and I'm wondering if someone could give me some advice?

I have my root filesystem on a separate partition to my home filesystem on my laptop. Over the past few days, I seem to keep running into an issue where certain things I'm trying to do are not working, because I'm told the root filesystem is mounted 'read only'. I've run e2fsck on it from a root system on a different partition and it is finding errors in the filesystem (ext4). When, I fix those errors, everything seems to work properly again for a while; however, after an hour or two, similar errors seem to reappear.

I'm thinking this probably indicates that the root filesystem is messed up, so I should probably back up the data and re-format the partition. Does that sound right? The same issue doesn't seem to be affecting the home partition, so it doesn't appear to be a problem with the HDD.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

I would anyway use "SMART Data & Self-Tests..." in the "gear" menu of "Disks" (in the "System Settings") to check the health of the hardware.

ao
ao
Hors ligne
A rejoint: 07/20/2017

Thank you! Used your input. SMART Data & Self-Tests does not work on external harddisk here.

Time4Tea
Hors ligne
A rejoint: 07/16/2017

Ok, thanks for your advice, Magic Banana. I will give that a try, although I am using LXDE, so I'm not sure if that same option will be in there. It's a second-hand laptop that is a few years old, so it is quite possible that the HDD is old and may be defective.

So, if the hard disk checks out ok, would you agree with the following plan?:

- Back up the contents of the root partition
- Re-format the partition to renew the filesystem
- Re-instate the system from the backup and see if that solves it

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

Looks like a good plan.

See https://help.ubuntu.com/community/Smartmontools if you do not want to install the "gnome-disk-utility" package (although I do not think it would trigger the installation of many dependencies, LXDE using GTK 3).

Time4Tea
Hors ligne
A rejoint: 07/16/2017

Ok thanks. One other question though: if I back up the root partition into a tar archive, will that preserve the file/folder ownerships and permissions?

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

'man tar' says:
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
(...)
--same-owner
try extracting files with the same ownership as exists in the archive (default for superuser)

Using 'sudo tar', you should therefore be fine.

Time4Tea
Hors ligne
A rejoint: 07/16/2017

Using smartmontools to read the 'SMART status' of the HDD, it seemed to be fine. I also ran a short self test on it and that checkout out fine. So, I copied the root filesystem to a different partition and it now seems to be running much better. I guess it just needed re-formating ..