Storing big (bigger than 4GiB) files on a USB flash drive

Robert Heller heller at deepsoft.com
Sat Nov 27 16:06:51 UTC 2021


At Sat, 27 Nov 2021 15:41:52 +0000 "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> Hi,
> 
> I have a backup .tar.gz file that is 4666239910 bytes in size. That is,
> 4.4GB
> 
> I have a 128 GB USB flash drive. Attempting to copy that file results in a
> "file too large" error.
> 
> Nautilus (properties option) says the drive is formatted as *"msdos"*
> 
> df says:
> $ df -Th /media/ian/MANDELBROT/
> Filesystem     Type  Size  Used Avail Use% Mounted on
> /dev/sdb1      *vfat*  115G  101G   15G  88% /media/ian/MANDELBROT
> 
> According to my research on the Internet, a VFAT drive can handle files
> larger than 4GB. However,my experience with this contradicts my research.

No VFAT32 is limited to files less than 2^32 (4GB) bytes in size. For larger
files you have two (main) options:

1) If this USB flash drive is only going to be used with Linux, you can
reformat it using the Linux file system of your choice (eg Ext3, Ext4, BFS,
etc.).  This option makes sense if the files are just backups of your Linux 
data.

2) If the USB flash drive needs to be accessed by a MS-Windows machine, MacOSX
machine, a smart TV / RoKu TV, or a BluRay player, etc., you can format it
with NTFS. NTFS is now reasonably well supported under Linux with the ntfs-3g
package (which uses FUSE). This option makes sense if the files being copied
are either cross platform (data usable by multiple systems) or things like
mpeg4 video files (that you might want show on your smart TV).

In either case you need to reformat the drive.  This is done just like any 
other drive, using mkfs.[whatever]: mkfs.ext3, mkfs.ext4, mkfs.bfs, mkfs.ntfs, 
etc.  When you do this, the contents of the drive will be erased, so if there 
are files there you want to keep, copy them off first.  It is probably *best* 
to reformat a new USB flash drive before using it, if you think you might be 
putting large files on it.

Another option would be to split the large file into smaller pieces, but that 
can really be something of a hassle to deal with.

> 
> Any ideas? I can't split the files up into separate .tar.gz files. Will I
> have to reformat my USB drive to something like ext4?
> 
> TIA,
> 
> 
> Ian
> 

-- 
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                               




More information about the ubuntu-users mailing list