Re: Setting up gmirror

2008-10-01 Thread koberne [EMAIL PROTECTED]
Hello,

 I swear by gmirror, I had very good experience with it and will use it in the 
 future
 again. I just need to find some time to attach the two identical HDD's to my 
 via c7 system.

Actually, you don't need two identical HDD to make a gmirror. It's just 
important, that
the one, you add to the already created array, is not smaller. Some would also 
argue that
having two identical drives makes the array more prone, since they may fail 
identically.
This also happened to me once, and I lost data.

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


Re: mount_unionfs for jails

2008-09-25 Thread koberne [EMAIL PROTECTED]
Hello,

 Here is what I am trying to do:
 
 mount_unionfs -o below /usr/jails/basejail /usr/jail/jail1
 
 after I do that I edit /usr/jail/jail1/etc/rc.conf and add the appropriate
 entries to the host system rc.conf, but when I start the jail it starts
 using the settings from /usr/jails/basejail.

I have the same setup and it works for me.

 Is my mount_unionfs syntax wrong, is this a bug in unionfs (man page says
 unionfs is broken, but doesn't specify how its broken) or is this expected
 behavior?

It shouldn't be wrong. I have this in my fstab:

/jail/base   /jail/spl/nejcspl   unionfs rw,noatime,below 0   0

(noatime option is completely optional, of course.)

But, if I were you, I would update the RELEASE to STABLE. This will also fix
some bugs in unionfs. However at least some other bugs still aren't fixed in 
7-STABLE
to this day (most notably the socket bug, which prevents mysql from running in 
a jail
and writing socket file to /tmp/mysql.sock), so we had to MFC the patch from
HEAD manually. If you need the patch, let me know.

However, I don't suggest running jails on top of unionfs where you need
decent stability (i.e. in production). I am writing thesis at the moment which
also covers this topic. We also stumbled upon these issues:

- socket file bug, mentioned before, still present in 7-STABLE, no ideas
  when it will be MFCed;

- mv bug (see freebsd-fs archives for August 2008, me and my friend posted
  a few posts there) which causes troubles when moving directories (files
  would appear as gone and then reappear again) which exist or don't exist
  on lower and upper levels;

- another mv bug which I discovered yesterday and seems to be very strange
  and hard to replay - I didn't even mess with the lower level, it seems that
  also just the upper layer can behave strangely sometimes (erros like
  mv: invalid argument when simply trying to move a big (10 GB) directory -
  the error was gone after I restarted the jail (i.e. also remounting the
  unionfs);

- strange behaviour of some applications (apache in my case) not seeing the
  lower layer (/etc/hosts most notably) - we had to do touch (and then copy
  to all jails on change) on files we _really_ need to be visible. However,
  after we fscked our partition with unionfs directories, we weren't able
  to reproduce this error;

- UFS filesystem would get to inconsistent state (we don't know exactly when)
  so some commands would behave strangely and fsck (see above) is needed in
  single user mode;

- _most notably_: there hasn't been a single reply to our unionfs related
  problem reports and posts to freebsd-fs list. So I guess that people who
  are in charge for unionfs in FreeBSD aren't really responsive and that
  the future of unionfs in FreeBSD isn't really bright. It's a pity, though,
  since this is a very useful feature, especially for jailed systems. However,
  hope remains, that things will be fixed at least in 8.0 if not in 7.1.

So, you can see that there are (still) many issues with unionfs on FreeBSD.
Please let me know if you are able to solve your problem. Or else we can make
this list a little longer. :)

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


Re: mount_unionfs for jails

2008-09-25 Thread koberne [EMAIL PROTECTED]
Hello,

 Well, it turns out that my problem was due to a typo in my host systems
 rc.conf.

Thought so.

 Do you know if there is a way to reset the unionfs? I did notice this:

It is called whiteout. When you delete the file which is on lower layer
in unionfs, you actually create a file of type whiteout on the upper layer,
which tells you that the file is not there. So it is a mark for a deleted file.
To reset it, you just need to delete the whiteout. You can do this via
rm -W. Actually whiteouts seem to be a nice solution but sometimes you'll
run into interesting problems. When you try to upgrade jails, for example.
Also, the problem is, because very few programs support whiteouts, for
example find utility doesn't know about them, so you have to reimplement
it (we made a shell script).

We have created a lot of scripts which can do a lot of stuff with jails and
unionfs on our server. If you are interested, let me know.

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


Re: growisofs non aligned DMA transfer (7.0R)

2008-09-12 Thread koberne [EMAIL PROTECTED]
Hey,

 I wanted to add a file to an already written DVD+RW (written a day
 before on the same system) with
 
 # growisofs  -M /dev/cd0 -r -T -J -joliet-long -v directory
 
 This produced tons of error messages via syslog as
 
 Jul 11 13:45:30 rebelion kernel: ata0: FAILURE - non aligned DMA transfer 
 attempted
 Jul 11 13:45:30 rebelion kernel: acd0: setting up DMA failed
 
 and the only way to get the system back to a usable state was rebooting
 it;
 
 this is with FreeBSD-7.0R; what I have done wrong?

I have the same problem on all my 7.0-RELEASE servers (I use growisofs to make 
backups
to DVDs). It seems that there was something done in 7 kernel that breaks 
growisofs
when trying to use multisession.

Any ideas when/if this will be fixed?

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


Re: File system corruption upon reboot with gmirror

2008-09-08 Thread koberne [EMAIL PROTECTED]
Hello,

 Afaic this only happens on a power loss or otherwise unclean shutdown
 but I used the reboot command from the shell (in a background (sleep

Don't use reboot, use shutdown -r now. I also had the same problem once
(had to get physical access to the box to fix it) and it was because of
the reboot.

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