Re: Curious failure of ZFS snapshots

2008-11-29 Thread Pete French
> It's not file system on-disk structure fault, as far as I understand,
> because reboot fixes it. I belive it's how you access the snapshots.

I was about to say "a reboot doesnt fix it for me" - as I swear i tried
that before, but I have discovered you are right, as I just rebooted the
server and it is fine.

Here is what I am doing - this script is run with an argument '7am' or '7pm'
once per day. the mysql database is a slave replication from a master,
so there is a continuous trickle of data into it. The symbolic
links are there so you can connect to the mysql server and access
'xxx-7am' or 'xxx-7pm' to get a previous version of database 'xxx'.
In case its not obvious, the filesystem 'tank/zfs' is mounted on the
director '/var/db/mysql'. If you run this for a few cycles it should
preseumably break for you too.

-pete.

---

#!/bin/sh

SUFFIX=$1
FS_NAME=tank/mysql
DB_DIR=/var/db/mysql

# First we should make sure we are root
if test `/usr/bin/whoami` != "root"
then
/bin/echo You must be root to run this script
exit
fi

# Check that we have a suffix
if test "${SUFFIX}" = ""
then
/bin/echo "usage: $0 "
exit
fi

# Stop mysql, unlink the links and destroy the snapshot
/usr/local/etc/rc.d/mysql-server stop > /dev/null
/bin/rm -f ${DB_DIR}/*-${SUFFIX}
/sbin/zfs destroy [EMAIL PROTECTED]

# Create the new (dated) snapshot
/bin/date > ${DB_DIR}/SNAPSHOT_DATE
/sbin/zfs snapshot [EMAIL PROTECTED]
/bin/rm -f ${DB_DIR}/SNAPSHOT_DATE

# Find all mysql subdirectories and link them
/usr/bin/find ${DB_DIR}/ -name '[a-z]*' -type d -maxdepth 1 -print | while read 
DIR
do
BASE_DIR=`/usr/bin/basename ${DIR}`
/bin/ln -s ${DB_DIR}/.zfs/snapshot/${SUFFIX}/${BASE_DIR} 
${DIR}-${SUFFIX}
done

# Restart mysql
/usr/local/etc/rc.d/mysql-server start > /dev/null

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Curious failure of ZFS snapshots

2008-11-29 Thread Pawel Jakub Dawidek
On Sat, Nov 29, 2008 at 01:01:18PM +, Pete French wrote:
> > Is there a way for me to reproduce that?
> 
> I am not sure how to reproduce it, as I am unclear as to what
> causes is. I have two machines making regular snapshots, one of which
> ends up in this state, and one which doesnt. The only difference is
> that the one which goes wwrong is actually trying to access the snapshots,
> whereas the other is a backup machine where they just sit there.
> 
> What I can try and do is to setup a small system to try and reproduce the
> bug on a small file backed zfs system, aandd then maybe email you the
> failed image if I can get it to fail. Would that be of any use ?
> The current failed image is about 50GB, so I dont have an easy way to
> send you that. Is an image of a filesystem with the problem actualll of
> any use to you anywway ?

It's not file system on-disk structure fault, as far as I understand,
because reboot fixes it. I belive it's how you access the snapshots.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
[EMAIL PROTECTED]   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgpmfMYVHIn38.pgp
Description: PGP signature


Re: eeebox and FreeBSD notes

2008-11-29 Thread Joel Dahl

Luigi Rizzo skrev:

for what it is worth, i have put some notes on using
FreeBSD on the EEE Box.

http://info.iet.unipi.it/~luigi/FreeBSD/eeebox.html

Most things work, the one big remaining issue is
configuring X11 so that it recognises non standard resolutions
e.g. 1680x1050 or similar using the "intel" driver.


I bought one of these last week but it hasn't arrived yet.  Looks like 
an interesting machine.  If you manage to find a xorg.conf that works 
with the correct resolution and the intel driver, could you add that to 
your notes as well?


--
Joel
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gmirror and gstripe

2008-11-29 Thread Nenhum_de_Nos

On Wed, November 19, 2008 10:39 am, Bartosz Stec wrote:
> Nenhum_de_Nos pisze:
>> hail,
>>
>> I have an old AthlonXP 1700+ running 7-STABLE:
>>
>> FreeBSD xxx 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Thu Nov 13 23:54:59
>> BRT 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/xxx i386
>>
>> where I have two 750GB Seagate SATA Disks. They are divided as two slices,
>> around the first 120GB are gathered in gmirror, and what left is in
gstripe. so that's whats going on. if the machine locks, and fsck comes
to
>> make its job, the box just gets slower and slower till I have to reset it
>> the hard way. to make it not lock after just 5 minutes I have to boot and
>> umount the "arrays", and then run fsck_ufs on them. so this way I can have
>> the box running again.
>>
> Did you mean that machine slows down while doing background fsck? If
yes, problem is probably related to snapshot which is created, and
background fsck is done on snapshot.
>
>> as I can't count on no power outage till the end of days, what can I do ?
>>
>>
> You may just disable background fsck and do it manually in single user
mode in that case just by typing fsck -y.
>> i just recompiled stable to make it stop this, but no go here ...
>>
>> this is an AthlonXP as said, running on EPoX kt600 based board, sata I is
>> from via southbridge and 1GB of RAM. just another 40GB disk to the system.
>>
>> thanks,
>>
>> matheus
>>
> If I am correct, your problem is old known and mksnap_ffs related.
Jeremy Chadwick wrote a lot about it:
> http://wiki.freebsd.org/JeremyChadwick/Commonly_reported_issues
>
> Good luck.
>
> --
> Bartosz Stec

some news:

my router+file server got stuck with a usb 2.5" hdd enclosure and I had to
hard reboot. when it got uo again, I got this:

fsync: giving up on dirty
0xc43ec678: tag devfs, type VCHR
usecount 1, writecount 0, refcount 678 mountedhere 0xc4388b00
flags ()
v_object 0xc14291f0 ref 0 pages 2700
 lock type devfs: EXCL (count 1) by thread 0xc45e9220 (pid 1719)
dev mirror/mirror0

but afaik, the files are there. so I question, is it yet safe to use
gmirror for my files integrity sake ?

is there anything I may be doing wrong to cause this ? what can I help to
help fix this ?

thanks,

matheus

-- 
We will call you cygnus,
The God of balance you shall be

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Curious failure of ZFS snapshots

2008-11-29 Thread Pete French
> Is there a way for me to reproduce that?

I am not sure how to reproduce it, as I am unclear as to what
causes is. I have two machines making regular snapshots, one of which
ends up in this state, and one which doesnt. The only difference is
that the one which goes wwrong is actually trying to access the snapshots,
whereas the other is a backup machine where they just sit there.

What I can try and do is to setup a small system to try and reproduce the
bug on a small file backed zfs system, aandd then maybe email you the
failed image if I can get it to fail. Would that be of any use ?
The current failed image is about 50GB, so I dont have an easy way to
send you that. Is an image of a filesystem with the problem actualll of
any use to you anywway ?

-pete.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Curious failure of ZFS snapshots

2008-11-29 Thread Pawel Jakub Dawidek
On Fri, Nov 21, 2008 at 08:16:35AM -0800, Freddie Cash wrote:
> On November 21, 2008 06:41 am Gerrit Kühn wrote:
> > On Fri, 21 Nov 2008 15:15:18 +0100 Gerrit Kühn
> > <[EMAIL PROTECTED]> wrote about Re: Curious failure of ZFS
> > snapshots:
> >
> > GK> Right now 3 of them are fine, and one is showing the same problem
> > you GK> described:
> > GK>
> > GK> mclane# ll /tank/home/pt/.zfs/
> > GK> ls: snapshot: Bad file descriptor
> > GK> total 0

Is there a way for me to reproduce that?

> Which shell are you using?  I've seen quite a few 
> different "non-existent"/"invalid directory" errors when using tcsh to 
> navigate through the .zfs/ hierarchy.  Can do "cd ..", "ls .", or tab 
> completion when in anything under .zfs/

This was a bug in ZFS and is fixed in HEAD.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
[EMAIL PROTECTED]   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgp7nRCQF31Eu.pgp
Description: PGP signature


Re: MFC ZFS: when?

2008-11-29 Thread Pawel Jakub Dawidek
On Fri, Nov 21, 2008 at 06:58:51PM -0500, Zaphod Beeblebrox wrote:
> In several of the recent ZFS posts, multiple people have asked when this
> will be MFC'd to 7.x.  This query has been studiously ignored as other
> chatter about whatever ZFS issue is discussed.
> 
> So in a post with no other bug report or discussion content to distract us,
> when is it intended that ZFS be MFC'd to 7.x?

I can't give you the date yet, simply because its too early to judge how
stable the new ZFS is. The amount of code changes is really huge.
The ZFS functionality is also huge (which is good for the users, not so
good for me) and I'm simply unable to test entire thing. While I was
working on ZFSv13 port I started working on regression tests as well
(you can find some in tools/regression/zfs/) so I could have more
automated testing. Eventhough I implemented 2850 tests, it not even
covers entire zpool(8) functionality.

All in all. People are using ZFS in production, but not only them won't
be happy to lose their data, so I'm not going to MFC ZFS until I'm
convinced the new one is at least not worse than the old one. To speed
up this process everyone is very welcome to try ZFS on HEAD and report
results (both bad and good).

The current plan is to have new ZFS in 7.2. For this to happen, some
other changes have to be MFCed too, like *at() syscalls, etc.

I hope this helps to understand what's going on.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
[EMAIL PROTECTED]   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgpsEI5ugytRN.pgp
Description: PGP signature