LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-27-2014, 07:16 PM   #1
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Rep: Reputation: Disabled
External USB drives out of disk space when copying files via Samba


Hi,

I have two external USB drives connected to a laptop running Ubuntu Server 14.04 (no GUI). The drives are 1TB and 3TB in size respectively. Both have been formatted as "ext2" (as far as I can tell).

I have entries in /etc/fstab that seem to mount the drives properly when I boot up the server. However, I am trying to copy files onto the 3TB drive from a Windows machine (via Samba share) and I get a message saying there isn't enough space yet I only have about 12GB of data on the drive.

I suspect something is not mounted or formatted properly because when I run sudo lsblk /dev/sda2 it shows a size of 1.4T on the drive that should be 3TB (although this does not explain why I'm not able to copy more than 12GB of data).

Any help to guide me in resolving this situation is greatly appreciated. I am definitely a Linux newbie, but am pretty comfortable with entering commands and following instructions.

Thanks!
 
Old 07-27-2014, 09:16 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,352
Blog Entries: 12

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
What do the commands "df" (disk free space) and "fdisk -l" report when run in a terminal? (You may have to run the fdisk command as root.)

Also, what are the relevant entries in your /etc/fstab?

This information should be enough to get the troubleshooting started. Please be kind enough to surround any terminal output with "code" tags for readability; they become available when you click the "Go Advanced" button to the right of the "Post Quick Reply" button at the bottom of the reply window.

Last edited by frankbell; 07-27-2014 at 09:17 PM.
 
Old 07-28-2014, 12:41 PM   #3
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks frankbell for helping out. Below is the requested output.

Here is some additional information that might be of use: the server in question has 4MB of RAM and a single hard drive of 100GB on which Linux was installed and partitioned according to a scheme recommended here: http://ubuntuserverguide.com/2013/02...r-edition.html.
Not knowing anything about the best way to partition a drive for a server installation, I decided to follow that scheme because it was simple to follow an easy to understand.

Here is the output of "df":

Code:
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdc1       19091584 13571680   4527036  75% /
none                   4        0         4   0% /sys/fs/cgroup
udev             2022624       12   2022612   1% /dev
tmpfs             406448      964    405484   1% /run
none                5120        0      5120   0% /run/lock
none             2032236        0   2032236   0% /run/shm
none              102400        0    102400   0% /run/user
/dev/sdc2         237869    62915    158366  29% /boot
/dev/sdc5       74652840    53036  70784588   1% /home
Output from "fdisk -l":

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


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  1953525167   976762583+  ee  GPT

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


Disk /dev/sda: 2000.4 GB, 2000365289472 bytes
255 heads, 63 sectors/track, 243197 cylinders, total 3906963456 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  3906963455  1953481727+  ee  GPT

Disk /dev/sdc: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 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: 0x00028a15

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    39063551    19530752   83  Linux
/dev/sdc2   *    39063552    39563263      249856   83  Linux
/dev/sdc3        43417598   195371007    75976705    5  Extended
/dev/sdc4        39563264    43415551     1926144   82  Linux swap / Solaris
/dev/sdc5        43417600   195371007    75976704   83  Linux

Partition table entries are not in disk order
And finally /etc/fstab:

Code:
/etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=54a5d5a8-e5d3-494f-86b6-fa0e3d3c3cfa /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=d1b85ca2-4892-475e-b48e-c8e7192fdc9b /boot           ext4    defaults        0       2
# /home was on /dev/sda5 during installation
UUID=6c1de1cb-9846-48ea-9a9d-2991c960a97d /home           ext4    defaults        0       2
# swap was on /dev/sda4 during installation
UUID=7aa30310-eff4-4a68-81f5-6e14a1c8d4e9 none            swap    sw              0       0
# shared drive for regular file sharing
#UUID=65ea71e4-e901-4403-a734-1cb78f5c3e05     /mnt/fileshare   ext2    rw,user,auto    0    0
# shared drive for media files
#UUID=84ecac70-220c-4d9b-a4d3-cb98e27ca1f0     /mnt/media       ext2    rw,user,auto    0    0
# shared network backup drive
#UUID=85ffe2cd-90d2-4c2f-9efe-a863de8a0041     /mnt/backup      ext2    rw,user,auto    0    0
 
Old 07-28-2014, 04:30 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,388

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
Almost seems like a disk quota.
 
Old 07-28-2014, 05:15 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
There is no 3TB drive shown in your fdisk -l output, and neither sda or sdb are mounted in your df output. What happens if you run "mount -a" as root? If there's no error, post the output of "df -h" again.
 
Old 07-28-2014, 09:43 PM   #6
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
I apologize for the confusion...the 3TB drive is actually 2TB. Looking at the output of fdisk -l, it seems to be on /dev/sda1
 
Old 07-28-2014, 11:11 PM   #7
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
Just rebooted my server and ran fdisk -l again and now the 2TB drive seems to be on /dev/sdb1...I'm not sure what this means, but it would seem like my fstab entries are not mapping the same devices to the same locations every time?

Output from fdisk -l after reboot:

Code:
Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 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: 0x00028a15

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    39063551    19530752   83  Linux
/dev/sda2   *    39063552    39563263      249856   83  Linux
/dev/sda3        43417598   195371007    75976705    5  Extended
/dev/sda4        39563264    43415551     1926144   82  Linux swap / Solaris
/dev/sda5        43417600   195371007    75976704   83  Linux

Partition table entries are not in disk order

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


Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1  1953525167   976762583+  ee  GPT

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


Disk /dev/sdb: 2000.4 GB, 2000365289472 bytes
255 heads, 63 sectors/track, 243197 cylinders, total 3906963456 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  3906963455  1953481727+  ee  GPT
 
Old 07-29-2014, 08:49 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
It's normal for drives to change names, especially usb drives, fstab has nothing to do with it. Windows does the same thing. That's why your fstab entries use UUID instead of device name.

Anyway, you didn't post what I had asked for, but looking at your fstab a little closer it appears the mount entries for those two drives have been commented out. So they're not being mounted, and anything you write to any directory on this machine will go to the 100G drive, which is why it's running out of space so quickly.
 
Old 07-29-2014, 09:23 AM   #9
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
@suicidaleggroll: thanks, I just noticed that the stuff was indeed commented in fstab and now I recall why...when I had those lines uncommented, I was getting errors when my server booted up. But I guess that does explain why it was defaulting to the 100G drive.

As you requested, I ran "mount -a" as root as got no errors. Then ran "df -h" again and here is the ouptut:

Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        19G  1.4G   16G   8% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           397M  960K  396M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/sda2       233M   62M  155M  29% /boot
/dev/sda5        72G   52M   68G   1% /home

My question is, what is the proper way to do what I am trying to do...I simply want my USB drives to automatically be mounted when the server starts?
 
Old 07-29-2014, 09:48 AM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
What errors were you getting on boot?
 
Old 07-29-2014, 10:23 AM   #11
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
These are not the exact errors I was getting, but the same type of message:

Code:
[   19.096698] usb 2-4: device descriptor read/64, error -110
[   34.360021] usb 2-4: device descriptor read/64, error -110
[   49.783356] usb 2-4: device descriptor read/64, error -110
[   65.046685] usb 2-4: device descriptor read/64, error -110
[   75.716691] usb 2-4: device not accepting address 6, error -110
I just uncommented the lines in fstab and rebooted and did not get any messages, so I'm not sure what the problem was exactly at that time.

That said, what seems to be happening now is that my mount points are not going to the correct devices. For example /mnt/fileshare is going to the USB drive where I want /mnt/media to go (the 2TB drive) I thought the UUID was the way to uniquely identify a device but I think I'm missing something...
 
Old 07-29-2014, 10:36 AM   #12
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Then you must have your UUIDs mixed up. You can use fdisk -l to print out the device sizes and names like you've been doing, and then use blkid to get the UUID for it.

Given your latest fdisk output, the 2TB is sdb and the 1TB is sdc, so:
Code:
blkid /dev/sdb1
blkid /dev/sdc1
Should give you each of their UUIDs respectively. Of course you'll have to modify this if they've changed names again.
 
Old 07-29-2014, 11:38 AM   #13
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thanks suicidaleggroll, that seems to be what was causing the problem.

Just so I understand, the mount points (/dev/sdb1, /dev/sdc1 etc..) are not fixed and may change when you reboot but the UUIDs are always going to point to the correct device?
 
Old 07-29-2014, 12:47 PM   #14
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
That's correct, but /dev/sdb1 and /dev/sdc1 are not mount points, they're device names. The mount points would be /mnt/media, /mnt/fileshare, /mnt/backup, or wherever else you decided to mount them.

Device names can move around depending on the order in which they were detected, similar to how if you attach two USB drives in Windows they might be labeled D: and E:, or E: and D:, depending on the order you plugged them in.

UUIDs are unique identifiers that won't arbitrarily change when you reboot the machine (UUID stands for "Universally Unique IDentifier").
 
1 members found this post helpful.
Old 07-29-2014, 06:33 PM   #15
Lakeshow32
LQ Newbie
 
Registered: Jul 2014
Distribution: Ubuntu Server 14.04 LTS
Posts: 12

Original Poster
Rep: Reputation: Disabled
Got it.

Thanks to suicidaleggroll and everyone for their help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copying files from one external USB hard drive to another zeelog Linux - Newbie 10 08-02-2011 09:22 PM
Transferring/copying files to an external USB hard drive rasupi Linux - Newbie 1 12-17-2008 04:04 AM
Problem copying files to FAT32 usb disk (Cannot open: No space left on device) Arodef Linux - General 1 08-07-2008 06:02 PM
copying files from my home directory to my USB Flash Disk neo_phyte Red Hat 9 04-24-2006 01:32 AM
USB External Hard Disk problem with large files nick1.41 Linux - Hardware 0 05-26-2004 08:33 PM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration