Trying to access HDDs using Linux

75 views
Skip to first unread message

TSahar

unread,
Feb 18, 2017, 1:30:40 PM2/18/17
to Alt-F
I have a DNS-321 running Alt-F 0.1RC4.1. Have just installed two 3TB HDDs as "one big filesystem per disk" and ext4 formatting. Since the writing speed was quite slow (at around 3.5 MB/sec), I thought that I may be able to write directly on the HDD through my linux laptop on which I have Debian 8. I had read about this "trick" for writing a large amount of data a long  time ago -- I hope that doing so is kosher!

So I removed one of the drives and put it in a SATA to USB 3.0 docking station. The drive did not get auto-mounted on my laptop. lsblk shows the drive name as sdb (size: 2.7T; type: disk). For some reason, there is no sdb1 or sdb2. mount /dev/sdb fails with "wrong fs type" error message. dmesg | tail has this to say: "unknown partition table".

I believe that I don't need to install mdadm (as it is not a RAID hard drive). Right? How can I access the HDD? Looking for help, tips and advice!


João Cardoso

unread,
Feb 18, 2017, 3:18:23 PM2/18/17
to Alt-F


On Saturday, 18 February 2017 18:30:40 UTC, TSahar wrote:
I have a DNS-321 running Alt-F 0.1RC4.1. Have just installed two 3TB HDDs as "one big filesystem per disk" and ext4 formatting. Since the writing speed was quite slow (at around 3.5 MB/sec),

Too low. Using what protocol? Using wireless? I guess that is the case.
 
I thought that I may be able to write directly on the HDD through my linux laptop on which I have Debian 8. I had read about this "trick" for writing a large amount of data a long  time ago -- I hope that doing so is kosher!

So I removed one of the drives and put it in a SATA to USB 3.0 docking station. The drive did not get auto-mounted on my laptop. lsblk shows the drive name as sdb (size: 2.7T; type: disk). For some reason, there is no sdb1 or sdb2. mount /dev/sdb fails with "wrong fs type" error message. dmesg | tail has this to say: "unknown partition table".

As the disk is 3TB then its partition table is GPT format, not MBR, that should be the reason. But Debian should handle that OK.
Does 'gdisk -l /dev/sdb' reports anything useful? the gptfdisk package or whatever Debian calls it must be installed on the linux laptop. In any case, that is not an Alt-F issue...

TSahar

unread,
Feb 19, 2017, 7:06:29 AM2/19/17
to Alt-F


On Sunday, February 19, 2017 at 1:18:23 AM UTC+5, João Cardoso wrote:


On Saturday, 18 February 2017 18:30:40 UTC, TSahar wrote:
I have a DNS-321 running Alt-F 0.1RC4.1. Have just installed two 3TB HDDs as "one big filesystem per disk" and ext4 formatting. Since the writing speed was quite slow (at around 3.5 MB/sec),

Too low. Using what protocol? Using wireless? I guess that is the case.


João, thank you for the reply -- and also for the Alt-F firmware! Yes, I am using wireless. Will try the good old ethernet cable in a bit.

 
I thought that I may be able to write directly on the HDD through my linux laptop on which I have Debian 8. I had read about this "trick" for writing a large amount of data a long  time ago -- I hope that doing so is kosher!

So I removed one of the drives and put it in a SATA to USB 3.0 docking station. The drive did not get auto-mounted on my laptop. lsblk shows the drive name as sdb (size: 2.7T; type: disk). For some reason, there is no sdb1 or sdb2. mount /dev/sdb fails with "wrong fs type" error message. dmesg | tail has this to say: "unknown partition table".

As the disk is 3TB then its partition table is GPT format, not MBR, that should be the reason. But Debian should handle that OK.
Does 'gdisk -l /dev/sdb' reports anything useful? the gptfdisk package or whatever Debian calls it must be installed on the linux laptop. In any case, that is not an Alt-F issue...


I totally agree with you that it is not an Alt-F issue, but this could be helpful in accessing data if there is something wrong with the d-link box or with one of the mirrored HDDs (again, not an Alt-F issue). Data recovery has been discussed on this forum. Yes, the purpose of my query is different as I am trying to write a large volume directly to one of the HDDs, but the method would be partially same. 

gdisk -l /dev/sdb does not report anything useful. Here is the output:

GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sdb: 732566646 sectors, 2.7 TiB
Logical sectors size: 4096 bytes
Disk identifier (GUID): ...
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 732566640
Partitions will be aligned on 256-sector boundaries
Total free space is
732566635 sectors (2.7 TiB)


Number Start (sector) End (sector) Size Code Name


For some reason, gdisk doesn't list any partitions. I remember seeing two partitions on one of the Alt-F screens. I just tested both HDDs and the result of lsblk and gdisk are identical.



 

João Cardoso

unread,
Feb 19, 2017, 11:46:27 AM2/19/17
to Alt-F


On Sunday, 19 February 2017 12:06:29 UTC, TSahar wrote:


On Sunday, February 19, 2017 at 1:18:23 AM UTC+5, João Cardoso wrote:


On Saturday, 18 February 2017 18:30:40 UTC, TSahar wrote:
I have a DNS-321 running Alt-F 0.1RC4.1. Have just installed two 3TB HDDs as "one big filesystem per disk" and ext4 formatting. Since the writing speed was quite slow (at around 3.5 MB/sec),

Too low. Using what protocol? Using wireless? I guess that is the case.


João, thank you for the reply -- and also for the Alt-F firmware! Yes, I am using wireless. Will try the good old ethernet cable in a bit.

 
I thought that I may be able to write directly on the HDD through my linux laptop on which I have Debian 8. I had read about this "trick" for writing a large amount of data a long  time ago -- I hope that doing so is kosher!

So I removed one of the drives and put it in a SATA to USB 3.0 docking station. The drive did not get auto-mounted on my laptop. lsblk shows the drive name as sdb (size: 2.7T; type: disk). For some reason, there is no sdb1 or sdb2. mount /dev/sdb fails with "wrong fs type" error message. dmesg | tail has this to say: "unknown partition table".

As the disk is 3TB then its partition table is GPT format, not MBR, that should be the reason. But Debian should handle that OK.
Does 'gdisk -l /dev/sdb' reports anything useful? the gptfdisk package or whatever Debian calls it must be installed on the linux laptop. In any case, that is not an Alt-F issue...


I totally agree with you that it is not an Alt-F issue, but this could be helpful in accessing data if there is something wrong with the d-link box or with one of the mirrored HDDs (again, not an Alt-F issue). Data recovery has been discussed on this forum. Yes, the purpose of my query is different as I am trying to write a large volume directly to one of the HDDs, but the method would be partially same. 

gdisk -l /dev/sdb does not report anything useful. Here is the output:

GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sdb: 732566646 sectors, 2.7 TiB
Logical sectors size: 4096 bytes
The issue is in the 4K *logical* sector size. I bet that it is the USB adapter that "translates" it, (there are other topics in the forum regarding that), but it can also be the disk itself that reports 4KB *logical* sectors.

You can only be sure by attaching the disk on the nas again and issuing the gdisk command there and noting if the reported *logical* sector size is 4KB or 512 Bytes. If the disk reports a 512B logical sector size, you can't use that USB adapter, try another.

But if the disk in the nas reports a 4K logical sector size, you will have issues moving the disk to a linux machine, as Alt-F only works with 512 bytes logical sector sizes. That is an Alt-F bug that I can't fix as I don't have a 4K logical sector size drive.

TSahar

unread,
Feb 20, 2017, 2:52:47 AM2/20/17
to Alt-F


On Sunday, February 19, 2017 at 9:46:27 PM UTC+5, João Cardoso wrote:


On Sunday, 19 February 2017 12:06:29 UTC, TSahar wrote:


On Sunday, February 19, 2017 at 1:18:23 AM UTC+5, João Cardoso wrote:


On Saturday, 18 February 2017 18:30:40 UTC, TSahar wrote:
I have a DNS-321 running Alt-F 0.1RC4.1. Have just installed two 3TB HDDs as "one big filesystem per disk" and ext4 formatting. Since the writing speed was quite slow (at around 3.5 MB/sec),

Too low. Using what protocol? Using wireless? I guess that is the case.


João, thank you for the reply -- and also for the Alt-F firmware! Yes, I am using wireless. Will try the good old ethernet cable in a bit.


On ethernet cable, I am getting around 10.5 MB/sec which will speed up things by a factor of three. I should have though of it earlier :-(


 
I thought that I may be able to write directly on the HDD through my linux laptop on which I have Debian 8. I had read about this "trick" for writing a large amount of data a long  time ago -- I hope that doing so is kosher!

So I removed one of the drives and put it in a SATA to USB 3.0 docking station. The drive did not get auto-mounted on my laptop. lsblk shows the drive name as sdb (size: 2.7T; type: disk). For some reason, there is no sdb1 or sdb2. mount /dev/sdb fails with "wrong fs type" error message. dmesg | tail has this to say: "unknown partition table".

As the disk is 3TB then its partition table is GPT format, not MBR, that should be the reason. But Debian should handle that OK.
Does 'gdisk -l /dev/sdb' reports anything useful? the gptfdisk package or whatever Debian calls it must be installed on the linux laptop. In any case, that is not an Alt-F issue...


I totally agree with you that it is not an Alt-F issue, but this could be helpful in accessing data if there is something wrong with the d-link box or with one of the mirrored HDDs (again, not an Alt-F issue). Data recovery has been discussed on this forum. Yes, the purpose of my query is different as I am trying to write a large volume directly to one of the HDDs, but the method would be partially same. 

gdisk -l /dev/sdb does not report anything useful. Here is the output:

GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk /dev/sdb: 732566646 sectors, 2.7 TiB
Logical sectors size: 4096 bytes
The issue is in the 4K *logical* sector size. I bet that it is the USB adapter that "translates" it, (there are other topics in the forum regarding that), but it can also be the disk itself that reports 4KB *logical* sectors.

You can only be sure by attaching the disk on the nas again and issuing the gdisk command there and noting if the reported *logical* sector size is 4KB or 512 Bytes. If the disk reports a 512B logical sector size, you can't use that USB adapter, try another.

But if the disk in the nas reports a 4K logical sector size, you will have issues moving the disk to a linux machine, as Alt-F only works with 512 bytes logical sector sizes. That is an Alt-F bug that I can't fix as I don't have a 4K logical sector size drive.


I sshed the box and issued the gdisk command which reports a 512B logical sector size (and both partitions) -- which means that the SATA-to-USB adapter is at fault. Thank you for helping me identifying the problem. I also benefited from (in addition to some other posts) this 2014 thread: https://groups.google.com/d/topic/alt-f/FKc-19I8vgo/discussion

Note to self: Now I need to purchase a better SATA-to-USB adapter with the right type of chipset to make sure that I have a viable contingency plan.



 
Reply all
Reply to author
Forward
0 new messages