Linux/Debian: 3TB hard drive limited to around 700GB

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

stickler
Posts: 85
Joined: Sun Jan 01, 2012 12:40 pm UTC

Linux/Debian: 3TB hard drive limited to around 700GB

Postby stickler » Fri Dec 05, 2014 12:23 am UTC

I have a 64bit debian box which I am using as a server. I recently added a Western Digital 3TB Green HDD to it using a spare SATA lead. I followed some tutorial to format it, and mounted it to /media/green3.
I then started coping a bunch of folders and files (mostly around 200MB to 1GB) to it. Soon I could no longer copy files.

fdisk looks like this:

Code: Select all

user@dusty:~$ sudo fdisk -l
[sudo] password for user:

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b78d9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048  1233487871   616742912   83  Linux
/dev/sda2      1233489918  1250263039     8386561    5  Extended
/dev/sda5      1233489920  1250263039     8386560   82  Linux swap / Solaris

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  1565565871   782782904+  83  Linux
Partition 1 does not start on physical sector boundary.


df produces:

Code: Select all

user@dusty:~$ df -h
Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  579G  6.6G  543G   2% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   397M  388K  397M   1% /run
/dev/disk/by-uuid/628181d0-359c-45ce-8988-f4a36e352223  579G  6.6G  543G   2% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   2.4G  4.0K  2.4G   1% /run/shm
/dev/sdb1                                               735G  698G     0 100% /media/green3


I'm not sure what this does:

Code: Select all

user@dusty:~$ dmesg | grep scsi -A 3
[    1.086798] scsi0 : pata_amd
[    1.086956] scsi1 : pata_amd
[    1.087878] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xffa0 irq 14
[    1.087880] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xffa8 irq 15
[    1.087909] forcedeth: Reverse Engineered nForce ethernet driver. Version 0.6                                   4.
--
[    1.614104] scsi2 : ahci
[    1.614235] scsi3 : ahci
[    1.614343] scsi4 : ahci
[    1.614461] scsi5 : ahci
[    1.614602] ata3: SATA max UDMA/133 abar m8192@0xfea7c000 port 0xfea7c100 irq                                    20
[    1.614605] ata4: SATA max UDMA/133 abar m8192@0xfea7c000 port 0xfea7c180 irq                                    20
[    1.614607] ata5: SATA max UDMA/133 abar m8192@0xfea7c000 port 0xfea7c200 irq                                    20
--
[    1.937895] scsi 2:0:0:0: Direct-Access     ATA      WDC WD6400AAKS-2 01.0 PQ                                   : 0 ANSI: 5
[    1.938143] scsi 3:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00S 80.0 PQ                                   : 0 ANSI: 5
[    1.939304] scsi 4:0:0:0: CD-ROM            ATAPI    DVD A  DH16A6S   YA16 PQ                                   : 0 ANSI: 5
[    1.944711] sd 2:0:0:0: [sda] 1250263728 512-byte logical blocks: (640 GB/596                                    GiB)
[    1.944760] sd 3:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.                                   72 TiB)
[    1.944763] sd 3:0:0:0: [sdb] 4096-byte physical blocks
--
[    1.947514] sr0: scsi3-mmc drive: 48x/12x writer dvd-ram cd/rw xa/form2 cdda                                    tray
[    1.947517] cdrom: Uniform CD-ROM driver Revision: 3.20
[    1.947660] sr 4:0:0:0: Attached scsi CD-ROM sr0
[    1.961747] sd 2:0:0:0: Attached scsi generic sg0 type 0
[    1.961848] sd 3:0:0:0: Attached scsi generic sg1 type 0
[    1.961911] sr 4:0:0:0: Attached scsi generic sg2 type 5
[    1.971314]  sda: sda1 sda2 < sda5 >
[    1.971638] sd 2:0:0:0: [sda] Attached SCSI disk
[    2.724782]  sdb: sdb1


To show a copy failing:

Code: Select all

user@dusty:~/vids$ ls -l
total 1728444
-rw-r--r-- 1 user user 1769920280 Nov 22 22:02 553.mp4
user@dusty:~/vids$ cp film.mp4 /media/green3/fshare/Films/553.mp4
cp: writing `/media/green3/fshare/Films/553.mp4': No space left on device
cp: failed to extend `/media/green3/fshare/Films/553.mp4': No space left on device
user@dusty:~/vids$


Does anyone know what's going on here? And more importantly, does anyone know how to fix it so I can use the full 3TB, ideally without deleting what I have?
Last edited by stickler on Sun Dec 07, 2014 11:01 pm UTC, edited 1 time in total.

Great Justice
Posts: 54
Joined: Sun Aug 15, 2010 5:28 am UTC

Re: Linux/Debian: 3TB hard drive limited to around 700GB

Postby Great Justice » Fri Dec 05, 2014 5:00 am UTC

Code: Select all

total 5860533168  sectors
...

Code: Select all

   Device Boot      Start         End
/dev/sdb1              63  1565565871

5860533168
-1565565871

The partition is not the whole disk. You'll have to resize it, which may or may not allow you to keep the data, depending on the filesystem format.
It usually isn't Congress or the State that tries to abridge free expression or free speech, [...] actually, in the present situation, the main threat to expression comes from public opinion.
~Christopher Hitchens

wumpus
Posts: 532
Joined: Thu Feb 21, 2008 12:16 am UTC

Re: Linux/Debian: 3TB hard drive limited to around 700GB

Postby wumpus » Sat Dec 06, 2014 3:13 pm UTC

Great Justice wrote:

Code: Select all

total 5860533168  sectors
...

Code: Select all

   Device Boot      Start         End
/dev/sdb1              63  1565565871

5860533168
-1565565871

The partition is not the whole disk. You'll have to resize it, which may or may not allow you to keep the data, depending on the filesystem format.


If you can't resize the partition, you should be able to create new partition with a filesystem known to expand (make sure it can expand in all directions), then delete the original and expand the new.

stickler
Posts: 85
Joined: Sun Jan 01, 2012 12:40 pm UTC

Re: Linux/Debian: 3TB hard drive limited to around 700GB

Postby stickler » Mon Dec 08, 2014 3:34 pm UTC

Since fdisk doesn't support drives bigger than 2TB I had to use parted and I lost the data when I used the mklabel gpt command. I copied it all back overnight. I also decided to use ext4.

Thanks for pointing me in the right direction. :D


Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 8 guests