NetBSD-Users archive

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

Re: How to change a disk?

Michael van Elst --> netbsd-users (2009-08-30 08:22:06 +0000):
> (Water NB) writes:
> >I do:
> >1) add the bigger disk to my system.
> >2) power on, disklabel it, newfs it
> >3) mount it to /newdisk
> >4) copy all files
> >cp -rp /usr /newdisk
> >cp -rp /etc /newdisk
> >...
> >5) power off and get rid of the old disk
> >any more to do?
> You need to use fdisk too, so that the BIOS understands the disk.
> Also, you probably want to replicate the partition structure from
> your old disk (and size them on the new disk differnetly).
> cp does only copy regular files, you have to use 'dump' and 'restore'
> to move the data.

While dump and restore surely work fine, `cp -Rp' should do the job as
well (the -r option should indeed not be used for this task, at least
according to the manpage).  But my favourite is pax(1):

$ pax -rw -pe /usr /newdisk
$ ...

Regards, Jukka

This email fills a much-needed gap in the archives.

Home | Main Index | Thread Index | Old Index