> Date: Sun, 04 Nov 2012 21:13:36 +0900 (JST) > To: freebsd-stable_at_freebsd.org > Subject: Re: SU+J on 9.1-RC2 ISO > From: HATANO Tomomi <hatanou_at_infolab.ne.jp> > Cc: jdc_at_koitsu.org, b.smeelen_at_ose.nl, fnwhitehorn_at_freebsd.org, > freebsd-current_at_freebsd.org > > Hi all. > > The point is: > > There is completely no way to take a snapshot of SU+J partition > unless modify one's kernel. > > Whether some issue still exist or not, > how about enabling snapshoting SU+J partition > through sysctl variable? > > Would you mind to see patch attached? > > 1. Taking a snapshot of SU+J partition is controlled through sysctl variable. > > 2. Default to disable. > One who want to enable it should set the variable manually. > > 3. The default value in bsdinstall(8) may be left as is. > -- > HATANO Tomomi. > > --- src/sys/ufs/ffs/ffs_snapshot.c.orig 2012-11-04 11:01:58.000000000 +0900 > +++ src/sys/ufs/ffs/ffs_snapshot.c 2012-11-04 11:13:32.000000000 +0900 > _at__at_ -182,8 +182,10 _at__at_ > */ > int dopersistence = 0; > > -#ifdef DEBUG > #include <sys/sysctl.h> > +int snapsuj = 0; > +SYSCTL_INT(_debug, OID_AUTO, snapsuj, CTLFLAG_RW, &snapsuj, 0, ""); > +#ifdef DEBUG > SYSCTL_INT(_debug, OID_AUTO, dopersistence, CTLFLAG_RW, &dopersistence, 0, ""); > static int snapdebug = 0; > SYSCTL_INT(_debug, OID_AUTO, snapdebug, CTLFLAG_RW, &snapdebug, 0, ""); > _at__at_ -230,7 +232,7 _at__at_ > * At the moment, journaled soft updates cannot support > * taking snapshots. > */ > - if (MOUNTEDSUJ(mp)) { > + if (MOUNTEDSUJ(mp) && (snapsuj == 0)) { > vfs_mount_error(mp, "%s: Snapshots are not yet supported when " > "running with journaled soft updates", fs->fs_fsmnt); > return (EOPNOTSUPP); > Snapshots are disabled when using SU+J for a reason. That reason is that the journal rollback when a snapshot is active on a filesystem DOES NOT WORK. It leaves your filesystem with duplicate blocks that can only be removed by manually running fsck and correcting the duplicate block entries by hand. If you need to use snapshots, then run with SU and not SU+J. When journal rollback properly handles snapshots, snapshots on SU+J will be enabled. Kirk McKusickReceived on Wed Dec 05 2012 - 09:14:30 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC