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

#26 2008-07-27 16:27:31

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

Fonz...... If I go back to using the default syslogd.sh (thereby logging to /var/log/messages) won't this cause the disks to spin up? Won't it write to disk and not RAM?

/var/log is in RAM.

Offline

 

#27 2008-07-27 17:12:46

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

fonz wrote:

flashman1207 wrote:

Fonz...... If I go back to using the default syslogd.sh (thereby logging to /var/log/messages) won't this cause the disks to spin up? Won't it write to disk and not RAM?

/var/log is in RAM.

Thanks fonz...... think something is broken now though. Am getting lots of the following:

Code:

EXT2-fs warning: maximal mount count reached, running e2fsck is recommended

Saw loads of posts on this but its all a bit too technical for me (being a newbie and all). I do have Raid-1, part of the 2 disks are RAID-1 and rest of the disk is JBOD. I say this because I read in your doco for fsck that you need to 'set it up for RAID'. Do I just need to:

Code:

If you are using RAID, set it up before checking the filesystem:

  mdadm -A /dev/md0 /dev/sd[ab]2
  e2fsck /dev/md0

e2fsck may take some time, and ask for lost+found:

  /lost+found not found.  Create<y>?

Just press Enter. Answering 'n' is ok as well, but e2fsck will tell
you that your 'Filesystem still has errors' at the end.

what if there are still errors at the end?

Thanks Tony

Offline

 

#28 2008-07-27 17:29:20

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

Code:

EXT2-fs warning: maximal mount count reached, running e2fsck is recommended

If this message is about the RAM-disk, that's up to Dlink to fix. A fsck run should fix it for the other disks. After fsck, there should be no errors remaining (that's why you run it, right?). If fsck detects problems, it'll ask you whether it should fix them. Obviously, you should say 'y'.

Offline

 

#29 2008-07-27 18:18:30

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

fonz wrote:

flashman1207 wrote:

Code:

EXT2-fs warning: maximal mount count reached, running e2fsck is recommended

If this message is about the RAM-disk, that's up to Dlink to fix. A fsck run should fix it for the other disks. After fsck, there should be no errors remaining (that's why you run it, right?). If fsck detects problems, it'll ask you whether it should fix them. Obviously, you should say 'y'.

I tried the "mdadm -A /dev/md0 /dev/sd[ab]2" command but it said "/dev/md0 already active - cannot assemble it".

Also, please see attached messages file....

Forgot to add that I'm NOT running funplug from USB. Does tis make any difference?

Last edited by flashman1207 (2008-07-27 18:34:42)


Attachments:
Attachment Icon messages.txt, Size: 17,015 bytes, Downloads: 366

Offline

 

#30 2008-07-27 19:00:36

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

I tried the "mdadm -A /dev/md0 /dev/sd[ab]2" command but it said "/dev/md0 already active - cannot assemble it".

What are you doing? Are you trying to run the commands from my fsck page without booting the ramdisk? If you don't know what you're doing, stop now, power off and reboot. You might delete all your data.

Offline

 

#31 2008-07-27 19:11:02

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

fonz wrote:

flashman1207 wrote:

I tried the "mdadm -A /dev/md0 /dev/sd[ab]2" command but it said "/dev/md0 already active - cannot assemble it".

What are you doing? Are you trying to run the commands from my fsck page without booting the ramdisk? If you don't know what you're doing, stop now, power off and reboot. You might delete all your data.

Have rebooted, all seems OK (apart from the e2fsck messages). As for knowing what I'm doing, I'm a linux newbie. Was just trying to get logging working to see what was spinning my disks up and now have the e2fsck messages happening. Realise that I need to run e2fsck but quite rightly am very worried about doing the wrong thing. So any step by step help would be greatly appreciated....

Thanks
Tony

Offline

 

#32 2008-07-27 19:38:42

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

Thanks for all the replies, I feel I am learning a lot.

silversurfer..... would the format be

Code:

 syslogd_flags="-O /tmp/syslog.txt -l 5"

Will Log level 5 show the disk spin/down info?

Yes, that looks good. According to the info from fonz a log level of 4 should already be enough to see warnings. HD spin up and down messages come at warning level. So a level of 4 to 7 should catch HD messages.


Edith says:

BTW the message "EXT2-fs warning: maximal mount count reached, running e2fsck is recommended" only says that the file system was mounted for a certain number of times without being checked. That doesn't mean that there are errors in the file system and your data is going to be lost.
Usually normal Linux distributions will run a file system check at startup when the maximal mount count has been reached and after that they mount the file system. I didn't check if the NAS does this for any of the file systems it uses. Of course it is advised to check the file system to be sure that everything is ok.

Last edited by silversurfer (2008-07-27 19:46:32)

Offline

 

#33 2008-07-27 23:16:23

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: DNS-323 disk activity all the time (without me doing anything) ?

No, it does not automatically run a file system check when the mount counts or the time limit expire.  If you want to run it, it has to be done manually.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#34 2008-07-28 02:24:51

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

Thanks Silversurfer, will set it to 4....

Now as to this e2fsck thing, I'm all a dither about this. Can I run it without unmounting the disk? Saw somewhere that you needed to run funplug on USB to unmount. Or am I confused with something else. What exactly is the e2fsck command I should be running anyway? Also, I saw in fonz fsck page that running RAID may make a difference, am RAID and JBOD on same box.....

Thanks as always
Tony

Offline

 

#35 2008-07-28 03:19:37

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: DNS-323 disk activity all the time (without me doing anything) ?

e2fsck is a command that checks ext2 file systems.  (e)xt(2) (f)ile (s)ystem (c)hec(k)  No, you cannot run it with the drives mounted.  While they are mounted, they are "in use" and the program cannot properly access the filesystem.  To do this, you need to boot the ramdisk and then run the program on the disks.  If you are using RAID, then you must first assemble the RAID array, then run the program on the array.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#36 2008-07-28 04:06:34

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

bq041 wrote:

e2fsck is a command that checks ext2 file systems.  (e)xt(2) (f)ile (s)ystem (c)hec(k)  No, you cannot run it with the drives mounted.  While they are mounted, they are "in use" and the program cannot properly access the filesystem.  To do this, you need to boot the ramdisk and then run the program on the disks.  If you are using RAID, then you must first assemble the RAID array, then run the program on the array.

b1041,
   Thanks for the replies but things like 'boot the ramdisk' and 'assemble the RAID array' don't mean anything to me (in this context anyway). I understand that obviously I am out of my depth here but have a problem that needs resolving. Is there a step by step guide anywhere to doing this complete with exact commands for us newbies? I'm not completely non-techie (being an old mainframe sysprog)  but have only just started tinkering with Linux... that alone will have a few people chuckling I'm sure.......

Would installing the funplug on USB make my life somewhat easier?

Tony

Offline

 

#37 2008-07-28 05:01:32

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: DNS-323 disk activity all the time (without me doing anything) ?

http://inreto.de/dns323/fsck/

Keep in mind bob is the name of fonz's DNS; substitute it with the name or ip address of yours.

Last edited by bq041 (2008-07-28 05:03:44)


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#38 2008-07-28 05:27:08

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

bq041 wrote:

http://inreto.de/dns323/fsck/

Keep in mind bob is the name of fonz's DNS; substitute it with the name or ip address of yours.

Looking at the instructions am I correct in saying that because I do not have 'bash' (or even know what it is) that the command to reload would be:

Code:

== Booting ==

  telnet bob
  cd /ffp/fsck                          (or /mnt/HD_a2/fsck)
  ./no-bash-reload.sh

Thanks
Tony

Last edited by flashman1207 (2008-07-28 10:19:03)

Offline

 

#39 2008-07-28 15:04:41

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

Would installing the funplug on USB make my life somewhat easier?
Tony

Installing ffp on a USB disk will definitely make your life easier once you've done it right. By "right" I mean running everything from USB disk or at least RAM disk. That way you can unmount the hard disks easily every time you want to without rebooting the system. A few services that access the hard disks have to be stopped before unmounting, on my system it's only the Samba daemon "smbd". To find out which service is accessing the hard disks use "lsof | grep HD"

There are several scripts in this forum to install ffp on USB but I would say that most of them need a few modifications to be ready for your system setup, so this is not a trivial task. It will probably be easier to start your NAS in "file system check mode" as described in http://inreto.de/dns323/fsck/.

Offline

 

#40 2008-07-28 15:52:23

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

silversurfer wrote:

flashman1207 wrote:

Would installing the funplug on USB make my life somewhat easier?
Tony

Installing ffp on a USB disk will definitely make your life easier once you've done it right. By "right" I mean running everything from USB disk or at least RAM disk. That way you can unmount the hard disks easily every time you want to without rebooting the system. A few services that access the hard disks have to be stopped before unmounting, on my system it's only the Samba daemon "smbd". To find out which service is accessing the hard disks use "lsof | grep HD"

There are several scripts in this forum to install ffp on USB but I would say that most of them need a few modifications to be ready for your system setup, so this is not a trivial task. It will probably be easier to start your NAS in "file system check mode" as described in http://inreto.de/dns323/fsck/.

Silversurfer,
   I'm going to look at the 'file system check mode' thing but before I start I don't really want to look at also installing the bash thing so, as per my previous update is ./no-bash-reload.sh the thing to use to reboot? Fonz says:

Code:

For reload.sh, you also need the bash shell. If you cannot install
bash, you can try no-bash-reload.sh instead of reload.sh.

it says 'try no-bash-reload.sh instead of reload.sh'. Anyone tried it?

Just on another note, after all this too-ing and fro-ing had a look at my /var/log/messages file and though it does show the disks spinning up and down (and the times) it doesn't indicate what is causing it. Most of the time it is around every 90 minutes or so (but not always exactly). I've attached the output from the lsof | grep command. Is there anything here that needs attention?

Thanks
Tony


Attachments:
Attachment Icon output, Size: 5,291 bytes, Downloads: 359

Offline

 

#41 2008-07-28 17:33:19

silversurfer
Member
Registered: 2008-07-20
Posts: 95

Re: DNS-323 disk activity all the time (without me doing anything) ?

I didn't try anything of the e2fsck howto so I can't tell if "no-bash-reload.sh" will work.

Your lsof output only shows the usual services running from your hard disk, BitTorrent, funplug, syslog, klog, telnet, a fan control script (probably including the sleep command) and the ftp server log in another partition.

As for your hard disks spinning up and down this is caused by your configuration, you must have told the box to shut down the disks when they are not accessed but they will spin up again when one of your services accesses them. That is one of the reasons why people move ffp to a USB disk.


Edith says:

This is what lsof says on my system:

smbd      1970  root  cwd       DIR        9,0    4096         2 /mnt/HD_a2
smbd      2016  root  cwd       DIR        9,0    4096         2 /mnt/HD_a2


Thanx to fonz and other people here everything runs from USB disk. :-)

Last edited by silversurfer (2008-07-28 17:40:04)

Offline

 

#42 2008-07-28 21:47:39

EnricoM
Member
From: Netherlands
Registered: 2008-06-03
Posts: 77

Re: DNS-323 disk activity all the time (without me doing anything) ?

@flashman
I had the same issue 2 months ago and like to give you some info to think about. Because some people at this forum reported problems like data loss and syncing new drives with their RAID1 array, I decided to change my configuration from RAID 1 with JBOD to 2 seperate disks, so I would not have to bother with this software RAID solution and all the knowledge needed to maintain it. To increase my data redundancy I run a backup program (rsnapshot) on my NAS every night, which will copy my data from volume 1 to volume 2 and keeps a history as well. I had the same problem with the fs check, so I decided to move the fun_plug to usb flash drive. After that I was able to stop certain processes and umount the hard disks and run the checks. For the USB drive, I umount the device as read-only and run the file system check. Make sure that you install cleanboot as well, this will prevent any possible future fs errors in case 1 of the disks can not be properly unmounted because some installed process keeps a file open. The USB drive can also help you to keep the harddisks spun down if you install additional programs in the future.

@silversurfer
I read that you write syslog.txt to usb. My logfile contains more then 1000 entries after a few days (every 10 minutes I receive an entry like: Jul 28 20:10:01 MEDIASERVER cron.notice crond[1576]: USER root pid 23300 cmd /usr/sbin/getdhcp&). I think this big amount of write cycles will wear out the USB flash memory within a few months. That is the reason why I write syslog.txt to ram. BTW, I didn't know there was a default size for the logging

Last edited by EnricoM (2008-07-28 21:57:00)


Hardware: Conceptronic CH3SNAS, FW1.03 - 2x Samsung Spinpoint F1 750 MB, no RAID  - Imation Whizz 4GB USB Flash Drive
Software:  Fun_plug 0.5 beta, SSH, Samba recycle bin, Firefly, hellanzb, nzbget, cleanboot, chrooted etch, optware, midnight commander, rsnapshot

Offline

 

#43 2008-07-29 07:22:22

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

silversurfer wrote:

I didn't try anything of the e2fsck howto so I can't tell if "no-bash-reload.sh" will work.

Your lsof output only shows the usual services running from your hard disk, BitTorrent, funplug, syslog, klog, telnet, a fan control script (probably including the sleep command) and the ftp server log in another partition.

As for your hard disks spinning up and down this is caused by your configuration, you must have told the box to shut down the disks when they are not accessed but they will spin up again when one of your services accesses them. That is one of the reasons why people move ffp to a USB disk.


Edith says:

This is what lsof says on my system:

smbd      1970  root  cwd       DIR        9,0    4096         2 /mnt/HD_a2
smbd      2016  root  cwd       DIR        9,0    4096         2 /mnt/HD_a2


Thanx to fonz and other people here everything runs from USB disk. :-)

Silversurfer,
  But what services could be accessing the disks if I'm not actually using the box? It's spinning up and down all day....... there's no torrents happening or ftp's. Syslog is going to RAM (thanks fonz) and the fan control script runs in RAM I believe.

Regards
Tony

Offline

 

#44 2008-07-29 09:46:48

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

But what services could be accessing the disks if I'm not actually using the box?

One way to find out is to kill process by process until it stops. I'd start with the fan controller.

Offline

 

#45 2008-07-29 10:47:36

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

fonz wrote:

flashman1207 wrote:

But what services could be accessing the disks if I'm not actually using the box?

One way to find out is to kill process by process until it stops. I'd start with the fan controller.

Is there anything I shouldn't kill ???? or at least kill last? I assume that after rebooting all will be back as normal?

Thanks
Tony

Offline

 

#46 2008-07-29 10:51:13

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: DNS-323 disk activity all the time (without me doing anything) ?

flashman1207 wrote:

Is there anything I shouldn't kill ????

telnetd

Offline

 

#47 2008-07-29 11:00:15

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

fonz wrote:

flashman1207 wrote:

Is there anything I shouldn't kill ????

telnetd

Thanks, will hopefully try it tonight.....

Offline

 

#48 2008-07-29 15:08:20

EnricoM
Member
From: Netherlands
Registered: 2008-06-03
Posts: 77

Re: DNS-323 disk activity all the time (without me doing anything) ?

The command fuser will give you a list of processes that access your drive(s).

Code:

fuser -m /mnt/HD_a2

With the option fuser -k, you can kill them all in one go... (beware not to kill telnetd, sshd and sh)

Last edited by EnricoM (2008-07-29 15:11:31)


Hardware: Conceptronic CH3SNAS, FW1.03 - 2x Samsung Spinpoint F1 750 MB, no RAID  - Imation Whizz 4GB USB Flash Drive
Software:  Fun_plug 0.5 beta, SSH, Samba recycle bin, Firefly, hellanzb, nzbget, cleanboot, chrooted etch, optware, midnight commander, rsnapshot

Offline

 

#49 2008-07-29 16:32:10

flashman1207
Member
Registered: 2008-05-27
Posts: 92

Re: DNS-323 disk activity all the time (without me doing anything) ?

EnricoM wrote:

The command fuser will give you a list of processes that access your drive(s).

Code:

fuser -m /mnt/HD_a2

With the option fuser -k, you can kill them all in one go... (beware not to kill telnetd, sshd and sh)

Tried that command and it returned nothing but the command line. I guess that means that nothing is using any files on the disk..... at that moment in time anyway.......

Tony

Offline

 

#50 2009-10-14 00:03:48

tanstaafl1963
Member
Registered: 2009-08-22
Posts: 58

Re: DNS-323 disk activity all the time (without me doing anything) ?

Along the lines of being a newbie and drive spin down...

I have transmission running, but at the current time, nothing is being downloaded or seeding.  When I run 'fuster -m /mnt/HD_a2'  I get several PIDs back, 3 of which are for transmission-daemon.

If there is nothing active in transmission, should the PIDs appear?  If it is correctly appearing, why should transmission access the HD when there isn't downloading/seeding?

Just trying to learn..

Thanks


DNS-323 FW 1.09
2 2-TB Drives
Automatic  0.7.0 |  Transmission 2.42

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB