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

#1 2013-06-16 23:16:08

cswann
Member
Registered: 2013-06-16
Posts: 5

323 Ext USB drive not showing all valid space

I've added a 3TB external USB drive on the back of my 323.  The drive is formatted as EXT2, and is able to access data for both Rx/Tx.   When I look at the fdisk output I can see the drive is formatted as a 3TB disk.

>fdisk -l
Disk /dev/sdc: 3000.5 GB, 3000592977920 bytes
255 heads, 63 sectors/track, 45600 cylinders
Units = cylinders of 16065 * 4096 = 65802240 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdc1               1       45601  2930265088  83 Linux

But when I check drive space (df -h) it's only showing 734 Gb of actual space.  Which I've now filled up.
>df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                    9.7M      6.4M      2.8M  70% /
/dev/root                 9.7M      6.4M      2.8M  70% /
/dev/loop0                4.6M      4.6M         0 100% /sys/crfs
/dev/md0                456.7G    391.6G     65.1G  86% /mnt/HD_a2
/dev/sda4               486.2M     10.7M    475.5M   2% /mnt/HD_a4
/dev/sdb4               486.2M     20.0k    486.2M   0% /mnt/HD_b4
/dev/sdc1               734.8G    696.3G      1.2G 100% /mnt/ext

Can anyone help me determine why it's not mounting the entire drive?

Thanks.

Offline

 

#2 2013-06-17 09:57:30

memiks
Member
Registered: 2011-09-02
Posts: 72

Re: 323 Ext USB drive not showing all valid space

Have you formatted it with GPT format ? instead of FAT ?

Have you search if DNS-323 firmware allow drive larger than 1 or 2TB ?

I think it can be an issue with larger drive....

Fred.

Offline

 

#3 2013-06-17 15:51:56

cswann
Member
Registered: 2013-06-16
Posts: 5

Re: 323 Ext USB drive not showing all valid space

Drive was formatted as EXT2

Offline

 

#4 2013-06-17 16:01:16

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

Re: 323 Ext USB drive not showing all valid space

Did you partition&format the disk inside the NAS?

What does

Code:

cat /proc/partitions

show?

That 734GB is a typical value which is shown when a 3TB disk is examined by a system which doesn't support >2TiB disks. A 2TiB disk has 2^32 sectors. Some systems 'wrap around' and only show the remaining space.

Offline

 

#5 2013-06-18 02:15:26

cswann
Member
Registered: 2013-06-16
Posts: 5

Re: 323 Ext USB drive not showing all valid space

Proc/partitions details were as follows:

/ # cat /proc/partitions
major minor  #blocks  name

   7     0       4704 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 2930266580 sdc
   8    33  782781440 sdc1

Offline

 

#6 2013-06-18 05:55:41

cswann
Member
Registered: 2013-06-16
Posts: 5

Re: 323 Ext USB drive not showing all valid space

Sorry, forgot to mention drive was formatted externally by a Ubuntu 11.04 machine, using gparted

That said, when I plug the drive into the ubuntu client it also says only 734Gb of space available when it auto mounts into machine.

So maybe the box doesn't support 4k sectors?  It's a Seagate Expansion enclosure/drive.

Offline

 

#7 2013-06-18 10:38:18

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

Re: 323 Ext USB drive not showing all valid space

On that Ubuntu box the filesystem showed up as 3TB, I suppose? Your /proc/partitions shows that the kernel recognizes sdc1 as 782GB. The fdisk listing shows only how fdisk interprets the partition table, which is not necessarily the same as how the kernel does it.

So maybe the box doesn't support 4k sectors?

I'm not sure. When it's a 4k sector partition table, interpreted as a 512B table, sdc1 would be 375GB (1/8 * 3TB). On the other hand, the 780GB as wrap around is only argumentative when it's a 512B sector size, and 1.4 * 2^32 sectors. And in that case also sdc would have been 780GB.

It might be possible to use a loop device on sdc to mount the full 3TB, but it will be slow. If your box has addpart/delpart, you could try to manually create the right partitions in kernel tables. If the disk is empty, you could try to partition&format on the NAS.

Offline

 

#8 2013-06-21 03:17:38

cswann
Member
Registered: 2013-06-16
Posts: 5

Re: 323 Ext USB drive not showing all valid space

I plugged the device back into my ubuntu client and ran a fsck -t ext2 on the board, it seems to have repaired the partition so that now both my PC, and my DLINK can see the entire partition.

However, whenever I try to write into the device I get an input/output error.  I can create new sub-dir, or move existing files to a new location.  I can rsync the file to the a different filename in the same directory, but can't write a new object in the existing directories.  Only new directories.

I've tried running chmod/chown to clean up permissions, but nothing seems to change.  Short of copying all the files over again I'm not sure what I can do to fix this.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB