# usb storage device

## muhsinzubeir

hello...i got some troubles using my usb, here is a bunch of complains when im trying to use it:

-What im trying to achieve is full permission to read en write to that usb device, but i cant if I run chown i get operation not permited.But i can manually copy files to the device as root.Dunno why root cant change owner!.

-The size of the device is not correct, its suppose to be 250G but I have only 167G I do think this an error:

-Why I cant mount this device by just mount /dev/sda /mnt/usb.I can only mount with mount /dev/sda1 /mnt/usb.User cant mount this particular usb but other types they can.  :Mad: 

Anyone with ideas?...please help me out here my linux skills are so limited,i cant see whats goin on here!Here are some bunch of outuputs from my machine:

```

dmesg ouput

usb 1-5: configuration #1 chosen from 1 choice

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 5

usb-storage: waiting for device to settle before scanning

scsi 1:0:0:0: Direct-Access     SAMSUNG  SP2514N          VF10 PQ: 0 ANSI: 2

sd 1:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Mode Sense: 53 00 00 08

sd 1:0:0:0: [sda] Assuming drive cache: write through

sd 1:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)

sd 1:0:0:0: [sda] Write Protect is off

sd 1:0:0:0: [sda] Mode Sense: 53 00 00 08

sd 1:0:0:0: [sda] Assuming drive cache: write through

 sda: sda1 sda2 < sda5 sda6 sda7 >

sd 1:0:0:0: [sda] Attached SCSI disk

sd 1:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

/etc/fstab

/dev/sda1               /mnt/usbstick   auto            defaults,users,sync             0 0

proc/partition:

   8     0  244198584 sda

   8     1  174787200 sda1

   8     2          1 sda2

   8     5    2104452 sda5

   8     6   10490413 sda6

   8     7   56813841 sda7

df -h

/dev/sda1             167G  112G   56G  67% /mnt/usbstick
```

----------

## gerard27

Hi muhsinzubeir,

Your USB disk is partitioned.

The size shown is for partition sda1,which is not the whole disk.

You already mount /dev/sda1 at boot because it is in /etc/fstab.

I suggest studying the Handbook.

Gerard.

----------

## muhsinzubeir

Thanks Gerard...I have emerged linux-hotplug en the problem of user to be able to mount is resolved.Probably not the smartest choice but i can live with it.Without linux-hotplug it doesnt matter what kind input is on the /etc/fstab its just the user cant mount it via the console.Well thats the choice i made, but still the usb drive isnt 100% accurately used as I still lost almost half of the drive space.Look at dmesg i can see that its 250G but on df its just 167G can somebody help....  :Confused: 

dmesg:

```

scsi6 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 9

usb-storage: waiting for device to settle before scanning

scsi 6:0:0:0: Direct-Access     SAMSUNG  SP2514N          VF10 PQ: 0 ANSI: 2

sd 6:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)

sd 6:0:0:0: [sda] Write Protect is off

sd 6:0:0:0: [sda] Mode Sense: 53 00 00 08

sd 6:0:0:0: [sda] Assuming drive cache: write through

sd 6:0:0:0: [sda] 488397168 512-byte hardware sectors (250059 MB)

sd 6:0:0:0: [sda] Write Protect is off

sd 6:0:0:0: [sda] Mode Sense: 53 00 00 08

sd 6:0:0:0: [sda] Assuming drive cache: write through

 sda: sda1 sda2 < sda5 sda6 sda7 >

sd 6:0:0:0: [sda] Attached SCSI disk

sd 6:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

SQUASHFS error: Can't find a SQUASHFS superblock on sda

GFS2: Unrecognized block device or mount point /dev/sda

GFS2: gfs2 mount does not exist

APIC error on CPU0: 00(40)

APIC error on CPU0: 40(40)

APIC error on CPU0: 40(40)

APIC error on CPU0: 40(40)

APIC error on CPU0: 40(40)

```

df -h

```

/dev/sda1             167G  112G   56G  67% /mnt/usbstick

```

new fstab after struggling en reading forum i came up with this  :Embarassed: 

```

/dev/sda1               /mnt/usbstick   auto            noauto,user,rw,exec,sync        0 0

```

Indeed this this USB is having more than 1 partition....any help is welcomed...

----------

## gerard27

Hi muhsinzubeir,

Once more:Your disk is partitioned.That means it is divided into

several portions.

sda1 = primary partition number 1

sda2 = extension (container for the logical partitions) partition number 2

sda5 = logical partition ~2GB  

sda6 = logical partition ~10GB

sda7 = logical partition ~50GB

The figures above I calculated from the /proc/partition figures and are not accurate.

As you can see the 167 GB is only for the first partition.

If you want to have the whole disk to be in sda1 you'll have to use fdisk and first

delete all partitions and then make just one partition which will be a primary

partition.

If the disk contains data that must not get lost then don't do this!!

From the output of df it seems you have data on it.

Plse read the Handbook.It contains a chapter on partitioning.

Gerard.

----------

## muhsinzubeir

hey thanks Gerard atleast i got an idea on how to fix it...i only have to find away of savin my data, that disk is full of porn  :Very Happy:  ...just kiddin...tx ..en cheers...

----------

