Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
Forum » Forum / Modifying the MyBook World » Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
started by: kylewhitlowkylewhitlow
on: 1206924441|%e %b %Y, %H:%M %Z|agohover
number of posts: 20
rss icon RSS: new posts
summary:
When trying to delete certain files, even as super user connecting via ssh, I get "Read-only file system" error when trying to delete files.
Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
kylewhitlowkylewhitlow 1206924441|%e %b %Y, %H:%M %Z|agohover

PREFACE: I am a very novice UNIX/LINUX guy, so be easy on me. I definitely know all the commands and such, but don't use it as my main operating system anymore!

When trying to delete certain files within PUBLIC share, even as SUPER USER/root connecting via ssh, I get "Read-only file system" error when trying to delete files.

I've already done:
chown -R www-data:www-data PUBLIC
chmod -R 770 PUBLIC

If check the mounts, I notice /dev/md4 on /shares/internal/ is "ro" - that is the culprit. But can't figure out how to change it.

Dump of mount -o -p =

[root@MyBookWorld etc]# mount-o -p
/dev/root on / type ext3 (rw,noatime,data=ordered)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
sys on /sys type sysfs (rw)
/dev/md3 on /var type ext3 (rw,noatime,data=ordered)
/dev/md4 on /shares/internal type ext3 (ro,noatime,data=ordered)
usbfs on /proc/bus/usb type usbfs (rw)

The /etc/fstab file looks like has "defaults" set for md4 mount. I tried experimenting with changing "defaults" to "rw" , but mounted as "ro" anyway. (dump below). What can I do to mount /dev/md4 to "rw"?!?!

[root@MyBookWorld etc]# more fstab

  1. /etc/fstab: static file system information.

#

  1. <file system> <mount pt> <type> <options> <dump> <pass>

/dev/root / ext3 rw,noauto,noatime 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
sys /sys sysfs defaults 0 0
/dev/md2 none swap defaults 0 0
/dev/md3 /var ext3 defaults,noatime 0 2
/dev/md4 /shares/internal ext3 defaults,noatime 0 2

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
kylewhitlowkylewhitlow 1206928275|%e %b %Y, %H:%M %Z|agohover

I googled and found posts suggesting to check var/logs/messages — that there is probably a corruption error in the file system and the system is entering Read Only mode to protect itself against further corruption. I do see some errors, but I don't know enough to know what to make of it. Is my drive basically toast? It's only 5 months old, so I should probably just call WD, but I was trying to avoid it as I know how (un)helpful they are.

Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_reserve_inode_write: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_truncate: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_reserve_inode_write: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_orphan_del: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_reserve_inode_write: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.warn kernel: __journal_remove_journal_head: freeing b_committed_data
Mar 30 17:25:57 MyBookWorld user.crit kernel: EXT3-fs error (device md4) in ext3_delete_inode: Journal has aborted
Mar 30 17:25:57 MyBookWorld user.crit kernel: ext3_abort called.
Mar 30 17:25:57 MyBookWorld user.crit kernel:
Mar 30 17:25:57 MyBookWorld user.crit kernel: Remounting filesystem read-only
Mar 30 17:28:59 MyBookWorld user.crit kernel: ext3_abort called.
Mar 30 17:28:59 MyBookWorld user.crit kernel: EXT3-fs error (device md4): ext3_remount: Abort forced by user
Mar 30 17:28:59 MyBookWorld user.crit kernel: ext3_abort called.
Mar 30 17:28:59 MyBookWorld user.crit kernel: EXT3-fs error (device md4): ext3_remount: Abort forced by user
Mar 30 18:07:01 MyBookWorld cron.notice crond[791]: USER root pid 2009 cmd date +%m%d%H%M%Y.%S > /var/lib/now
Mar 30 18:46:22 MyBookWorld user.crit kernel: ext3_abort called.
Mar 30 18:46:22 MyBookWorld user.crit kernel: EXT3-fs error (device md4): ext3_remount: Abort forced by user
Mar 30 18:46:22 MyBookWorld user.crit kernel: ext3_abort called.
Mar 30 18:46:22 MyBookWorld user.crit kernel: EXT3-fs error (device md4): ext3_remount: Abort forced by user

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
blightblight 1207658451|%e %b %Y, %H:%M %Z|agohover

I just got a new MyBook. Suddenly stopped being able to write to the drive. First thought it was samba, but looked around and have exactly the same as you.

Its after about 30 mins of writing small amounts of data. It doesnt seem to like it.

Trying to figure out how to umount the /share/internal but everytime it comes up with drive in use. I even tried forcing the issue.

You need to run fsck with the partition unmounted. thats the only way to safely check it.

Going to try and see if i can solve it.

blight

last edited on 1207659830|%e %b %Y, %H:%M %Z|agohover by blight + show more
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
blightblight 1207659471|%e %b %Y, %H:%M %Z|agohover

argggg… not enough memory to run fsck. i dont wanna connect it up2 another pc, i just bought the damn thing…. suppose the other option is dump the partition and start again…. here is the error…

[root@MyBookWorld ~]# e2fsck /dev/md4
e2fsck 1.38 (30-Jun-2005)
/dev/md4: recovering journal
/dev/md4 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error allocating block bitmap (4): Memory allocation failed
e2fsck: aborted

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
blightblight 1207671220|%e %b %Y, %H:%M %Z|agohover

ok think its fixed.. ended up formating the partition.

Testing and seems to be working all good now. Surprised that WD didn't check that fsck doesnt work. Actually surprised that it only has 32 mb of ram onboard…

blight

last edited on 1207672565|%e %b %Y, %H:%M %Z|agohover by blight + show more
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
sidzsidz 1208091501|%e %b %Y, %H:%M %Z|agohover

I had the same problem, on the 500GB version. So i did what blight did, and that was reformated the partition. everything seems to be working now.

Linux command via ssh was (need to unmount devices first):
mkfs.ext3 /dev/md4

sidz:)

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
Gabriel74Gabriel74 1208097312|%e %b %Y, %H:%M %Z|agohover

how can I format the drive if I am Windowsx XP user? The MBWE web configuration didn't show me format drive menu… :-( Please help

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
jbunjbun 1208113593|%e %b %Y, %H:%M %Z|agohover

I recently purchased a Mybook WE I 1TB and have had similar problems uploading my data. I used xcopy at first and now 'Allway Sync' to copy my itunes lib etc onto the mybook but continually get 'access denied' messages after about 5mins! The only thing that seems to fix this is a reboot of the mybook at which point i can pickup where i left off copying. This is very painful…

Thinking this was some sort of firmware bug i today upgraded to the 2.00.18 update but the problem continued to occur. I have noticed that if I turn of the MioNet (using the web GUI) the copy process seems to keep copying for longer (about 10mins)!

Later today I found this wiki which is giving me some new hope…
I have a hunch thay my drive also needs a reformat but am unsure how to proceed. I tried the shh script but the process firmware upgrade failed :( What would be really helpful would be a step-by-step guide to formating the device from a windows PC but i appreciate that thats a considerable effort for someone to write but if someone could that would be great.

To be honest i'm shocked that WD can get away with selling a device that seems to require so much effort to make it perform its principle purpose i.e. to copy files onto!

Thanks for any help/advice given,

jbun

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
peterkpeterk 1208132450|%e %b %Y, %H:%M %Z|agohover

Exactly the same issue here. MWBWE would decide to switch over to read only access after only a few minutes of a large backup operation. Rebooting the device would then allow it to continue functioning in read write mode for a while, before it reverted to read only again.

After a bit of reading on this forum I dug out my old linux laptop and managed to ssh into the device and prevent mionet from starting etc. Uninstalled Mionet from my PC and tried again, but problem still persisted. So problem can't be with Mionet. A bit more reading and I came across this thread. Figured there is nothing to lose having got this far so went for a reformat on the partition.

Before reformatting I had a problem unmounting the partition. Solution was to reboot the MWBWE, then ssh and run

umount /dev/md4

Then I was able to run

mkfs.ext3 /dev/md4

like sidz did. The reformat appears to have helped and I was able to run my backup job last night and I still have read write access to the MWBWE.

Only issue now is that I only have 866 out of 912 GB available. A quick calculation shows that 5% has been lost which matches the amount reserved for super-user by default. Man description (from [http://linux.die.net/man/8/mkfs.ext3]) is as follows:

-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user. This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.

I'm no expert here, but it wouldn't surprise me to learn that a lower percentage, or even 0%, would be a valid option to use. Does anyone have some insight into this?

@jbun - as far as I can tell the firmware upgrade isn't actually upgrading anything, but is tricking the MWBWE into resetting the root password and launching a sshd daemon. The "upgrade" failed according to the web access interface when I tried it, but I was able to ssh into the device nonetheless. I had to try the "upgrade" twice though… didn't seem to do anything the first time around. The second trick you'll need to know is that when you can't log in using the user you created under the web access interface, try again, but this time use ALL CAPS :-)

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
peterkpeterk 1208133857|%e %b %Y, %H:%M %Z|agohover

Managed to recover the reserved 5% without needing to reformat. A bit more reading reveals the wonderful command tune2fs which allows parameters on the filesystem to be adjusted. Command to set the reserved space for super-user to zero is

tune2fs -m 0 /dev/md4

Voila. Everything seems to be working now. Of course I have no idea whether there is some long term problem with the drive that reformatting has quickly helped to patch up temporarily, but time will tell.

For those wanting to reformat without having to then undo the reserved super-user space, when you first do your reformat simply run

mkfs.ext3 -m 0 /dev/md4

Good luck.

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
alephsmithalephsmith 1208133964|%e %b %Y, %H:%M %Z|agohover

-m reserved-blocks-percentage

From my reading this would only come into play if the disk is near full. Also I have disabled syslog to reduce disk access. Also I don't see too many times when root would need to write to this partition, only www-data should be writting to it on a regular basis.

I think it would be safe to reduce this percentage.

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
fresh927fresh927 1208516110|%e %b %Y, %H:%M %Z|agohover

Thanks for the help, been having permission issues with a 500gb my book since i got it. After eventually figuring out how to use ssh (having no linux skills at all) i reformatted the partition. All seems good now, tranferred over 50gb and still have write permissions, without having to reboot the MBW.
I think these steps should be added to the trouble shooting section, as it seems bit of a common problem.
Thanks

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
firedog121firedog121 1208523515|%e %b %Y, %H:%M %Z|agohover

I have reformatted my drive as per above, now I can't access any shares, if I create a new share through the web end I am unable to access it. Was I meant to remount the the drive after formatting?

Thanks

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
dapozodapozo 1216548802|%e %b %Y, %H:%M %Z|agohover

Peterk's reformat solution worked. I was ready to throw the drive in the trash (or sell it to someone else). The access denied / read only mode problem is no more. Thanks!

last edited on 1216548938|%e %b %Y, %H:%M %Z|agohover by dapozo + show more
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
7db7db 1217528787|%e %b %Y, %H:%M %Z|agohover

Thanks - peterk.

I was having this problem with my MBWE. md3 and md4 went ro after a big file transfer and went back to rw after a reboot but I was nervous enough to want to do more before I committed more data to the disk.

Worth noting that you can run fsck on /dev/md3 without getting memory issues.
But you still have to format /dev/md4

Bags of errors on there - and mine was straight out of the box three days ago. Off home now to do the other new one. Why do they let them out of the factory like this?!

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
7db7db 1217850666|%e %b %Y, %H:%M %Z|agohover

Oh dear.

So after a weekend /dev/md3 went ro again. A quick fsck showed no errors, so I backed it up, reformatted it, remounted and replaced files.

After a reboot I can't now access the MBWE over SSH. I can see the manager in a browser, and the shares appear on the network.

The firmware update hack fails. Any ideas?

Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
7db7db 1217855777|%e %b %Y, %H:%M %Z|agohover

Found the issue. Was able to telnet in and tried to start ssh

/usr/sbin/sshd -d

Got error that /var/empty needs to be owned by root and not world writable.
Checked file permissions in /var

ls -l

And see that all files are 777 after backing them up to /dev/md3 after the format

chmod 700 empty

and restarted ssh. Now I can ssh in.

So question — are any of the other files in /var supposed to be something other than 777?

last edited on 1217855896|%e %b %Y, %H:%M %Z|agohover by 7db + show more
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
nielshanielsha 1217857029|%e %b %Y, %H:%M %Z|agohover

I also have this problem. Before formatting /dev/md4 I have a few questions.

1. What is /dev/md4? Is it where my PUBLIC files are stored?

2. Is this a long-term solution or does it start giving the 'read only mode'-errors again?

last edited on 1217857222|%e %b %Y, %H:%M %Z|agohover by nielsha + show more
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
alephsmithalephsmith 1217887953|%e %b %Y, %H:%M %Z|agohover
  1. It is the partition in which the PUBLIC folder is located. ie the 4th partition on the 'md' device. In some systems this may have a different name like /dev/sda4.
  1. I think people have reported that it does reoccur, but others have had no problem.
Re: Cannot delete files -- read-only!? /dev/md4 on Mybook WE I, 1TB
nielshanielsha 1218037423|%e %b %Y, %H:%M %Z|agohover

It works perfectly! I'll let you know, if it falls back.

new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License