LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2009, 11:15 AM   #1
Muidem
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
dd to image network drive


Howdy,

Let me try to explain my situation here. I've got a network drive with one Windows and one Linux partition on it. The only way I can access this drive is by mapping to it over the network in Windows or using mount in Linux.

The drive has a 32Gb capacity and the partitions are roughly evenly split in that space. I have an identical drive that we'd like to use as a duplicate. However, the two drives must be identical.

I had previously read about using dd to do a bit by bit drive image so I thought I'd give that a shot. I booted a backtrack4 live cd and mounted the drive like so.

Code:
mount -t smbfs //192.168.1.100/partition /mnt/networkdrive
The drive appears to mount correctly as I can browse around and see the files in that partition. Then I tried to use dd to copy an image of the drive to an external hard drive.

Code:
dd if=/mnt/networkdrive of=/mnt/externalhdd/NAS_image.img conv=noerror,sync
Now here is where the problems start. I expected this to take a few hours since this was a 32Gb drive. It ended up taking almost 24... and it only stopped after 200Gb because my external hard drive filled up. Obviously I've done something wrong here.

Having put some more thought into it, I also have some other concerns dealing with the partitions. I can only mount one of the partitions, but I need to make sure I copy both of them. Will my method work for copying both partitions? Additionally, why was the file size 200Gb+ for a small 32Gb drive?

Hopefully you guys can help me out here and sorry if anything I said was too offensively noobish.
 
Old 06-18-2009, 07:25 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
If you can boot the machine in GNU/Linux it's full well to copy off the contents over the network without requiring a share and without requiring an intemediate file if your objective is to write to another disk by either 0) combining dd with netcat or 1) dd with ssh (better disable compression) or 2) using save partitions across the network with partimage. As with all things GNU/Linux the choice is yours.
 
Old 06-18-2009, 09:23 PM   #3
ArkyMedia
LQ Newbie
 
Registered: Feb 2005
Location: Missouri
Distribution: Fedora Core 3 x86_64
Posts: 19

Rep: Reputation: 0
You can't image a cifs partition over the network with DD, as it is only capable of operating on block devices. The mount point is not a block device and cannot be directly copied.

The only real thing I can think of right off that you can do it simply copy all the files using CP to a local device and imaging that or something similar. CIFS abstracts the underlying filesystem, and that is the issue. (this is why a windows system can access a linux SMB share located on an unsupported EXT3, etc. filesystem.
 
Old 06-19-2009, 08:15 AM   #4
Muidem
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ArkyMedia View Post
You can't image a cifs partition over the network with DD, as it is only capable of operating on block devices. The mount point is not a block device and cannot be directly copied.

The only real thing I can think of right off that you can do it simply copy all the files using CP to a local device and imaging that or something similar. CIFS abstracts the underlying filesystem, and that is the issue. (this is why a windows system can access a linux SMB share located on an unsupported EXT3, etc. filesystem.
I see. Unfortunately for us, it's important that the filesystem stays intact. So basically what you're saying is that we're going to have to find some way to hook up the device locally (as a slave) so we can get at the filesystem?

Thanks for the responses!
 
Old 06-20-2009, 02:39 AM   #5
ArkyMedia
LQ Newbie
 
Registered: Feb 2005
Location: Missouri
Distribution: Fedora Core 3 x86_64
Posts: 19

Rep: Reputation: 0
ATAoE maybe? You would have to export a raw block device over ethernet. I was reading about ChironFS today, although it may or may not be applicable to your situation.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using dd and gzip to create hard drive image but image is bigger than hard drive? banz Linux - Software 3 11-22-2008 05:25 AM
Drive Failure - Restore from drive/partition image? dkuntz Linux - General 3 12-02-2006 02:35 AM
hard drive failing, how can I create an image of my drive? oily_rags SUSE / openSUSE 6 07-07-2005 03:19 PM
Creating/restoring drive image on USB drive OneSeventeen Linux - Newbie 9 07-06-2005 06:08 AM
ISO image of a network drive? Shade Linux - General 2 12-31-2003 05:58 AM


All times are GMT -5. The time now is 05:50 AM.

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