[PC-BSD Testing] Backing up a PC-BSD disk
odhiambo at gmail.com
Mon Nov 1 07:39:33 PDT 2010
On Mon, Nov 1, 2010 at 5:28 PM, Kris Moore <kris at pcbsd.org> wrote:
> On Mon, Nov 01, 2010 at 12:49:47PM +0300, Odhiambo Washington wrote:
> > I installed PC-BSD (FreeBSD option) on a disk on which I only created /
> > (ufs+journal) and swap.
> > >From the handbook (
> > http://www.freebsd.org/doc/en/articles/gjournal-desktop/article.html), I
> > still unable to tell how much space the PC-BSD installer allocated for
> > journal provider, which according to my understanding, resides on the
> > partition as the data.
> > Is the journal size defaulting to 1GB as the handbook says, or does the
> > installer use a different value?
> > [wash at gw ~]$ df -h
> > Filesystem Size Used Avail Capacity Mounted on
> > /dev/label/rootfs0 273G 9.8G 242G 4% /
> > devfs 1.0K 1.0K 0B 100% /dev
> > devfs 1.0K 1.0K 0B 100% /var/named/dev
> > I am so much used UFS2 type filesystem where I create / and swap and I'd
> > always get an identical size disk for backup. The backup would take the
> > form:
> > dump -L0af - / | (cd /disk2; restore -rf -) # And this is disk
> > to me, so I can use disk2 as primary disk should disk one fail.
> > When it comes to ufs+journal, I am a bit lost on how to do things right
> > I need to make a second disk (disk2) to have same partition layout as
> > 1.
> > Suppose both disks are 320GB, can I use dd to create the duplicate
> > structure, with journaling enabled??
> > dd if=/dev/adX of=/dev/adY bs=1m
> > But if you tell me that the PC-BSD installer allocated 1GB for the
> > then I can follow the handbook instructions to partition my disk
> > accordingly. However, given that the installer mounted /dev/label/rootfs0
> > /, I am not sure what will be the name of my filesystem on disk2 when I
> > create it from the CLI. I'd love to partition as follows:
> > gw# bsdlabel -A /dev/ad4
> > bsdlabel: /dev/ad4: no valid label found
> > Since I am unable to read the disk label of the first disk, I am not
> > how to go about creating a similar label on disk2. I thought I could read
> > out the disk label on disk1 and just write that to disk 2.
> > Secondly, I am not sure how I can backup the first disk onto disk2 using
> > dump once I have done the labels.
> > --
> > Best regards,
> > Odhiambo WASHINGTON,
> > Nairobi,KE
> > +254733744121/+254722743223
> > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> > Damn!!
> > _______________________________________________
> > Testing mailing list
> > Testing at lists.pcbsd.org
> > http://lists.pcbsd.org/mailman/listinfo/testing
> Personally when I do a backup / clone to another drive, I prefer to just
> use "tar" to backup
> all the files individually, and then re-create the partitions on the new
> disk fresh, since geom may
> be different between them, etc.
> So, heres how I would do it:
> # cd /
> # tar cvjf /usr/myback.tbz --exclude ./usr/myback.tbz --exclude ./dev .
> Then format / mount the new disk somewhere, like /mnt, and extra the
> # cd /mnt
> # tar xvpf /usr/myback.tbz
> Then if you partitioned correctly, you should be able to boot right off the
> new disk :)
What is the disadvantage of using dump|restore after partitioning correctly?
Anyway, you did not answer my question, or I haven't understood your point.
I understand the disk geometry may differ, but I only use dump after
partitioning, in which case I believe only files are written over, and
nothing to do with geom, right?
How can I duplicate my disk1 - the one I presented - and still ensure the
result I get has journaling enabled?
I am looking at a situation where, if disk one failed, I could simply
disconnect it, connect disk 2 into the same channel and boom!
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Testing