1 (edited by LAPIII 2016-06-25 00:37:32)

Topic: [SOLVED] My 32GB USB drive reads as only 1.75GB.

The following are my steps taken to solve the issue. There are no locks in the Text Display Area:

  1. I clicked on /dev/sda2 and went to Device > Create Partition Table when I got: 2 partitions are currently active on device /dev/sda.

  2. Since there is no Swapoff < Partition, I clicked /devsda5 and chose it when I got: 1 partition is currently active on device /dev/sda.

Now what do I do?

2

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

Did you boot from the USB drive?

Is one of the partitions using encryption or LVM2?

Would you be able to provide the output from the following two commands?

sudo fdisk -l -u

where one of the options is a lower case "L" and not the number one.

sudo parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

3 (edited by LAPIII 2016-06-16 00:43:11)

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

I didn't boot from the USB drive and I don't know if there is encryption or LVM2.

Here is the output of sudo fdisk -l -u

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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: 0x000ddaab

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   484730879   242364416   83  Linux
/dev/sda2       484732926   488396799     1831937    5  Extended
/dev/sda5       484732928   488396799     1831936   82  Linux swap / Solaris

Disk /dev/sdb: 32.2 GB, 32176472064 bytes
77 heads, 32 sectors/track, 25505 cylinders, total 62844672 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: 0x06f46235

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          64     2505887     1252912    c  W95 FAT32 (LBA)
/dev/sdb2         2506750    62842879    30168065    5  Extended
/dev/sdb5         2506752    60297215    28895232   83  Linux
/dev/sdb6        60299264    62842879     1271808   82  Linux swap / Solaris

I tried both sudo parted /dev/sda2 (the extended file system) and sudo parted /dev/sda5 (the linux swap). They output the same except for the number in the second line:

GNU Parted 2.3
Using /dev/sda5
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)

4

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

Please, use the following command:

sudo parted /dev/sdb unit s print

The drive in question is the /dev/sdb , with no numbers (sdb1, sdb2 etc are the partitions in the drive). You can check the exact device name for the specific session.
The device /dev/sda is the computer's hard drive, I guess.

From the fdisk output I see that the most of the disk space belongs to the Linux partition /dev/sdb5 (logical partition). Another logical partition (Linux swap) is located at the end of the drive space. Try to mount and access /dev/sdb5. In case of problem, you can try to check the stick. It can be defective or even fake (I have myself a stick marked 4GB but I can't access more than 1GB). In this last case, you couldn't access the swap partition at all.

Waiting for the Parted output.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5 (edited by LAPIII 2016-06-17 00:19:55)

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

I didn't select /dev/sdb at Gparted > Devices.  Sorry.

https://s19.postimg.org/uhc26f6wz/Gparted.png


Here is the output of sudo parted /dev/sdb unit s print:

Model: PNY USB 2.0 FD (scsi)
Disk /dev/sdb: 62844672s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start      End        Size       Type      File system     Flags
 1      64s        2505887s   2505824s   primary   fat32           boot, lba
 2      2506750s   62842879s  60336130s  extended
 5      2506752s   60297215s  57790464s  logical   ext4
 6      60299264s  62842879s  2543616s   logical   linux-swap(v1)
class413 wrote:

Try to mount and access /dev/sdb5.

Now that I changed devices, there is the option, but it's greyed out.

6

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

I don't see any weird thing there. Everything seems OK.
How do you come to the conclusion that the drive reads 1.75 GB only? Did you try to copy more data and got any error message? The first partition (/dev/sdb1 boot partition) is almost full. I see it is already mounted as media. I guess there are many things other than boot code there.

Give us more details, please.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

7 (edited by LAPIII 2016-06-17 18:25:22)

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

In Windows it reads 1.75 GB. In Linux:


https://s19.postimg.org/own6coipv/UUI.png/j76xsdcjj/


Why would it show as 2 drives?

8

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

The stick contains 3 partitions. One of them is formatted as FAT32, that is readable by windows. The 2 other partitions are readable by Linux only (in fact, the Linux swap partition isn't directly displayed but it is used by the operating system). Windows can't understand the Linux file systems without special drivers.

How did you get this stick and what exactly do you want to do with it?
It is very probable that this stick is bootable and contains a Linux installation, as there is a swap partition too. Is you that did the partitioning? Is someone else that gave it to you?
If you don't need this Linux installation, you can delete the extended partition and the Linux partitions in it (be careful if there are data to keep from there), and grow the FAT32 partition to take the entire drive,

or

take backup of the files you want to keep from the stick, create a new partition table msdos type (be careful, this will delete the actual content), make a new partition for the entire drive capacity (FAT32, or even NTFS if you plan to use it under windows only) and restore your files.

If you want to keep the Linux system on the stick, you can shrink the Linux partition /dev/sdb5 from the left border, shrink the extended partition /dev/sdb2 to take the freed space and grow /dev/sdb1 to take this space.

The term device in Linux is quite general. It can be a hard drive, or a memory stick, a file, a hardware part etc. A device is the entire drive. Other devices are each of the contained partitions.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

9 (edited by LAPIII 2016-06-19 23:26:54)

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

class413 wrote:

How did you get this stick and what exactly do you want to do with it?

I bought this to use on both my Windows and Linux computers.

class413 wrote:

It is very probable that this stick is bootable and contains a Linux installation, as there is a swap partition too. Is you that did the partitioning? Is someone else that gave it to you?

I put a Linux distro on the stick using uuid boot loader for Windows.

I've deleted the partitions:


https://s19.postimg.org/4056wm5s3/GParted_2.png


I want to know if there is a format that is compatible with both Windows and Linux

10

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

FAT32 is compatible for both Windows and Linux. This is the usual option.
NTFS is another option, because actual Linux distributions usually contain drivers for NTFS. However, in case of problem, there aren't many free / open source software tools to repair the system.
It is possible to access Linux filesystems from windows by installing special drivers for this, however this is less common.

As you deleted the logical partitions, you can shrink or delete the extended partition to make space to expand your existing FAT 32 partition  /dev/sdb1. If you want to install the Linux distro again, you can shrink  /dev/sdb2 to half of even less, to make the Linux and Swap partitions. You have to leave enough free space in the partition after installation, so that the system works without problem. I think that 10-11 GiB for both Linux system and swap would be enough if you don't plan to store big volumes of data there. Then, you can expand /dev/sdb1 up to 19-20 GiB.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

11

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

I just deleted /dev/sdb2 and /dev/sdb1. I then created a primary partition by selecting New < Partition.

12

Re: [SOLVED] My 32GB USB drive reads as only 1.75GB.

This makes by default a new primary partition for the entire available space (around 30GiB).

*** It is highly recommended to backup any important files before doing resize/move operations. ***