[SlugLUG] When Bad Hard Drives Happen to Good Linuxes
Rohan Sheth
ronashet at ucsc.edu
Tue Oct 3 14:13:12 PDT 2006
On Tue, 2006-10-03 at 13:54 -0700, Peter Belew wrote:
> Hi - note:
>
> On 10/3/06, Eric Carter <Ecnassianer at greenstorm.net> wrote:
> > On 10/2/06, cerise at armory.com <cerise at armory.com> wrote:
> > >
> > > On Mon, Oct 02, 2006 at 12:14:06PM -0700, Eric Carter wrote:
> > >
> > > Put both drives in, dd if=/dev/$olddisk of=/dev/$newdisk conv=noerror,
> > > reboot, pull the old drive out[1], boot up again, run e2fsck on
> > > $newdisk. That
> > > ought to effectively duplicate the drive (including the bootsector and
> > > partitioning).
> > > I'd follow that up by consistency checking / on /dev/hdb, converting it
> > > to
> > > ext2 with tune2fs[2], and using parted to resize (and possibly extend) the
> > > now-ext2 filesystem. Add any other partitions you desire, then use
> > > tune2fs
> > > to change the / filesystem to an ext3 fs.
> > >
> > > -Phil/CERisE
> >
> >
> > This is the solution I'm looking for I think. I'll give it a try when the
> > new drive comes.
> >
> > [2] As far as I know, you cannot directly resize ext3 because of its
> > > journalling. As a result, you need to replay the journal and convert
> > > it
> > > to a resizable ext2 fs first. I could be wrong though. The way to
> > > find
> > > out would be to see if parted will resize it for you.
> >
> >
> > I hope ext3 can be resized. Doing stuff like converting partitions from one
> > type to another and back is the kind thing that generally unnerves me. (Be
> > it word processor documents or partitions, I'm always afraid the
> > conversion/process isn't really as lossless as it claims).
>
> The difference between ext2 and ext3 is the addition of journalling
> in ext3 - basically the conversion is just taking away the journalling.
> Apparently the resizing in parted doesn't know how to deal with
> the journalling (and I expect it would be difficult). Converting back
> to ext3 just rebuilds the journal structures. So it's not that scary.
>
> I'll let the experts chip in with their wisdom ... :)
>
> Peter
>
True, when you convert from ext3 to ext2 the journal file is simply
ignored. To ensure that it is rebuilt when you convert back, delete
the .journal file. It usually in the partition's mount point.
--Rohan
> >
> >
> > _______________________________________________
> > Sluglug mailing list
> > Sluglug at sluglug.ucsc.edu
> > http://sluglug.ucsc.edu/cgi-bin/mailman/listinfo/sluglug
> >
> >
> >
> _______________________________________________
> Sluglug mailing list
> Sluglug at sluglug.ucsc.edu
> http://sluglug.ucsc.edu/cgi-bin/mailman/listinfo/sluglug
More information about the Sluglug
mailing list