Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
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
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
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
e2fsck /mnt/HD_a2
should do. Do not use the drive while checking it.
SD
Offline
NO!
You should either remount it read-only or unmount it!
Anything else could corrupt your filesystems.
Offline
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
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
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
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
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
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