1 *** THIS GUIDE IS INCOMPLETE ***
5 I have two 500 GB hard disks both having hammer file system. I want to create a master pfs in one of the hard disk and a slave pfs in the other disk. I want to mirror the data continuosly from the master pfs to the slave pfs. This will help me avoid long 'fsck'and raid parity rewrite times after an unclean shut down and also will give me a set up some what like Raid.
7 #Creating the master pfs on Disk 1
9 The hammer file systems on Disk 1 and Disk2 are mounted in '/etc/fstab' according to the following.
11 /dev/ad4s1h /Backup1 hammer rw 2 2
12 /dev/ad6s1h /Backup2 hammer rw 2 2
14 Go to the hammer file system on Disk 1. We will be creaing a master pfs called 'test' and will be mounting it using a null mount.
20 # hammer pfs-master /Backup1/pfs/test
21 Creating PFS #3 succeeded!
23 sync-beg-tid=0x0000000000000001
24 sync-end-tid=0x000000013f63be90
25 shared-uuid=b793b798-b3d2-11de-9bef-011617202aa6
26 unique-uuid=b793b7db-b3d2-11de-9bef-011617202aa6
30 snapshots dir for master defaults to <fs>/snapshots
34 Now the master pfs 'test' is created. make a note of its 'shared-uuid' because we will need to use that to create the Slave pfs for mirroring.
35 You can mount the pfs under the hammer file system on Disk 1 by doing the following.
39 Now Edit '/etc/fstab' to contain the following line.
41 /Backup1/pfs/test /Backup1/test null rw 0 0
43 Now mount the pfs by doing.
47 /Backup1/pfs/@@-1:00003 on /Backup1/test (null, local)
49 #Creating the slave pfs on Disk 2.
50 Note that we will be using the 'shared-uuid of the master pfs so enable mirroring.
53 # hammer pfs-slave /Backup2/pfs/test shared-uuid=b793b798-b3d2-11de-9bef-011617202aa6
54 Creating PFS #3 succeeded!
56 sync-beg-tid=0x0000000000000001
57 sync-end-tid=0x0000000000000001
58 shared-uuid=b793b798-b3d2-11de-9bef-011617202aa6
59 unique-uuid=2d3e3c9e-b3d7-11de-9bef-011617202aa6
64 snapshots directory not set for slave
66 The slave pfs is not mounted but a symlink is created in the root hammer file system to point to it.
68 # ln -s /Backup2/pfs/test /Backup2/test
70 lrwxr-xr-x 1 root wheel 17 Oct 8 12:07 /Backup2/test -> /Backup2/pfs/test
72 #Copying contents from pfs on Disk 1 to pfs on Disk2 to enable mirroring.
73 The pfs will be accessible only after the first 'mirror-copy' operation.
75 # touch /Backup1/test/test-file