DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-02-19 00:26:01

mklx01
Member
Registered: 2007-01-24
Posts: 23

HD_a2 is mounted as read-only filesystem?

I'm having a problem with the /mnt/HD_a2 volume, which is getting mounted as a read-only filesystem on startup. I can telnet into the system and touch files in the root directory, but the disk where all my data resides cannot be written to, only read. Is there a way to make the filesystem writable again?

Here is a copy of the fun_plug that I'm using:

dmesg > /mnt/HD_a2/dmesg.out
/mnt/HD_a2/nc -l -p 10000 -e /bin/sh &

mkdir /mnt/HD_a2/lnx_bin/
cd /mnt/HD_a2/lnx_bin/

/mnt/HD_a2/starttelnet.sh

export PATH=$PATH:/mnt/HD_a2/lnx_bin/


Note that the first command in the script is supposed to create a dmesg.out file which doesn't get generated in my case, so I'm thinking the filesystem is already read-only before the fun_plug script is called. The utelnet daemon is running, however, so I'm able to log in.

So if anyone has any suggestions as to what could cause this problem and how to fix it, I'd appreciated it! Thanks!

Offline

 

#2 2007-02-19 12:27:45

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: HD_a2 is mounted as read-only filesystem?

Single disk? RAID?

You can copy the fun_plug files to the /bin directory and run telnet from there, it has to be done at startup.
Then you will be able to unmount the volume and run e2fsck on it and mount it back as rw.

Try e2fsck anyway to see what it comes back with.

Offline

 

#3 2007-02-19 19:43:55

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: HD_a2 is mounted as read-only filesystem?

I have a single disk setup with the disk in the right drive bay. I have telnet access already, so that is not the problem.  What are the options for running e2fsck?

Offline

 

#4 2007-02-19 21:23:48

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: HD_a2 is mounted as read-only filesystem?

e2fsck /mnt/HD_a2

should do. Do not use the drive while checking it.

SD

Offline

 

#5 2007-02-20 03:46:21

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: HD_a2 is mounted as read-only filesystem?

NO!

You should either remount it read-only or unmount it!

Anything else could corrupt your filesystems.

Offline

 

#6 2007-02-20 05:14:25

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: HD_a2 is mounted as read-only filesystem?

So what's the best way to do this?  When I run e2fsck in check-only mode, I get this error:


# # e2fsck -n /dev/sda2

e2fsck 1.32 (09-Nov-2002)
/dev/sda2 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error reading block 40108034 (Attempt to read block from filesystem resulted in short read) while doing inode scan.  e2fsck: aborted
Segmentation fault

Offline

 

#7 2007-02-20 12:37:17

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: HD_a2 is mounted as read-only filesystem?

frodo wrote:

NO!

You should either remount it read-only or unmount it!

Anything else could corrupt your filesystems.

He just said that the file system is read only.... and  even the topic is called the same.


------------------------------

e2fsck results indicate either a massive corruption of the FS or a general problem with your HDD- I would test the disk in a PC running linux (knoppix booted from CD is fine). I would also force a full physical smart scan of the hard drive (man smartctl) and then check the FS.

Offline

 

#8 2007-02-20 16:11:20

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: HD_a2 is mounted as read-only filesystem?

True :-)

Forgot that. Anyway with that error message from fsck I would start trying to recover what files I have on that disk before doing any more fsck. It does not look good.

Offline

 

#9 2007-02-20 18:26:18

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: HD_a2 is mounted as read-only filesystem?

Thanks for all the suggestions. I had no choice but run e2fsck. Otherwise I would have had to reset the box to factory settings every time I turned it on to get write access. Anyway, e2fsck "repaired" the disk by moving most of my data to the lost+found folder. Only after a reboot, I realized that the lost+found folder is located at "/" which gets overwritten after each boot, so my data was gone...  and I ended up reformatting the whole drive.

Would a RAID 1 setup have prevented any data loss on this case?  I'm now getting a second hard drive and plan to configure it in standard mode. I'm thinking to use the built-in software to run backups on a regular basis between the first and second drive. Since I still had read-access, I could have saved any data onto the second drive before repairing/formatting the first one.

Offline

 

#10 2007-02-20 20:29:36

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: HD_a2 is mounted as read-only filesystem?

If you got a corrupted filesystem unfortunatly RAID 1 would have not done any good.
However if you had a bad sector on one disk RAID1 should have survived it.

Sad to hear that you lost your data. However lost+found should be located in the top dir on all mounts. I.e you should have been able to find a /mnt/HD_a2/lost+found

Offline

 

#11 2007-02-20 22:37:43

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: HD_a2 is mounted as read-only filesystem?

That's what I had expected. Alas, it wasn't there...  Hopefully, I'll be able to format my new, second disk in standard mode independent of the first one. Unfortunately, the D-Link manual doesn't talk about this case. I'll report back on my progress, unless someone else can confirm that this will work.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB