Get fsfreeze in Ubuntu

Bug #712689 reported by Ahmed Kamal
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Won't Fix
Undecided
Unassigned
Precise
Fix Released
Undecided
Scott Moser

Bug Description

Binary package hint: util-linux

Please get the "fsfreeze" tool in Ubuntu. Current util-linux package does not include it

fsfreeze is a tool to suspend access to a filesystem (Linux Ext3/4, ReiserFS, JFS, XFS) using Linux's standard API for freezing mountpoints
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fcccf502540e3d7

This can be quite useful for performing backups

Revision history for this message
Scott Moser (smoser) wrote :

I pulled fsfreeze from current HEAD of util-linux (git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git 260d3cf7f30c) and put that into util-linux. Then built, and tried running it.

First, I did:
$ sudo fsfreeze --freeze / ; sudo fsfreeze --unfreeze /
I hoped that the second would get run after the first, and even if i lost keyboard input or something I'd still unfreeze.

Instead, the system completely froze.
Then, after rebooting, I tried:
$ mount /dev/sda8 /mnt
$ sudo fsfreeze /mnt

The same thing happened.

So, I'm all for getting 'fsfreeze' and its function into Ubuntu (and ideally natty), but it seems like it isn't as trivial as just grabbing 2 files.

Revision history for this message
Scott Moser (smoser) wrote :

If you want to test, but not build, I uploaded to my ppa also: https://launchpad.net/~smoser/+archive/ppa

Revision history for this message
TomaszChmielewski (mangoo-wpkg) wrote :

Note that you shouldn't use fsfreeze on a filesystem where there is lots of IO - notably, rootfs (/).

If you do so, all programs write-accessing it will be "frozen" as well, which could explain your system freeze.

Try doing it on a filesystem which is not the main one, like /boot, or similar (i.e. /var/lib/mysql, if it's a separate partition).

If "sudo fsfreeze --freeze / ; sudo fsfreeze --unfreeze /" is expected to freeze the system hard is a different question - perhaps someone should ask on a linux-fsdevel or similar mailing list.

http://vger.kernel.org/vger-lists.html#linux-fsdevel

Dave Walker (davewalker)
Changed in util-linux (Ubuntu Oneiric):
status: New → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in util-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Moser (smoser) wrote :

just for the record, on precise:
 $ dpkg -S /sbin/fsfreeze
util-linux: /sbin/fsfreeze
 $ dpkg-query --show util-linux
util-linux 2.19.1-2ubuntu3

Additionally, on an EC2 t1.micro instance of 'ami-410bc128' (us-east-1/ebs/ubuntu-precise-daily-amd64-server-20111212'), I just did:
$ sudo sh -c 'date; fsfreeze --freeze /; fsfreeze --unfreeze /; date'
Mon Dec 12 22:15:23 UTC 2011
Mon Dec 12 22:15:23 UTC 2011
ubuntu@ip-10-202-206-73:~$ uname -r
3.2.0-4-virtual
ubuntu@ip-10-202-206-73:~$ cat /proc/version_signature
Ubuntu 3.2.0-4.10-virtual 3.2.0-rc5

Then, just for fun
$ sudo apt-get clean
$ sudo sh -c 'apt-get update > /tmp/apt.log & sleep 2 ; date; fsfreeze --freeze /; fsfreeze --unfreeze /; date'
Mon Dec 12 22:19:27 UTC 2011
Mon Dec 12 22:19:27 UTC 2011

I redirected to /tmp/apt.log to show additional fs writes going on, and also to make output prettier. (otherwise the 'date' output is mixed with the apt output).

So, to me, this is fix-released.

Changed in util-linux (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

I just verfied this is also functioning on released oneiric image
$ sudo sh -c 'apt-get clean; apt-get update >/tmp/apt.log & sleep 2; date; fsfreeze --freeze /; echo $?; fsfreeze --unfreeze /; echo $?; date'
Mon Dec 12 22:34:33 UTC 2011
0
0
Mon Dec 12 22:34:33 UTC 2011

$ lsb_release -c
Codename: oneiric
$ cat /etc/cloud/build.info
build_name: server
serial: 20111211

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.