(no commit message)
[ikiwiki.git] / docs / howtos / howto_reinstall_hammer / index.mdwn
1 [[!toc]]
2 # Scenario
3 I have got a 250GB SATA harddisk with DragonFlyBSD 2.3.2 32-bit installed on it. 
4
5 Actually I want to repartition my harddisk in order to install other OSes besides DragonFly, so for that I need to shrink the current installation size. Above all, I would like my system just like it is now.
6
7 Although several methods could be used, as this is a HAMMER installation, I'm going to use HAMMERS's mirror-{read,write} capabilities.
8 This assumes you cannot store the PFSs in another HAMMER disk so that you have to store physical data compressed in files that can be put in any share you have.  
9 Here I will be using a NFS share.
10
11 # Pre-steps
12 ## HAMMER version
13 You should check that your HAMMER version is at least 2 (NORM    2.3 - New directory entry layout).
14
15     smash64# hammer version /
16     min=1 wip=3 max=2 current=2 description="2.3 - New directory entry layout"
17     available versions:
18         1   NORM    2.0 - First HAMMER release
19         2   NORM    2.3 - New directory entry layout
20
21 If not, you would have to use hammer version-upgrade. See [hammer(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer&section=8) for details.
22
23 ## LiveCD
24 You will need a DragonFlyBSD LiveCD in order to perform steps for the new installation. Release 2.4.0 or later is recommended.
25 Download the ISOs from [here](http://www.dragonflybsd.org/mirrors/).
26
27
28 # Saving the data
29 At this point you should have a place ready to store all the compressed files you are going to generate.
30 Mine is this:
31
32     smash64# df -h /mnt/pfs
33     Filesystem                 Size   Used  Avail Capacity  Mounted on
34     dualsmash:/home/data/pfs   364G   235G   111G    68%    /mnt/pfs
35     smash64#
36
37 So we can start saving all our data:
38     
39     smash64# cd /mnt/pfs
40
41     smash64# hammer mirror-read / | gzip -3 -c > root.gz
42     histogram range 0000000000000000 - 000000129a02c4b0
43     Mirror-read: Mirror from 0000000000000000 to 000000129a02c4b0
44     smash64#
45
46     smash64# hammer mirror-read /var | gzip -3 -c > var.gz
47     histogram range 0000000000000001 - 000000129a02c4f0
48     Mirror-read: Mirror from 0000000000000001 to 000000129a02c4f0
49     Mirror-read /var succeeded
50     smash64#
51
52     smash64# hammer mirror-read /tmp | gzip -3 -c > tmp.gz
53     histogram range 0000000000000001 - 000000129a02c790
54     Mirror-read: Mirror from 0000000000000001 to 000000129a02c790
55     Mirror-read /tmp succeeded
56     smash64#
57     
58     ....
59
60
61 # Reinstalling
62 # Restoring the data
63 # Fixing the configuration
64 # Booting
65
66
67