Ext3 to NTFS - transfering data | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Ext3 to NTFS - transfering data

UNIX for Dummies Questions & Answers


Tags
ext3, fdisk, mount, ntfs, transfer

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-27-2010
huntreilly25 huntreilly25 is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 11 November 2010, 2:30 PM EST
Location: Staten Island, NY
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
Ext3 to NTFS - transfering data

Alright so here is my problem:
I have an ext3 external hard drive with about 270gb of data that needs to be copied/transferred to a NTFS drive.
The NTFS drive has data currently on it...which obviously needs to stay intact.
My supervisor mentioned that this problem could be a little tricky so I just have a few things i'm wondering to see if I can find the right direction to go.
I'm assuming that simply mounting the NTFS drive and moving the files to the corresponding /mnt drive would serve no purpose...or would possibly not be allowed?
Should I be thinking about creating an ext3 partition on the NTFS drive to copy my data to?
based on what i've been doing recently I am assuming that my supervisor wants me to use this method:
gather the files in the ext3 drive with tar, compress those files using gzip, then move the files to the NTFS drive, uncompress, and extract.
just as a quick example i am assuming that this:

Code:
tar cf - /dev/sdb1/scott | tar -C /dev/sdc1/ -xf -

or something similar would not work, otherwise my supervisor would not have said this was tricky. (Note: sdb1 is the ext3 drive and sdc1 is the NTFS drive)

plus, since my supervisor recently had me learning about mount and fdisk I am guessing that I may be needing to use these commands. I'm just not exactly sure what is possible and what is not allowed in this case(as far as Linux goes)
Sponsored Links
    #2  
Old 10-27-2010
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 30 October 2014, 5:35 PM EDT
Location: Southern NJ, USA (Nord)
Posts: 4,473
Thanks: 8
Thanked 549 Times in 526 Posts
I guess you mount the ntfs to /somewhere/ (an existing, empty directory) and "cp -p" your data files, or "cp -rp" your directories and their subtrees, into an appropriate directory on /somewhere/.
Sponsored Links
    #3  
Old 10-27-2010
huntreilly25 huntreilly25 is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 11 November 2010, 2:30 PM EST
Location: Staten Island, NY
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
but would those files actually be saved to the hard drive once the drive is unmounted? or can you only view and access files that are mounted and not necessarily edit or add to them?
    #4  
Old 10-27-2010
Praveen_218 Praveen_218 is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 30 October 2014, 1:56 PM EDT
Location: Linux Machines @Mumbai & Bangalore
Posts: 165
Thanks: 7
Thanked 28 Times in 26 Posts
Quote:
Originally Posted by huntreilly25 View Post
Alright so here is my problem:
I have an ext3 external hard drive with about 270gb of data that needs to be copied/transferred to a NTFS drive.
The NTFS drive has data currently on it...which obviously needs to stay intact.
My supervisor mentioned that this problem could be a little tricky so I just have a few things i'm wondering to see if I can find the right direction to go.
I'm assuming that simply mounting the NTFS drive and moving the files to the corresponding /mnt drive would serve no purpose...or would possibly not be allowed?
Should I be thinking about creating an ext3 partition on the NTFS drive to copy my data to?
based on what i've been doing recently I am assuming that my supervisor wants me to use this method:
gather the files in the ext3 drive with tar, compress those files using gzip, then move the files to the NTFS drive, uncompress, and extract.
just as a quick example i am assuming that this:

Code:
tar cf - /dev/sdb1/scott | tar -C /dev/sdc1/ -xf -

or something similar would not work, otherwise my supervisor would not have said this was tricky. (Note: sdb1 is the ext3 drive and sdc1 is the NTFS drive)

plus, since my supervisor recently had me learning about mount and fdisk I am guessing that I may be needing to use these commands. I'm just not exactly sure what is possible and what is not allowed in this case(as far as Linux goes)
This would work as it is, so long you have additional spaces in your NTFS drive to accomodate ext3 drives data; assuming you have this, just try the sequence of commands only (ofcourse, its trickey but not that much you are assuming -you will have the correct data in your NTFS drive :


Code:
]# mkdir /mnt/ext ; mkdir /mnt/ntfs
]# mount -t ext3 /dev/sdb1 /mnt/ext
]# mount -t ntfs /dev/sdc1 /mnt/ntfs
]# mkdir /mnt/ntfs/ext3_data
]# cp -xR /mnt/ext/* /mnt/ntfs/ext3_data/
]# sync
]# umount /mnt/ntfs ; umount /mnt/ext

Your data will be properly copied into the ext3_data directory under the ntfs drive; ofcourse the conversion of data format from ext3 to ntfs would be handled by the corresponding filesystems kernel modules. What you'd, get at the end, -your pure data uncorrupted

You may also chose to copy of the entire ext3 disk image onto your ntfs drive too, use the following:


Code:
]# mkdir /mnt/ntfs
]# mount -t ntfs /dev/sdc1 /mnt/ntfs
]# mkdir /mnt/ntfs/ext_data
]# dd if=/dev/sdb1 of=/mnt/ntfs/ext_data/ext3.img bs=512 count=<size_of_data> / 512

Here with the count flag takes an argument as a number you get as a divide the total ext3 drive's capacity to 512.

At the end, what you get is not the pure data rather its a disk copy as a backup onto your ntfs drive, this disk image is a file which would be saved as an ntfs file over the ntfs drive. In this case, to get your data, you need to do the following:

Code:
]# mount -o loop -t ext3 /mnt/ntfs/ext_data/ext3.img /mnt/ext

Here you can access your data inside the /mnt/ext directory.

Cheers!!!
The Following User Says Thank You to Praveen_218 For This Useful Post:
huntreilly25 (11-03-2010)
Sponsored Links
    #5  
Old 10-27-2010
huntreilly25 huntreilly25 is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 11 November 2010, 2:30 PM EST
Location: Staten Island, NY
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
k , i found simply using piped tar commands works, example:

Code:
tar cf - /mnt/ext/data/ | tar -C /mnt/ntfs/ -xf -

However, takes forever because, after all, I am trying to transfer around 270gb.
If I were to pipe through gzip and then gunzip is there an argument (like the -C in tar) where I can tell gunzip to uncompress in a specific directory?
Sponsored Links
    #6  
Old 10-27-2010
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 30 October 2014, 5:35 PM EDT
Location: Southern NJ, USA (Nord)
Posts: 4,473
Thanks: 8
Thanked 549 Times in 526 Posts
Well, 270 gb takes a while to write, no free lunch. You could leave it compressed and write less, if you can figure how to access it on the other side -- zip files suggest themselves, being explorable, windows having compressed folders and with files clickable to open.

cp -rp to a mount would do a cpio pass for you. If the mount is over the network, it would be even slower!

With SAMBA, you can leave the data in place and let them access it on UNIX.

Solaris has a neat ClientFS that is nfs with local caching on hard disk. You start off a little slow, but then all the files re-accessed are on the local hard drive. Ditto for local mods flowing back to the NFS volume. They do not recommend high writes, but it looks like you could turn off updates during the day and then turn them on later for bulk updating.

Plan9 OS from AT&T Belll Labs had hierarchical storage, where every hard drive was a cache for the optical WORM. Never had to ask people to clean their dirs again.
Sponsored Links
    #7  
Old 11-03-2010
huntreilly25 huntreilly25 is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 11 November 2010, 2:30 PM EST
Location: Staten Island, NY
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
Praveen,
just got around to taking a look at what you wrote and it's been very helpful!
Thanks
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
CentOS and XP dualboot + ext3/ntfs mount apra143 Red Hat 19 07-09-2009 10:22 AM
Mounting ext3 & NTFS on PC-BSD!! void_man() BSD 1 09-19-2007 06:17 AM
Transfering files vbs UNIX for Dummies Questions & Answers 5 06-25-2002 11:24 PM
Transfering a window to another screen Reza Nazarian UNIX for Dummies Questions & Answers 3 10-23-2001 02:56 AM



All times are GMT -4. The time now is 02:15 AM.