USB key large file backups

Asked by peterzay

With Ubuntu 10.04, how do I backup files larger than 4GB and transport to any of my Linux machines? FAT32 flash drives will fail on the copy operation.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
peterzay
Solved:
Last query:
Last reply:
Revision history for this message
Sam_ (and-sam) said :
#1
Revision history for this message
peterzay (peterzay) said :
#2

I would prefer not to split any files. I am looking for an alternate file system to FAT32 that is portable and encryptable with the GUI Disk Utility available in System/Administration.

Revision history for this message
mycae (mycae) said :
#3

Use ext3 or ext34 -- as long as you don't need to move to a windows or mac machine, this should be fine.

http://techpad.co.uk/content.php?sid=97

Revision history for this message
mycae (mycae) said :
#4

er, ext4 that is, not ext34

Revision history for this message
peterzay (peterzay) said :
#5

A USB key formatted with ext4 is only recognized by the PC that created it. Another PC with the same OS can't read the flash drive. Have you tested ext3? Can you read it on any PC or just the creator PC?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

@peterzay: "A USB key formatted with ext4 is only recognized by the PC that created it. Another PC with the same OS can't read the flash drive."

That's amazing, since I frequently use ext4-formatted USB flash drives across multiple machines running Ubuntu and other GNU/Linux distributions (such that files on the same USB flash drive are read, written, and executed on multiple machines), and I have never had any problems.

Perhaps the problem you've experienced with ext4-formatted flash drives (which would equally affect flash drives formatted ext3, ext2, or with any other filesystem implementing Unix-style file permissions) is that:

(1) By default, only root has access, even to read files on the drive. You can change that by changing the permissions of the flash drive's root folder, or of whatever folder you want other users to be able to write to.

(2) Information about what user owns a file or folder doesn't necessarily translate from one machine to another, because the filesystem stores the user's ID number and not the user's name.

If you don't have untrusted users remotely logging into your machine, you can probably just make everything on the flash drive readable and writable by everyone. (Note also that the "executable" bit on a folder is what permits a user to go into the folder.) If you can read and write FAT16, FAT32, and NTFS drives without becoming root, then you'd just be making your ext2/ext3/ext4 flash drive act in a largely, though not entirely, similar way.

This information on Unix-style file permissions may be useful:
https://help.ubuntu.com/community/FilePermissions

Besides ext4, which is likely your best bet if you only need to read it on Linux-based operating systems, you might consider using NTFS. The NTFS-3G driver, which should be installed and ready to go by default on your Ubuntu 10.04 Lucid system, is extremely reliable and can read and write volumes with all versions of NTFS. The GParted Partition Editor can format a drive NTFS. As you probably know, NTFS is used natively by Windows, which can read and write to it. To the best of my knowledge, a factory Mac OS X system can read but not write to an NTFS volume (but see http://www.tuxera.com/products/tuxera-ntfs-for-mac/).

Revision history for this message
peterzay (peterzay) said :
#7

I have repeated my previous test of ext4 and also tested ext3. The creator machine is Ubuntu 10.04 while the receiving machine is Ubuntu 10.10.

Both flash drives are encrypted with Disk Utility from System/Administration.

When I plug the ext4 USB flash drive in, I get the following window:

Error
Unable to mount ext4
/dev/dm-0 is mounted

When I plug the ext3 USB flash drive in, I get the following window:

Error
Unable to mount ext3
/dev/dm-0 is mounted

Can anyone explain this and suggest a workaround?

Revision history for this message
peterzay (peterzay) said :
#8

Eliah,

You are correct. It is a permission issue. But it's not enough to just change permissions on the creator machine's USB key with:

chmod 777 -R /media/ext4/ (label is ext4 but can be anything)

You also have to change owner and group on the receiving machine USB key:

sudo chown peter -R /media/ext4/
sudo chgrp peter -R /media/ext4/

sudo chown root -R /media/ext4/lost+found (this is a reset back to root)
sudo chgrp root -R /media/ext4/lost+found (this is a reset back to root)

Then copy Backup folder from USB to home of receiving PC, then reset group, other from 77 to 50

chmod 750 -R /home/peter/Backup (folder Backup contains all backed up data)