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

Re: Replacing Dying Harddisk (ReiserFS)



On Tue, 2004-12-21 at 22:51 +0100, Christian wrote:
> Am Dienstag, 21. Dezember 2004 22:16 schrieb Ron Johnson:
> > On Sun, 2004-12-19 at 15:33 +0100, Christian wrote:
> > > Am Sonntag, 19. Dezember 2004 14:36 schrieb Darryl Clarke:
> > > > Hi,
> >
> > [snip]
> >
> > > Make a filesystem on the new partition (i'd choose reiserfs or ext3)
> > >  mkfs -t reiserfs /dev/sda1
> > >
> > > Mount the new filesystem
> > >  mount /dev/sda1 /mnt/new_disk
> > >
> > > Copy the whole old disks contents to the new disk and preserve all file
> > > attributes
> > >  cp -a / /mnt/new_disk
> >
> > This has failed for me, with symlink issues.
> >
> > Say the original drive /dev/hda is partitioned into :
> >   hda1 /
> >   hda2 /usr
> >
> > Because of /etc/alternatives, there are symlinks between hda1 and
> > hda2.  So, if you cp hda1 to sda1 and hda2 to sda2, the symlinks
> > will still be pointing to the hda partitions.  Thus, when you
> > umount, all the inter-partition symlinks will be broken.
> 
> I think I missed something. The -x option to "cp" namely. 
>  cp -ax / /mnt/new_disk
> 
> I currently don't understand what you mean with symlink issues (this should 
> _not_ sound rude, i'm not a native english speaker). The only disadvantage I 
> can think of is that hardlinked files will be seperated. One can only avoid 
> this by using a filesystem dump utility. 
> Symlinks should not make any problems if the path to the linked to file does 
> not change. (Even if the partitioning scheme changes there should be no 
> problems as long as the mount point is the same)

The issue is that links are automagically updated by the cp command.

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
PGP Key ID 8834C06B I prefer encrypted mail.

"The one function that TV news performs very well is that when
there is no news we give it to you with the same emphasis as if
it were."
David Brinkley

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: