Discussion:
[rsnapshot-discuss] 1) rsnapshot not backing to a local external drive with Error: cannot remove X Read-only file system. 2) How to mount disk for rsnapshot either manually or automatically (possibly not via nautilus)?
Annis Monadjem
2017-05-29 11:15:49 UTC
Permalink
I really like rsnapshot and I've been using it for more than a year for data backup without any problem. I'm not aware of changing any major setup and anything related to the backups and rsnapshot. Today, for first time, am not able to rsnapshot to local (not remote) external drive.

I've check the "health" of the disk with gparted but it says that it is good ('OK'). I checked /var/log/syslog and the only problem that has been repeatedly appearing is "Error: rm: cannot remove 'XX': Read-only file system". 
On terminal, i open external drive and randomly selected a single folder and a file with intention to delete, but despite being a superuser, I get the same error message as above. I never had this before - obviously something is happening with my drive, but what? bec. gparted says it is OK.

So, next I decided to reformat the drive hoping to resolve the above problem (I've another recent backup drive) and next try again rsnapshot. But the problem has not gone away and it is still there.

I really need to fix this and to do a full backup, so please assist to your best. I'm Linux fan, but a novice, constantly learning something new, so please explain patiently and in detail.

Specs:Kernel:    Linux 4.4.0-78-generic (x86_64)
Default C Compiler:    GNU C Compiler version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
Processor:    2x Intel(R) Pentium(R) CPU G4400 @ 3.30GHz
Memory:    3928MB (2170MB used)
Distribution:    Peppermint 7 Seven
Desktop Environment:    XFCE 4

fstab (selectively for the external drive only):
UUID=531db36c-884f-4a9a-88da-acc008916723    /media/sky/DataBackup1T    ext4    rw,user,noexec,noauto,nofail    0    0
After reformatting external drive UUID had changed and I have picked up the new UUID from `sudo blkid` and set it in fstab as above. Other than that the flags are as before the problem started.

To mount external drive I have been mounting it always from within `nautilus` after running it. I'd rather prefer to mount it on terminal either automatically or manually. Please also explain how that should be done (perhaps in fstab?).

Now, again why I'm getting this nasty "cannot remove 'XX': Read-only file system" ? And how can I fix it?
Benedikt Heine
2017-05-29 11:41:16 UTC
Permalink
Hi,
Post by Annis Monadjem
Now, again why I'm getting this nasty "cannot remove 'XX': Read-only
file system" ? And how can I fix it?
Albeit you do not mount your filesystems with errors=remount-ro in your
fstab, search your dmesg for suspicious entries about your sdX device or
some ext4 fails for your filesystems.

In my case, I got this error-message solely of faulty drives. So check
your physical harddrive for any damage via smart. gparted will only spit
out, if your partition table is correct.

smartctl -t short /dev/sdX

Wait the amount of time for given by smartctl. After the test completed, run

smartctl --all /dev/sdX

The values Raw_Read_Error_Rate and Reallocated_Sector_Ct should be on 0
to mark a proper drive.

~ Bene
David Cantrell
2017-05-30 15:56:17 UTC
Permalink
I've check the "health" of the disk with gparted but it says that it is good ('OK'). I checked /var/log/syslog and the only problem that has been repeatedly appearing is "Error: rm: cannot remove 'XX': Read-only file system". 
'mount' should tell you whether the filesystem really is mounted
read-only or not. Normally the OS will change a filesystem from being
mounted read/write (the normal state) to read-only if there is some kind
of hardware error.
So, next I decided to reformat the drive hoping to resolve the above problem (I've another recent backup drive) and next try again rsnapshot. But the problem has not gone away and it is still there.
You should assume that the disk is broken. Buy a replacement.
To mount external drive I have been mounting it always from within `nautilus` after running it. I'd rather prefer to mount it on terminal either automatically or manually. Please also explain how that should be done (perhaps in fstab?).
Now, again why I'm getting this nasty "cannot remove 'XX': Read-only file system" ? And how can I fix it?
To remount the filesystem read-write you should:

# fsck /dev/whatever
# mount -o remount,rw /dev/whatever /mount/point

But DON'T DO THAT BLINDLY WITHOUT UNDERSTANDING. The OS made the
filesystem read-only for a reason. If you can find that reason in the
logs, and understand it, and fix it, that's great. Otherwise you should
not trust that disk again.
--
David Cantrell | top google result for "internet beard fetish club"

Disappointment:
n: No results found for "priapic dwarf custard wrestling".
Nico Kadel-Garcia
2017-05-31 04:07:01 UTC
Permalink
Post by David Cantrell
Post by Annis Monadjem
I've check the "health" of the disk with gparted but it says that it is good ('OK'). I checked /var/log/syslog and the only problem that has been repeatedly appearing is "Error: rm: cannot remove 'XX': Read-only file system".
'mount' should tell you whether the filesystem really is mounted
read-only or not. Normally the OS will change a filesystem from being
mounted read/write (the normal state) to read-only if there is some kind
of hardware error.
Post by Annis Monadjem
So, next I decided to reformat the drive hoping to resolve the above problem (I've another recent backup drive) and next try again rsnapshot. But the problem has not gone away and it is still there.
You should assume that the disk is broken. Buy a replacement.
Post by Annis Monadjem
To mount external drive I have been mounting it always from within `nautilus` after running it. I'd rather prefer to mount it on terminal either automatically or manually. Please also explain how that should be done (perhaps in fstab?).
Now, again why I'm getting this nasty "cannot remove 'XX': Read-only file system" ? And how can I fix it?
# fsck /dev/whatever
# mount -o remount,rw /dev/whatever /mount/point
Unmount it *first* before doing fsck.
Post by David Cantrell
But DON'T DO THAT BLINDLY WITHOUT UNDERSTANDING. The OS made the
filesystem read-only for a reason. If you can find that reason in the
logs, and understand it, and fix it, that's great. Otherwise you should
not trust that disk again.
--
David Cantrell | top google result for "internet beard fetish club"
n: No results found for "priapic dwarf custard wrestling".
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Loading...