3 I have got a 250GB SATA harddisk with DragonFlyBSD 2.3.2 32-bit installed on it.
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.
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.
12 ## Upgrade HAMMER version
13 You should check that your HAMMER version is at least 2 (NORM 2.3 - New directory entry layout).
15 smash64# hammer version /
16 min=1 wip=3 max=2 current=2 description="2.3 - New directory entry layout"
18 1 NORM 2.0 - First HAMMER release
19 2 NORM 2.3 - New directory entry layout
21 If not, you would have to use hammer version-upgrade. See [hammer(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=hammer§ion=8) for details.
24 At this point you should have a place ready to store all the compressed files you are going to generate.
27 smash64# df -h /mnt/pfs
28 Filesystem Size Used Avail Capacity Mounted on
29 dualsmash:/home/data/pfs 364G 235G 111G 68% /mnt/pfs
32 So we can start saving all our data:
35 smash64# hammer mirror-read / | gzip -3 -c > root.gz
36 histogram range 0000000000000000 - 000000129a02c4b0
37 Mirror-read: Mirror from 0000000000000000 to 000000129a02c4b0
40 smash64# hammer mirror-read /var | gzip -3 -c > var.gz
41 histogram range 0000000000000001 - 000000129a02c4f0
42 Mirror-read: Mirror from 0000000000000001 to 000000129a02c4f0
43 Mirror-read /var succeeded
46 smash64# hammer mirror-read /tmp | gzip -3 -c > tmp.gz
47 histogram range 0000000000000001 - 000000129a02c790
48 Mirror-read: Mirror from 0000000000000001 to 000000129a02c790
49 Mirror-read /tmp succeeded
54 # Fixing the configuration