LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-24-2012, 05:14 PM   #1
Ulysses_
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
Truecrypt container on a network folder or cloud storage


Some people are putting their data on cloud storage using a truecrypt container, so the company providing the cloud storage cannot read the data.

It can even done with a large container file if dropbox is used, which has its own executable that ensures only changed parts of the container file are copied across.

If the container is stored on a standard NFS network folder, that some company provides for free, does the entire file have to be copied across when a few bytes are changed by truecrypt?

If the container is stored on an FTP folder somewhere, does the entire file have to be copied across when a few bytes are changed by truecrypt?

Can 50 files in one or more FTP servers be loop-mounted and LVM be added on top to make one big partition out of the loop mounts, so the logical LVM partition is spread over the 50 files, so a truecrypt container can be created on the LVM partition, so a change in one byte only copies across 1 file to 1 server?

Last edited by Ulysses_; 11-24-2012 at 05:18 PM.
 
Old 11-24-2012, 05:44 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
Quote:
Originally Posted by Ulysses_ View Post
If the container is stored on a standard NFS network folder, that some company provides for free, does the entire file have to be copied across when a few bytes are changed by truecrypt?
In that case you can use rsync for copying. rsync will only copy the changes.

Quote:
If the container is stored on an FTP folder somewhere, does the entire file have to be copied across when a few bytes are changed by truecrypt?
AFAIK, yes, you have to copy the whole file.

Quote:
Can 50 files in one or more FTP servers be loop-mounted and LVM be added on top to make one big partition out of the loop mounts, so the logical LVM partition is spread over the 50 files, so a truecrypt container can be created on the LVM partition, so a change in one byte only copies across 1 file to 1 server?
There seems to be a misconception here. You can't mount files, you only can mount filesystems. So, if you want to loop mount a container file it has to already have a filesystem.
 
Old 11-25-2012, 11:56 AM   #3
Ulysses_
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
Does C language's fopen() do a different thing on a local file and an NFS file then, ie in the latter case it copies the entire file from the remote folder to a local folder and returns the handle to the local copy of the file? What a waste, if NFS works this way.

Quote:
So, if you want to loop mount a container file it has to already have a filesystem.
Let's not get stuck on terminology, of course I meant files that are containers of filesystems. Is what I said possible or not?
 
Old 11-25-2012, 12:35 PM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,455

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by Ulysses_ View Post
Does C language's fopen() do a different thing on a local file and an NFS file then, ie in the latter case it copies the entire file from the remote folder to a local folder and returns the handle to the local copy of the file? What a waste, if NFS works this way.
You mean the system call open(), not C language's fopen(). But no, open()ing an NFS file does not copy the whole file from the remote server.


Quote:
Let's not get stuck on terminology, of course I meant files that are containers of filesystems. Is what I said possible or not?
As far as I can tell, LVM can't use mounted filesystems or files as physical volumes. Furthermore, I don't think you can loop-mount files that reside on a remote FTP server?
 
Old 11-25-2012, 01:05 PM   #5
Ulysses_
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
Quote:
Originally Posted by ntubski View Post
You mean the system call open(), not C language's fopen(). But no, open()ing an NFS file does not copy the whole file from the remote server.
What about fseek(1000000) followed by fgetc()? Will the entire file get copied across in order to get the one byte at position 1000000? I would expect as litle as possible to get copied across TO MEMORY somewhere, probably a sector or multiple of it, just like with local files.

Quote:
I don't think you can loop-mount files that reside on a remote FTP server?
Here's how files on an ftp server can be made to look as if they are local files:

http://www.ubuntugeek.com/how-to-mou...in-ubuntu.html

Quote:
As far as I can tell, LVM can't use mounted filesystems or files as physical volumes.
Is it just LVM or all similar concepts have the same limitation?

Last edited by Ulysses_; 11-25-2012 at 01:09 PM.
 
Old 11-25-2012, 01:39 PM   #6
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,455

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by Ulysses_ View Post
What about fseek(1000000) followed by fgetc()? Will the entire file get copied across in order to get the one byte at position 1000000? I would expect as litle as possible to get copied across TO MEMORY somewhere, probably a sector or multiple of it, just like with local files.
That's what I would expect as well.


Quote:
Here's how files on an ftp server can be made to look as if they are local files:

http://www.ubuntugeek.com/how-to-mou...in-ubuntu.html
Interesting. By the way, that article talks about curlftpfs, which has a comment in the code:
Code:
545 	// If we want to write to the file, we have to load it all at once,
546 	// modify it in memory and then upload it as a whole as most FTP servers
547 	// don't support resume for uploads.

Quote:
Is it just LVM or all similar concepts have the same limitation?
I guess it's theoretically possible to have something like a multi file loopback, but I don't know of any of the top of my head. A quick web search turned up some suggestions to use mdadm to create a RAID array over multiple loopback devices.

Last edited by ntubski; 11-25-2012 at 01:40 PM. Reason: grammar
 
Old 11-25-2012, 02:17 PM   #7
Ulysses_
Member
 
Registered: Jul 2009
Posts: 645

Original Poster
Rep: Reputation: 42
Loading the entire file is ok if it's only one of 50 small files.

Quote:
use mdadm to create a RAID array over multiple loopback devices.
Can an mdadm RAID array have 50 parts?
 
Old 11-25-2012, 03:50 PM   #8
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,455

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by Ulysses_ View Post
Can an mdadm RAID array have 50 parts?
Probably. Looking in the man page:
Quote:
Use the original 0.90 format superblock. This format limits arrays to 28 component devices and limits component devices of levels 1 and greater to 2 terabytes.
...

Use the new version-1 format superblock. This has fewer restrictions.
It doesn't say what the "fewer restrictions" are, but I assume they wouldn't raise the limit from 28 to just 50; I would guess it's now around 2^32 or something like that.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Truecrypt container - timestamp reverts after closing(?) taylorkh Linux - Software 2 03-29-2012 09:38 AM
mounting truecrypt container as non-admin user guna_pmk Linux - Software 1 01-17-2012 09:43 AM
cloud storage via ftp recneps_divad Linux - Networking 7 12-08-2011 12:01 AM
Can I edit a dbase in a Truecrypt container with 00base, under Ubuntu 8.04.1 64 bit? DeekBeek Linux - Software 1 08-09-2008 09:18 AM
Problems with folder permissions, and truecrypt. spicyed Linux - General 7 07-31-2008 12:27 PM


All times are GMT -5. The time now is 03:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration