Scratch File Tool

Filemanagers, partitioning tools, etc.
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#21 Post by greengeek »

Hi Scottman, I am trying to understand this better - would you say that the main purpose of a scratch file is to create a "virtual space" on a FAT or NTFS drive (which cannot normally retain Linux permissions) within which the permissions (and symlinks?) CAN be maintained correctly?

Are there other benefits you have found?
cheers!

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#22 Post by amigo »

Yeah, that's right. What he called a scratch file is simply a file which is mounted via the kernels loopback device -created explicitly with 'losetup' or with 'mount -t loop). This works with any file system. The file (formatted with a filesystem) resides on the 'host' filesystem as a a single item -the direntry function doesn't know anything about the content.
This all work fine on NTFS -even without ntfs-3g. The native read-write mode of the kernels ntfs driver could even handle this. The difficult thing is getting the file created on the NTFS in a sane way -which means that it will pass checkdisk. Of course, creating the file under windows would be best -but not really what we want. The kernel-native RW ntfs driver will not work nicely for this, ntfs-3g would be better for creating the new file on NTFS -and for mounting the device for later access to and mounting of the file with the loopback device. The file can be formatted to whatever you like.

Post Reply