NetBSD-Docs archive

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

16.3.8. Migrating System to RAID


from time to time I have to migrate a system to RAIDframe and since this
is not a daily task I often forget every step and have to reread chapter
16 of the NetBSD guide.

Every time I do this, the following pax(1) example confuses me:

        16.3.8. Migrating System to RAID

        The new RAID filesystems are now ready for use. We mount them under /mnt
        and copy all files from the old system. This can be done using dump(8)
        or pax(1).

        # mount /dev/raid0a /mnt
        # df -h /mnt
        Filesystem    Size     Used     Avail Capacity  Mounted on
        /dev/raid0a   9.0G     2.0K      8.6G     0%    /mnt
        # cd /; pax -v -X -rw -pe / /mnt

Since the rw-synopsis of pax goes something like:

        pax -r -w (...) [file ...] directory

users will use pax with a `cd'-prefix and a `.' as file in the common
case when one wants to copy the content of a directory into another

So I'm pretty sure that the following two versions would be a better

        # pax -v -X -rw -pe / /mnt


        # cd /; pax -v -X -rw -pe . /mnt

When multiple partitions have to be migrated the latter example may save
you some man pax reading since it's more intuitive:

        # mount /dev/raid0a /mnt/root
        # mount /dev/raid0e /mnt/usr
        # mount /dev/raid0f /mnt/var
        # mount /dev/raid0g /mnt/home

        # cd /;     pax -v -X -rw -pe . /mnt/root
        # cd /usr;  pax -v -X -rw -pe . /mnt/usr
        # cd /var;  pax -v -X -rw -pe . /mnt/var
        # cd /home; pax -v -X -rw -pe . /mnt/home



Home | Main Index | Thread Index | Old Index