Page 1 of 1
External USB disk

Posted:
Tue Feb 06, 2018 11:42 pm
by KiKoVasques
Hi All
I has a Lacie nwsp2 and I need write at a external disk formatted with NTFS, but I can't make it be visible after connected it at USB port.
NAS system information:
Firmware Version fvdw-sl 17.0 patched (nwsp2)
Kernel: Linux 4.6.6 #7 PREEMPT Sun May 7 11:50:52 CEST 2017
Patch file - fvdw-sl-17.0-patch04-25jan2018
Can you help me.
Thanks
KiKo
Re: External USB disk

Posted:
Tue Feb 06, 2018 11:59 pm
by Jocko
Hi KiKoVasques,
Please to post these outputs, with your USB disk plugged
- Code: Select all
fdisk -l /dev/sdb (if it is a disk size <2TB)
gdisk -l /dev/sdb (if it is a disk size >2TB)
Check also how the disk is mounted by the firmware
- Code: Select all
mount
So unplug the disk and enable the debug mode
- Code: Select all
debugon
. Do a hot-plug again, wait around 30'' and post
- Code: Select all
cat /var/log/messages
Note: think to disable the debug mode after running these commands !
- Code: Select all
debugoff
Re: External USB disk

Posted:
Wed Feb 07, 2018 3:11 pm
by KiKoVasques
Hi Jocko
I ran the commands fdisk e gdisk and both saw the disk. The mount command contain only sda disk.
I'm remotely and only tomorrow I will have a partner on site to unplug/plug the disk and post the content of the messages file.
Bellow the result of the fdisk and gdisk commands:
- Code: Select all
root@ESTILLO_NAS:/ # fdisk -l /dev/sdb
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPT
-------------------------------------------------------------------------
- Code: Select all
root@ESTILLO_NAS:/ # gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.5
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): F64B92F6-5C27-4E40-AE26-DEC9C8AF3AFD
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2157 sectors (1.1 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 3907028991 1.8 TiB 0700 Basic data partition
Thanks
Re: External USB disk

Posted:
Thu Feb 08, 2018 2:03 pm
by KiKoVasques
Hi Jocko
Note that the disk before being unplugged it was sdb and after change to sdc.
Below the message file:
UNPLUG
-------
- Code: Select all
Feb 7 22:52:00 ESTILLO_NAS syslog.info syslogd started: BusyBox v1.21.0
Feb 7 22:54:17 ESTILLO_NAS syslog.info syslogd exiting
Feb 8 06:51:16 ESTILLO_NAS syslog.info syslogd started: BusyBox v1.21.0
Feb 8 06:56:05 ESTILLO_NAS local0.warn API[2018/02/08 06:56:05] nasapi.inc(36)[2801]: nasapi: lock time = 0
Feb 8 06:56:05 ESTILLO_NAS local0.warn API[2018/02/08 06:56:05] nasapi.inc(49)[2801]: calling 'mrvlUdevdDetached sdb1'
Feb 8 06:56:06 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/cat /etc/platform
Feb 8 06:56:06 ESTILLO_NAS local0.warn API[2018/02/08 06:56:06] udevfunc_detached.finc(36)[2801]: Request to detach sdb1 for nwsp2
Feb 8 06:56:06 ESTILLO_NAS local0.warn API[2018/02/08 06:56:06] nasapi.inc(467)[2801]: mrvlUdevdDetached Return Code: 0
Feb 8 06:56:06 ESTILLO_NAS local0.warn API[2018/02/08 06:56:06] nasapi.inc(36)[2805]: nasapi: lock time = 0
Feb 8 06:56:06 ESTILLO_NAS local0.warn API[2018/02/08 06:56:06] nasapi.inc(49)[2805]: calling 'mrvlUdevdDetached sdb'
Feb 8 06:56:06 ESTILLO_NAS local0.warn API[2018/02/08 06:56:06] nasapi.inc(467)[2805]: mrvlUdevdDetached Return Code: 0
HOT PLUG
---------
- Code: Select all
Feb 8 06:58:37 ESTILLO_NAS local0.warn API[2018/02/08 06:58:37] nasapi.inc(36)[2831]: nasapi: lock time = 0
Feb 8 06:58:37 ESTILLO_NAS local0.warn API[2018/02/08 06:58:37] nasapi.inc(49)[2831]: calling 'mrvlUdevdAttached sdc1'
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/cat /etc/platform
Feb 8 06:58:38 ESTILLO_NAS local0.warn API[2018/02/08 06:58:38] udevfunc_attached.finc(34)[2831]: Request to attach sdc1 for nwsp2
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/vol_id -t /dev/sdc1
Feb 8 06:58:38 ESTILLO_NAS local0.warn API[2018/02/08 06:58:38] exthddfunc_mountExtHdd.finc(36)[2831]: Request to mount sdc1
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/vol_id -l /dev/sdc1
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/fdisk -l /dev/sdc
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/gdisk -l /dev/sdc
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/vol_id -t /dev/sdc1
Feb 8 06:58:38 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/mkdir -m 777 -p /mnt/MASA_USB_1
Feb 8 06:58:39 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ntfs-3g /dev/sdc1 /mnt/MASA_USB_1
Feb 8 06:58:39 ESTILLO_NAS local0.warn API[2018/02/08 06:58:39] exthddfunc_mountExtHdd.finc(150)[2831]: failed to mount sdc1 at /mnt/MASA_USB_1
Feb 8 06:58:39 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/mv_reg_bit_set 0x10108 6 1
Feb 8 06:58:44 ESTILLO_NAS authpriv.notice sudo: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/mv_reg_bit_set 0x10108 6 0
Feb 8 06:58:44 ESTILLO_NAS local0.warn API[2018/02/08 06:58:44] nasapi.inc(467)[2831]: mrvlUdevdAttached Return Code: 1
Thanks
Re: External USB disk

Posted:
Thu Feb 08, 2018 2:51 pm
by Jocko
Thank.
Now we now at what step, attach event fails. It seems that ntfs-3g driver fails to mount the NTFS partition of your disk.
So see if we get more information on a manual command:
- Code: Select all
/bin/mkdir -m 777 -p /mnt/MASA_USB_1
/bin/ntfs-3g /dev/sdc1 /mnt/MASA_USB_1
give also these output
- Code: Select all
/sbin/vol_id -t /dev/sdc1
file -bs /dev/sdc1
Note: please to use the BBcode 'code' when you paste some outputs (it is more readable)
Re: External USB disk

Posted:
Thu Feb 08, 2018 3:07 pm
by KiKoVasques
Before I read your reply, I ran the ntfsfix command and it get many errors.
Comparing $MFTMirr to $MFT... FAILED
At night I will restart the NAS to see that the disk mount automatically.
Re: External USB disk

Posted:
Thu Feb 08, 2018 4:37 pm
by Jocko
Indeed, if there is an unreliable file system, ntfs-3g will fail to mount it.
Please to note, this driver supports partially NTFS journaling and then if you unplug the disk whereas file system in an inconsistent state, you corrupt the fs on it and you need to plug it on your Windows laptop to restore it. To avoid this you need to use the safe remove feature of the usb-disk menu before unplugging physically the disk.
Re: External USB disk

Posted:
Thu Feb 08, 2018 6:13 pm
by KiKoVasques
Grateful for your guidance.
One more question:
Can I choose the mount location or should I use symbolic link ?
Thanks for all
KiKo
Re: External USB disk

Posted:
Thu Feb 08, 2018 6:54 pm
by Jocko
The firmware mounts it on a system folder and binds it on an additional mountpoint in the data volume (so in /share/1000 if you have a nwsp2). Then the firmware creates an 'USB' share and you can manage user access like the other shares.
You should not change this behaviour;