NetBSD-Users archive

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

Re: How to change a disk?

on 08/30/2009 10:46 AM Jukka Salmi wrote the following:
> 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
> $ ...
How about
rsync -aH --delete source_dir/ target_dir/
(however, I don't know if all these options available in linux are also
available in the netbsd version of rsync ...)

Home | Main Index | Thread Index | Old Index