15.1 and External USB disk docking station

Re: 15.1 and External USB disk docking station

Postby Jocko » Fri Feb 21, 2014 8:26 am

Hi mdi,

So vol_id behavior is fixed. :-D

About your last problem, I think that there is another issue with the mount script because since version 15.1 gpt disk should be supported.

So I assume that there is a malfunction to detect either the gpt disk or the file system type (currently the script waits the value 8300. maybe you use the code type 8E00).

I will send you a short script to see what happens
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 15.1 and External USB disk docking station

Postby Jocko » Fri Feb 21, 2014 5:12 pm

As promised, attached a short php script.
To use it:
- unzip the archive to your NAS, I assume on 'fvdw' share.
- open Putty
- give this command
Code: Select all
php /share/1000/fvdw/test-gpt.php /dev/sdd1
(I assume that sdd1 is your usb gpt partition)
And so post here its output

Note: if the disk size is biggest than 2TB, you will also have a warning "fdisk: device has more than 2^32 sectors, can't use all of them",
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 15.1 and External USB disk docking station

Postby mdi » Sat Feb 22, 2014 9:42 am

Hi, here is the output:
Code: Select all
arg:/dev/sdb
type disk:gpt
Array
(
    [0] => MBR:
    [1] => protective
    [4] =>
)

arg:/dev/sdc1
type disk:gpt
Array
(
    [0] => 1
    [1] => 34
    [2] => 3907029134
    [3] => 1.8
    [4] => 0700
    [5] => 0700
)


Strange... I formatted them the same way. First I issued:
Code: Select all
dd if=/dev/zero of=/dev/<disk> bs=1M count=100

... just to be sure I could change the partitioning schema (MBR, GPT), as it seemed that also Linux goes a bit crazy when you reformat... at least the gnome disk utility.
Then I could properly formatted them choosing the schema type and I formatted them the same way.

If you want I can try reformatting.... :dontknow

In the NAS USB DISK menu I can see the Information box saying:
deamon stopped, sdb
deamon stopped, sdc

But the list of disks at the top is empty.
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: 15.1 and External USB disk docking station

Postby Jocko » Sat Feb 22, 2014 10:59 am

Hi mdi,

You don't have the same output because you don't use the same command for sdb and sdc (arg:/dev/sdb and arg:/dev/sdc1)!

So repeat the command for sdb with /dev/sdb1 instead of /dev/sdb

But at least, I can say now that the mount script detects well your gpt disk. So now, the issue should be with the file system code type.
About sdc1 is the ntfs disk ?

Note : the issue is not how do you format the partitions but how do you create the partition table (or surely with what tool)

Note2: about USB disk menu, the daemon is the spindown guard daemon and usually you shouldn't enable it (the usb disk should spin down itself)
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 15.1 and External USB disk docking station

Postby mdi » Sat Feb 22, 2014 8:54 pm

Hi Jocko,
both disks are ext4. I don't use the spindown deamon, but I noticed there that both disks are recognized as external units, even if they are not mounted, either of them.

So, even if I have those two devices, sdb and sdc, I have none mounted even if they are ext4. Here is the output, using the partition devices:
Code: Select all
root@nas:/share/1000/public # php test-gpt.php /dev/sdb1
arg:/dev/sdb1
type disk:gpt
Array
(
    [0] => 1
    [1] => 34
    [2] => 3907029134
    [3] => 1.8
    [4] => 0700
    [5] => 0700
)
root@nas:/share/1000/public # php test-gpt.php /dev/sdc1
arg:/dev/sdc1
type disk:gpt
Array
(
    [0] => 1
    [1] => 34
    [2] => 3907029134
    [3] => 1.8
    [4] => 0700
    [5] => 0700
)


The disks were formatted with Linux Mint, with the gnome disk utility.
From a terminal I used the dd to zero the first part of the HDDs, to make it easier to format them (dd if=/dev/zero of=/dev/<disk> bs=1M count=100). Then I used the gnome disk utility to:
1. format with GPT
2. create a new ext4 primary partition

That's it.
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: 15.1 and External USB disk docking station

Postby mdi » Sat Feb 22, 2014 9:36 pm

I'm also noticing that I have a share named /share/1000/data1_1 where the backups have been created even if the data1_1 is not mounted. So I'm backing up within the NAS..... :disapprove
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: 15.1 and External USB disk docking station

Postby fvdw » Sat Feb 22, 2014 9:52 pm

mdi wrote:I'm also noticing that I have a share named /share/1000/data1_1 where the backups have been created even if the data1_1 is not mounted. So I'm backing up within the NAS..... :disapprove


thats not good because the system partition is small and will be filled easily. Then all fun stops

about the mounting, I did not follow this thread in detail, did Jocko adapt the scripts to be able to mount ext4 partitions ?
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: 15.1 and External USB disk docking station

Postby Jocko » Sat Feb 22, 2014 10:09 pm

Hi mdi,

So the issue is the tool that you used to create the partition ( or maybe, you format again the ntfs disks without changing their code type...)
It set as code type the code 0700 which is a window code instead of the code 8300 !

So in putty, change their code by using gdisk and the t command in gdisk.
Then, delete also the folder /share/1000/data1_1

To get a clean NAS status, reboot it and see if it succeeds to mount now the disks :whistle

The disks were formatted with Linux Mint, with the gnome disk utility.
From a terminal I used the dd to zero the first part of the HDDs, to make it easier to format them (dd if=/dev/zero of=/dev/<disk> bs=1M count=100). Then I used the gnome disk utility to:
1. format with GPT
2. create a new ext4 primary partition
Seem to be a complicated way to format the disk :mrgreen:
in gdisk :
Just delete the partition table (command o)
create a partition (command n) with the right code :8300
format the disk : mkfs.ext4 -j -m 1 /dev/sdc1
That 'all
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 15.1 and External USB disk docking station

Postby mdi » Sat Feb 22, 2014 10:58 pm

Hi Jocko, I'm very happy, it worked! :applause :hail

I was formatting with the graphical tool and finally I used dd because to format in ext3 or ext4 it was taking hours and hours, while only seconds after cleaning the initial part of the disk with dd.

Thanks for your instructions, I am able to use both disks now!! Great help, thanks!!
mdi
Donator VIP
Donator VIP
 
Posts: 193
Joined: Tue Oct 11, 2011 1:20 pm

Re: 15.1 and External USB disk docking station

Postby Jocko » Sat Feb 22, 2014 11:01 pm

Glad to heard that you succeeded to get what you want :-D

Good WE

fvdw wrote:about the mounting, I did not follow this thread in detail, did Jocko adapt the scripts to be able to mount ext4 partitions ?
No need to adapt the script because it already supports the ext4 USB disk.

The first issue was the command "vol_id" which didn't return the right value. So we need only to update this command in the next version (but it's already done ;) )
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 3 guests