LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   WD USB disk shown with much smaller size (https://www.linuxquestions.org/questions/linux-general-1/wd-usb-disk-shown-with-much-smaller-size-4175460473/)

a2z 05-02-2013 02:05 PM

WD USB disk shown with much smaller size
 
Hi,
we have a brand new 3TB USB disk plugged into the server ( running Linux 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux)
However the /var/log/messages shows the disk is only 800GB.

May 1 22:01:44 server5 kernel: usb 1-3: new high speed USB device using ehci_hcd and address 86
May 1 22:01:44 server5 kernel: usb 1-3: configuration #1 chosen from 1 choice
May 1 22:01:44 server5 kernel: scsi1535 : SCSI emulation for USB Mass Storage devices
May 1 22:01:49 server5 kernel: Vendor: WDC WD30 Model: EURS-63SPKY0 Rev:
May 1 22:01:49 server5 kernel: Type: Direct-Access ANSI SCSI revision: 02
May 1 22:01:49 server5 kernel: SCSI device sdas: 1565565872 512-byte hdwr sectors (801570 MB)
May 1 22:01:49 server5 kernel: sdas: Write Protect is off
May 1 22:01:49 server5 kernel: sdas: assuming drive cache: write through
May 1 22:01:49 server5 kernel: SCSI device sdas: 1565565872 512-byte hdwr sectors (801570 MB)
May 1 22:01:49 server5 kernel: sdas: Write Protect is off
May 1 22:01:49 server5 kernel: sdas: assuming drive cache: write through
May 1 22:01:49 server5 kernel: sdas: unknown partition table
May 1 22:01:49 server5 kernel: sd 1535:0:0:0: Attached scsi disk sdas
May 1 22:01:49 server5 kernel: sd 1535:0:0:0: Attached scsi generic sg45 type 0

What could have gone wrong? Any way to fix it?
Thanks.

ShadowCat8 05-02-2013 02:22 PM

Greetings,

Well, considering how old the kernel is (2.6.18 versus current 3.7.x), I figure this is an older server.

First question would be; Does the mobo support 3TB drives? (Had an issue with certain older systems with the 2TB drives.)

Also, is the drive completely unformatted? I was noting the following snippet from the log:
Quote:

Originally Posted by a2z
May 1 22:01:49 server5 kernel: SCSI device sdas: 1565565872 512-byte hdwr sectors (801570 MB)
May 1 22:01:49 server5 kernel: sdas: Write Protect is off
May 1 22:01:49 server5 kernel: sdas: assuming drive cache: write through
May 1 22:01:49 server5 kernel: sdas: unknown partition table
May 1 22:01:49 server5 kernel: sd 1535:0:0:0: Attached scsi disk sdas

HTH. Let us know.

a2z 05-02-2013 03:41 PM

Hi,
Not sure if 3TB is supported or not by it. However certainly 2TB is supported, since I have 2TB USB disks that are plugged in and recognized. I would be OK if I can get 2TB use out of the disk.
Yes, the disk is not partitioned yet.
Thanks!

lleb 05-02-2013 08:03 PM

Quote:

Originally Posted by ShadowCat8 (Post 4943602)
Greetings,

Well, considering how old the kernel is (2.6.18 versus current 3.7.x), I figure this is an older server.
HTH. Let us know.

not entirely so. RHEL 6.x is still using 2.6.x kernel.

to the OP, partition and format the drive, then you will know better if you are having size issues. at least partition it and look at fdisk -l to get a better idea of what the system is seeing.

a2z 05-03-2013 12:46 PM

Hi,
Used parted to partition it. Only 802GB is available.

# /sbin/parted /dev/sdas
GNU Parted 1.8.1
Using /dev/sdas
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 0.0 100%
(parted) print
Model: WDC WD30 EURS-63SPKY0 (scsi)
Disk /dev/sdas: 802GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 802GB 802GB primary

# fdisk -l /dev/sdas

WARNING: GPT (GUID Partition Table) detected on '/dev/sdas'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdas: 801.5 GB, 801569726464 bytes
255 heads, 63 sectors/track, 97451 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdas1 1 97452 782782935+ ee EFI GPT

a2z 05-07-2013 01:48 PM

Any insights?
Thank you.

suicidaleggroll 05-07-2013 02:32 PM

Looks like an 800G drive. Can you try plugging it into another machine (preferably one with a newer kernel) to see what it says?

lleb 05-07-2013 03:01 PM

Quote:

Originally Posted by suicidaleggroll (Post 4946778)
Looks like an 800G drive. Can you try plugging it into another machine (preferably one with a newer kernel) to see what it says?

this is not a kernel issue, im running basically the same kernel he is and have both a 1.5Tb and a 2.0Tb drive with zero issues. i have also on many occasions connected 1.0-3.0TB drives via USB 2.0 with zero issues.

something else is going on here. by the looks of his output he has some odd partitions that maybe causing the issue. If fdisk is unable to remove all partitions then it should tell you what tool to use. In addition to that, was this drive ever part of a raid, or an LVM?

suicidaleggroll 05-07-2013 03:04 PM

Quote:

Originally Posted by lleb (Post 4946799)
this is not a kernel issue

I really just meant another, different computer (IE: not an identical machine running an identical OS). Variety is good for tracking down problems like this, the more different the machines, the more you can trust that something is wrong with the drive or its partition table when both machines give you the same output.

a2z 05-07-2013 03:33 PM

Hi,
Actually this is a brand new disk. Even before I partitioned it, /var/log/messages showed that OS sees it as a 802GB disk. Partition only confirms that only 802GB was available.

suicidaleggroll 05-07-2013 04:50 PM

Quote:

Originally Posted by a2z (Post 4946813)
Hi,
Actually this is a brand new disk.

Yes, but it's an external drive, right? External drives are pre-partitioned by the manufacturer, often with a very crazy (and very broken) partition table. The first thing I do whenever I get an external drive is wipe the entire partition table and create a new one from scratch.

a2z 05-07-2013 06:54 PM

But when I used parted to check the disk for the first time, it showed no partition. What other tool can I use to check and wipe the built-in partition?
Thanks.

lleb 05-08-2013 12:38 AM

fdisk the drive and remove all partitions. then create 1 partition and follow the defaults on the screen. again as long as that drive has never been part of a LVM or RAID this will work.

@suicidaleggroll yes more systems to test = excellent for reducing the variables that can cause issues.

ShadowCat8 05-13-2013 05:59 PM

Greetings all,

@a2z: Again, I would say that you need to check whether or not your motherboard *can handle* 3TB drives. I have had issues with certain older systems trying to read and/or use 2TB drives in the past because the motherboard *couldn't* support them.
Best way to do that is to go to the website of the manufacturer of your motherboard and see if there is a BIOS update available for it. *ALWAYS* check the description of any BIOS updates that you getting to make sure the update is actually resolving the issue you are experiencing.

@lleb: Yes, I know there is still some work going on some of the later 2.6.32 kernels in the hardened linux kernel source, however, 2.6.18 was officially released some time around May of 2006 (a few short months after you registered here, interestingly enough. ;) hehe). As of this writing, the earliest stable of the hardened 2.6.x kernel in my portage tree is 2.6.32-r143 and the most recent is 2.6.32-r161. The "earliest" linux 2.6.x kernel version I have in my portage tree overall is 2.6.16.26 under xbox-sources.

This isn't running on an Xbox, by chance, is it? (I would figure that Xbox *should* support 3TB drives, but that is an assumption. :-p hehe)

Beryllos 05-13-2013 06:28 PM

I just thought to google around, and found that this is a well-known issue with 3TB drives in older systems. You should search terms like "802 gb 3 tb" or "2.2 tb limit" or simply "3tb hard drive limitations" and you'll find plenty.

This looks like a useful article:
PC World, 06 July 2011 - Everything You Need to Know About 3TB Hard Drives

In short, some motherboards can only address up to 2.2 TB. In some cases, that leaves a fragment of 802 GB. Why you're not seeing only the 2.2 TB, or seeing both 2.2 TB and 802 GB in separate partitions, I don't know. I suspect a BIOS upgrade is what you need... or a new system?

a2z 05-14-2013 06:14 PM

Hi, ShadowCat8,
This box can handle at least 2TB USB disks, since it recognized 2TB disks before. Unfortunately I can't do a BIOS upgrade since it will need approval, testing efforts etc.
Beryllos,
Thank you for the useful link, it is indeed very informative. I suspect it has something to do with the advanced format and maybe this particular USB disk. I will try to plug it into another server, or maybe buy another disk of a different brand.

Beryllos 05-14-2013 06:33 PM

Quote:

Originally Posted by a2z (Post 4951261)
I will [...] maybe buy another disk of a different brand.

Don't but another 3 TB drive for this system. If this problem is due to a limitation of the motherboard, as we suspect, then any brand of 3 GB drive will not work. It is a matter of how many bits are used to address the sectors. If there are too many sectors, it won't work. Your past experience shows that 2 TB drives work, so perhaps you could get another 2 TB drive.
Quote:

Originally Posted by a2z (Post 4951261)
I will try to plug it into another server

That might work, if the other server is up-to-date on this issue. Perhaps you could look up the specifications of the other server to see if it can handle 3 TB and larger drives.

[edit] Additional remark added upon further thought
I just noticed, you said it is a USB drive. I don't know, but perhaps there are 3 TB USB drive enclosures that use some tricks for compatibility with older systems. I would certainly want to look carefully into this issue, see what it says in the drive's User Manual, and maybe read customer reviews, before spending money on another brand of 3 TB drive.


All times are GMT -5. The time now is 11:33 AM.