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.

#1 2017-05-16 21:38:06

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

How to determine the error?

Hi,
Long time since I posted here. The DNS323 has been working flawlessly for quite a while now.
I have had a 250GB disk in a caddy plugged into it for almost as long as I have had the unit.

I have code that mounts it when it is rebooted, but tonight I could not access my Downloads folder on the disk.

I have run the commands manually and I keep getting the error message

mount: mounting /dev/sdc1 on /mnt/usb250 failed: Invalid argument

after trying to mount the disk.?

Any clues as to finding out what argument it is talking about.?

Attached is my file, but all that is required is the insmod and mount commands.
The insmod produces no errors, just the mount command.

Mount point usb250 exists and the disk is formatted as ext2

TIA


Attachments:
Attachment Icon eps.sh, Size: 1,887 bytes, Downloads: 6

DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#2 2017-05-17 10:35:07

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: How to determine the error?

'Wrong argument' is a catchall for busybox mount. Mounting just failed. The command dmesg can give you more information, directly after trying to mount.

Probably the filesystem is damaged, maybe due to a power failure. In that case fsck might do the job. Another option is a hardware failure.

Offline

 

#3 2017-05-18 00:43:08

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

Hi Mijzelf,

I can create directories on the disk with no issues.?
I'll investigate fsck and try it out on another computer.

Thank you for the reply.


DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#4 2017-05-18 19:23:06

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: How to determine the error?

gasman wrote:

I can create directories on the disk with no issues.?

What do you mean? If you can create directories, you have mounted the disk, and so you problem is already solved. As long as you can't mount the disk, you can't create directories either.

Offline

 

#5 2017-05-18 23:57:48

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

OK, it is not showing up in windows at all. That is why I thought it was not mounting.

I have now copied a file from HD_a2 to HD_a2/usb250/downloads successfully.

HD_a2/usb250 is the mount point for the disk.

So the fault is elsewhere.

Sorry for the confusion, I only have a very limited knowledge of Linux.


DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#6 2017-05-19 00:43:32

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

I think it might have something to do with permissions?

Below is a partial listing of HD_a2. The usb250 directory was root and root.
I changed the owner with chmod to match the files above and have now changed the group.
Also changed permissions to 777 for the directory, but still cannot create anything from windows in that drive mapped to that directory.?

The strange thing is that there were directories with files on the disk and they all appear to have disappeared?

I can create a folder from within windows in the mediatomb  folder, but not a folder like twonky.?

Why something has changed after all this time, I jave no idea. sad

Code:

-rwxrwxrwx    1 nobody   501          2180 Mar  6  2010 fun_plug
-rwxrwxrwx    1 nobody   501           726 Dec 30  2011 gettwonky.sh
-rwxrwxrwx    1 nobody   501         13174 Apr  5  2010 import.js
drwxr-xr-x    3 root     root         4096 May 30  2011 ipkg
-rw-r--r--    1 root     root       102518 May 30  2011 ipkg_list.txt
drwxrwxrwx    2 nobody   501          4096 Dec 31  2009 logs
-rw-r--r--    1 root     root          507 May 16 19:34 ls.log
drwxrwxrwx    8 nobody   501          4096 May 18 22:26 mediatomb
-rw-r--r--    1 root     root            0 May 16 19:18 mntpt.log
-rw-r--r--    1 root     root         3111 Apr  4  2010 old-mediatomb-config.xml
drwxrwxrwx    2 root     root         4096 Jul 22  2010 packages
-rw-r--r--    1 root     root         2889 Jan 20  2014 processlist.txt
-rwxrwxrwx    1 root     root          239 Nov 16  2010 root
-rwxr-xr-x    1 root     root          118 Dec 30  2011 starttwonky.sh
-rwxr-xr-x    1 root     root         2647 Jul 28  2015 testabi.tar.gz
-rwxr-xr-x    1 root     root         2892 Jul 28  2015 testeabi
-rwxr-xr-x    1 root     root         1564 Jul 28  2015 testoabi
drwxr-xr-x    2 root     root         4096 May  2  2010 tmp
drwxr-xr-x    7 root     root         4096 May 18 22:42 twonky
drwxr-xr-x    2 root     root         4096 Dec 20  2011 twonky4418
drwxr-xr-x    5 root     root         4096 Dec 30  2011 twonkymedia
drwxrwxrwx    3 nobody   501          4096 May 16 18:47 usb250

DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#7 2017-05-19 11:10:36

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: How to determine the error?

As far as I can see you are mixing up 2 problems:
* The NAS doesn't mount the USB disk.
* You can't access/change certain shares from Windows.

From your last post I can't conclude if the USB disk is mounted or not, at the moment. You can see that by executing

Code:

cat /proc/partitions
cat /proc/mounts

The first command will tell if the disk is recognized, and if it's partition table has been read. The second command will show if the data partition of the USB disk is mounted somewhere.

I can create a folder from within windows in the mediatomb  folder, but not a folder like twonky.?

Code:

drwxrwxrwx    8 nobody   501          4096 May 18 22:26 mediatomb
drwxr-xr-x    7 root     root         4096 May 18 22:42 twonky

mediatomb is owned by 'nobody', and both group and all have write permission. Twonky is owned by root, and group and all don't have write permission.

Offline

 

#8 2017-05-19 19:00:15

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

Hi Mijzelf,

Here are the results of the cat commands.

Code:

/ # cat proc/partitions
major minor  #blocks  name

   7     0       5728 loop0
  31     0         64 mtdblock0
  31     1         64 mtdblock1
  31     2       1536 mtdblock2
  31     3       6336 mtdblock3
  31     4        192 mtdblock4
   9     0  486544512 md0
   8     0  488386584 sda
   8     1     530113 sda1
   8     2  486544590 sda2
   8     4     514080 sda4
   8    16  488386584 sdb
   8    17     530113 sdb1
   8    18  486544590 sdb2
   8    20     514080 sdb4
   8    32  244198584 sdc
   8    33  244196001 sdc1

/ # cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 rw 0 0
proc /proc proc rw,nodiratime 0 0
/dev/loop0 /sys/crfs squashfs ro 0 0
/dev/md0 /mnt/HD_a2 ext2 rw 0 0
/dev/sda4 /mnt/HD_a4 ext2 rw 0 0
/dev/sdb4 /mnt/HD_b4 ext2 rw 0 0
none /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0

sdc is the 250GB disk.

Can you please explain what it is telling us.

TIA


DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#9 2017-05-19 20:42:47

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: How to determine the error?

gasman wrote:

Can you please explain what it is telling us.

The disk is not completely dead, as it's recognized and the partition table is intact. Yet it is not mounted. So something is wrong. Can you post the output of

Code:

mount /dev/sdc1 /mnt/HD_a2/usb250
dmesg | tail -n 20

Offline

 

#10 2017-05-19 22:40:55

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

Of course, I appreciate your help. I am pretty much a novice at Linux. big_smile

Code:

/ # mount /dev/sdc1 /mnt/HD_a2/usb250
mount: mounting /dev/sdc1 on /mnt/HD_a2/usb250 failed: Invalid argument

/ # dmesg | tail -n 20
Attached scsi disk sdc at scsi3, channel 0, id 0, lun 0
Attached scsi generic sg2 at scsi3, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete
usbcore: deregistering driver usb-storage
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
  Vendor: ST325082  Model: 0AS               Rev:
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB)
sdc: assuming drive cache: write through
SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB)
sdc: assuming drive cache: write through
 sdc: sdc1
Attached scsi disk sdc at scsi4, channel 0, id 0, lun 0
Attached scsi generic sg2 at scsi4, channel 0, id 0, lun 0,  type 0
usb-storage: device scan complete

DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#11 2017-05-20 10:15:09

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 688

Re: How to determine the error?

:‑O

That is certainly not what I expected. What you see are kernel messages related to the connection and recognition of an usb disk. Nothing about a failed mount.

If this is the result of a mounting action, I'd say that there is some hardware error, causing the disk to reboot or something as soon as it's accessed. But it seems more feasible to assume the mounting didn't reach the kernel at all, and so it didn't cause any logs.

In that case 'mount' fails to interpret it's command line to something which can be passed to the kernel, and then the message 'Invalid argument' is correct after all.

I think mount needs 3 files, the device node, the mount point and a list of supported filesystems. The latter because you didn't specify a filesytem, and to it has to loop through all available filesystems.

The device node and mount point can be tested:

Code:

ls -l /dev/sdc1
ls -l /mnt/HD_a2/usb250

I don't know how mount finds the list of filesystems, but it possibly reads /proc/filesystems. So have a try:

Code:

cat /proc/filesystems

(BTW, this is not a 'real file'. All files in the /proc directory are virtual, and give a direct peek in the kernel memory)

Offline

 

#12 2017-05-20 14:12:00

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

Hi Mijzelf,

I have some other disk lying around somewhere.
I'll try another disk in a minute.

Meanwhile ?

Code:

/ # cat /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   futexfs
nodev   tmpfs
nodev   eventpollfs
nodev   devpts
        ext3
        ext2
        cramfs
        squashfs
nodev   ramfs
        minix
        msdos
        vfat
nodev   nfs
nodev   autofs
nodev   rpc_pipefs

DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#13 2017-05-20 14:36:10

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

I've found a 2.5" 160GB disk, but inserting it into the SATA dock, it is not recognised even after reboot of the NAS.
fdisk only shows sda and sdb, howver the disk came from a windows system so will still be ntfs?


DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

#14 2017-05-20 15:16:56

gasman
Member
From: Swansea,UK
Registered: 2009-06-23
Posts: 94

Re: How to determine the error?

OK, not sure what has gone on here.
I could not get the other disk to be recognised by the NAS even after reboot. Both are SATA drives in the same dock.
I replaced the 250GB drive and used my script below, which I have used on the odd occasion the disk does not get mounted after a reboot.
From that I noticed that I was not specifying the file system in the mount command in the script that runs on boot?, so I have now amended it to do so.
The disk is now recognised and mounted and all the files on it are present.

I'll quit while I am ahead and hope it does not happen again for another few years big_smile

Thank you for your help with this Mijzelf

Code:

mount -t ext2 /dev/sdc /mnt/usb250

Last edited by gasman (2017-05-20 15:26:03)


DNS-323 FW 1.08 (05/15/2009) HW:B1
2 * Seagate    ST3500630AS (500GB)  Fun_plug 0.5
DNS-323 FW 1.08  (12/18/2009) HW:B1
2 * Hitachi    HDS5C3020ALA632 (2TB)  Fun_plug 0.5

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB