[SOLVED] External USB drives out of disk space when copying files via Samba
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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
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.
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
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.
@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:
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...
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.
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?
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").
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.