dwild+plug on Wed, 10 Jul 2002 06:11:51 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] dd and mount help


On Wed, 10 Jul 2002, Christopher Shanahan wrote:

> I'm using a machine running RH 7.3 with my own compiled kernel (2.4.18-5)
> with support added for various file systems. I'm sending my copy (or image)
> to a 26.1Gb logical partition (hdb7) on an 80Gb data-only hard drive. The
> hard drive I'm trying to copy is cabled as hdd. I addressed the reserved
> space on the partition (hdb7) using #tune2fs -m o /dev/hdb7 so I'm sure I'll
> have plenty of room for the image file. df says I have free space totaling
> 26.1Gb as I should. However, dd keeps ending prematurely at about 16.06Gb
> (as it has now four times) giving the error 'File size limit exceeded'. This
> I don't understand? There is nothing else on the 26.1Gb partition (hdb7).

Look at /usr/src/linux/Documentation/filesystems/ext2.txt, search for 
"Limitations" in the file.  You will find:
-----
Most of these limits could be overcome with slight changes in the on-disk
format and using a compatibility flag to signal the format change (at
the expense of some compatibility).

Filesystem block size:     1kB        2kB        4kB        8kB

File size limit:          16GB      256GB     2048GB     2048GB
Filesystem size limit:  2047GB     8192GB    16384GB    32768GB
-----

so, if you recreate the ext2 filesystem on /dev/hdb7 with:
   mke2fs -b 4096 -I 512 -m 0 -O sparse_super 

This will give you a 2TB file size limit (my guess is your ext2 filesystem 
is created with 1kB blocks which is causing your 16GB file size limit)

If things still don't work, try creating an XFS filesystem (if XFS isn't 
supported by redhat 7.3 you'll need the kernel patches from 
http://oss.sgi.com/projects/xfs)  .... try the ext2 blocksize first =)

> Command is:
> #dd if=/dev/hdd1 of=/mnt/Win9x/image.dd conv=noerror,sync 2
> /mnt/Win9x/image_error.txt (sorry for the word wrap)
> Output from ls -al is
> -rw-r--r--  1  root  root  17247252480  Date/Time  image.dd
> 17,247,252,480 / 1,073,741,824 = 16.06Gb
> 
> This is where I'm confused...

use /dev/hdd instead of /dev/hdd1 to make sure you get the entire disk 
(you will end up with an unmountable full-disk image once the 
destination filesystem's file size limit is addressed)  This image will 
have a partition table on it as well, just like the disk did.  You also 
may not want "sync" in your dd command, it may insert nulls and screw up 
your image's data.  For faster copying, try specifying a blocksize in your 
dd options (bs=1024K).

> I want to dd the entire hard drive (hdd not hdd1), not just the space
> containing a file system. And, mount is used to mount a 'file system' to a
> mount point on my machine. Wouldn't that make the free space not associated
> with a file system unreachable? If there is any? Do I have to mount the
> actual device (hdd) in order to use dd? If so, I can only mount hdd1 because
> that's the partition that contains the file system. I can't mount hdd (or
> can I?). Will dd image a device that isn't mounted to a file system on my
> machine?

you don't need to mount anything to use dd ... dd works off the device and 
doesn't need the kernel's filesystem support to work.

> I realize this may sound strange but the user really messed up the computer
> and now we're left with the task of trying to recover important data. Any
> suggestions would be greatly appreciated.
> TIA
> 
> --- Chris Shanahan
> 
> 
> ______________________________________________________________________
> Philadelphia Linux Users Group       -      http://www.phillylinux.org
> Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
> General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug
> 


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug