Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Backing Up a journaled FS

233 views
Skip to first unread message

Odhiambo Washington

unread,
Dec 29, 2014, 3:30:07 AM12/29/14
to
I hope everyone enjoyed their foods & drinks during Christmas:)

Now, being new to 10-RELEASE, things continue to amaze me, but I attribute
that to my slowness in understanding 10.

I have been used to 8.x and below so much that when changes started getting
into 9.x and into 10.x I was simply overwhelmed. Now it's biting.

I have a server I installed with two identical disks. I used BSD labels
instead of GPT and I had it a little rough creating my slices, because I am
used to a situation where I only created / amd swap for such servers
because it made life easy for me during backup. I would completely wipe all
data on the second disk every Saturday, via a cron, and write it with data
from the primary/running/active disk as a means of backup. Not so dandy but
works quite fine anyway.

Now I have gotten to a point where I am stopped in my tracks because I
cannot do dump/restore on a journaled fs:


root@mail:/ # mount
/dev/ada0a on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/ada1a on /disk2 (ufs, local, journaled soft-updates)
fdescfs on /dev/fd (fdescfs)

root@mail:/ # df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0a 446G 6.5G 403G 2% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ada1a 446G 32M 410G 0% /disk2
fdescfs 1.0K 1.0K 0B 100% /dev/fd

root@mail:/ # ls -al /disk2/
total 32840
drwxr-xr-x 3 root wheel 32768 Dec 22 16:28 .
drwxr-xr-x 20 root wheel 1024 Dec 26 16:30 ..
drwxrwxr-x 2 root operator 512 Dec 22 16:28 .snap
-r-------- 1 root wheel 33554432 Dec 22 16:28 .sujournal

root@mail:/ # grep dump /scripts/backup_primary_disk.sh
/sbin/dump -L0af - / | (cd /disk2/; restore -rf - )

root@mail:/ # /sbin/dump -L0af - / | (cd /disk2/; restore -rf -)
mksnap_ffs: Cannot create snapshot //.snap/dump_snapshot: /: Snapshots are
not yet supported when running with journaled soft updates: Operation
not supported
dump: Cannot create //.snap/dump_snapshot: No such file or directory

Tape is not a dump tape
root@mail:/ #


So, do I have to disable the journaling option from the FS, or is there a
better way to achieve the same result with journaling still on?






--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
"I can't hear you -- I'm using the scrambler."
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Polytropon

unread,
Dec 29, 2014, 4:33:35 AM12/29/14
to
On Mon, 29 Dec 2014 11:29:13 +0300, Odhiambo Washington wrote:
> So, do I have to disable the journaling option from the FS, or is there a
> better way to achieve the same result with journaling still on?

If you want to use dump/restore, you will probably have
to do one of the following things:

a) boot into single user mode and mount / read-only,
then run dump, or

b) probably a bad idea, but you _could_ (technically)
run "mount -fur /" and then run dump, afterwards
running "mount -fuw /".

Note that disabling the journaling option also requires
that the partition is _not_ in use, which means, it is
unmounted; see "man tunefs" for details.

Otherwise, using something different from dump/restore
could work better in your situation, maybe using cpio,
tar, or cpdup. You'd have to verify that file attributes
are also being copied 1:1, which is what dump/restore
is actually good at. In worst case, you could use dd
(like "dd if=/dev/ada0 of=/dev/ada1 bs=1m"), but even
if this will surely work, make sure that _no_ writing
is performed on the disk while reading.



--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

RW

unread,
Dec 29, 2014, 12:21:48 PM12/29/14
to
On Mon, 29 Dec 2014 11:29:13 +0300
Odhiambo Washington wrote:

> I hope everyone enjoyed their foods & drinks during Christmas:)
>
> Now, being new to 10-RELEASE, things continue to amaze me, but I
> attribute that to my slowness in understanding 10.
>
> I have been used to 8.x and below so much that when changes started
> getting into 9.x and into 10.x I was simply overwhelmed. Now it's
> biting.
>
> I have a server I installed with two identical disks. I used BSD
> labels instead of GPT and I had it a little rough creating my slices,
> because I am used to a situation where I only created / amd swap for
> such servers because it made life easy for me during backup. I would
> completely wipe all data on the second disk every Saturday, via a
> cron, and write it with data from the primary/running/active disk as
> a means of backup. Not so dandy but works quite fine anyway.
>
> Now I have gotten to a point where I am stopped in my tracks because I
> cannot do dump/restore on a journaled fs:

Strictly speaking I think you can, you just can't use the -L option.
Whether not you want to dump without a snapshot is up to you.

> So, do I have to disable the journaling option from the FS, or is
> there a better way to achieve the same result with journaling still
> on?

Just in case you're not aware, all the journalling does is to help
fsck recover unused blocks and inodes without doing a proper check
or running a background fsck. It doesn't provide any extra protection
against data loss, some of us have found SU + foreground fsck to be
more reliable than either SU+J or SU + background fsck.

I had a lot of trouble with SU+J and switched back to gjournal
partitions, I think they do support snapshots. In your position I
think I'd go for ZFS and have it keep two copies of everything.

markham breitbach

unread,
Dec 29, 2014, 1:50:40 PM12/29/14
to

On 2014-12-29 10:21 AM, RW wrote:
> I had a lot of trouble with SU+J and switched back to gjournal
> partitions, I think they do support snapshots. In your position I
> think I'd go for ZFS and have it keep two copies of everything.
> _______________________________________________
>
Hi There,

I have been using SU+J for quite a while in a non-critical production
system and I have not had any problems with it, so I am planning on a
wider deployment for some upcoming upgrades. I am curious to know what
sorts of problems you have had with it.

Thanks,

-Markham

Boris Samorodov

unread,
Jan 2, 2015, 7:34:02 AM1/2/15
to
29.12.2014 12:33, Polytropon пишет:

> Note that disabling the journaling option also requires
> that the partition is _not_ in use, which means, it is
> unmounted; see "man tunefs" for details.

From TUNEFS(8):
-----
The tunefs utility cannot
be run on an active file system. To change an active file system, it
must be downgraded to read-only or unmounted.
-----

I.e. read-only is enough and it really works (tested at 10.1-i386 a few
days ago).

--
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

0 new messages