aboutsummaryrefslogtreecommitdiff
path: root/sbin/hastctl
Commit message (Collapse)AuthorAgeFilesLines
* For functions that return -1 on failure check exactly for -1 and not forPawel Jakub Dawidek2012-01-101-9/+9
| | | | | | | | | any negative number. MFC after: 3 days Notes: svn path=/head/; revision=229945
* Spelling fixes for sbin/Ulrich Spörlein2012-01-071-1/+1
| | | | Notes: svn path=/head/; revision=229778
* Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignmentDimitry Andric2011-12-191-0/+1
| | | | | | | | | | warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and there they can be safely ignored. MFC after: 1 week Notes: svn path=/head/; revision=228712
* Revert r226726. The line was not duplicated.Pawel Jakub Dawidek2011-10-251-0/+1
| | | | | | | | Spotted by: pluknet MFC after: 3 days Notes: svn path=/head/; revision=226731
* Remove duplicated line.Pawel Jakub Dawidek2011-10-251-1/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=226726
* Prefer PJDLOG_ASSERT()/PJDLOG_ABORT() over assert().Pawel Jakub Dawidek2011-09-271-6/+5
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=225785
* When exiting with error because of an invalid command line argumentMikolaj Golub2011-07-131-3/+3
| | | | | | | | | use errx(3), not err(3), and the exit code from sysexits(3). Approved by: pjd (mentor) Notes: svn path=/head/; revision=223976
* Compile hastd and hastctl with capsicum support.Pawel Jakub Dawidek2011-06-271-0/+1
| | | | | | | X-MFC after: capsicum merge Notes: svn path=/head/; revision=223586
* Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSHPawel Jakub Dawidek2011-05-231-0/+11
| | | | | | | | | | | | | | requests as well as number of activemap updates. Number of BIO_WRITEs and activemap updates are especially interesting, because if those two are too close to each other, it means that your workload needs bigger number of dirty extents. Activemap should be updated as rarely as possible. MFC after: 1 week Notes: svn path=/head/; revision=222228
* Currently we are unable to use capsicum for the primary worker process,Pawel Jakub Dawidek2011-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | because we need to do ioctl(2)s, which are not permitted in the capability mode. What we do now is to chroot(2) to /var/empty, which restricts access to file system name space and we drop privileges to hast user and hast group. This still allows to access to other name spaces, like list of processes, network and sysvipc. To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict access to process table, network (we use ip-less jails) and sysvipc (if security.jail.sysvipc_allowed is turned off). This provides much better separation. MFC after: 1 week Notes: svn path=/head/; revision=221899
* Fix assert messages.Mikolaj Golub2011-04-261-2/+2
| | | | | | | Approved by: pjd (mentor) Notes: svn path=/head/; revision=221074
* Remove hast_proto_recv(). It was used only in one place, whereMikolaj Golub2011-04-171-1/+1
| | | | | | | | | | | hast_proto_recv_hdr() may be used. This also fixes the issue (introduced by r220523) with hastctl, which crashed on assert in hast_proto_recv_data(). Suggested and approved by: pjd (mentor) Notes: svn path=/head/; revision=220744
* hastd(8) maintains a map of dirty extents, not hastctl(8). Fix this.Mikolaj Golub2011-04-101-2/+2
| | | | | | | | Approved by: pjd (mentor) MFC after: 3 days Notes: svn path=/head/; revision=220520
* Forgot to commit this as part of r219873.Pawel Jakub Dawidek2011-03-221-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=219884
* When dropping privileges prefer capsicum over chroot+setgid+setuid.Pawel Jakub Dawidek2011-03-211-2/+1
| | | | | | | | | | | | We can use capsicum for secondary worker processes and hastctl. When working as primary we drop privileges using chroot+setgid+setuid still as we need to send ioctl(2)s to ggate device, for which capsicum doesn't allow (yet). X-MFC after: capsicum is merged to stable/8 Notes: svn path=/head/; revision=219847
* Forgot to commit this as a part of r219818.Pawel Jakub Dawidek2011-03-211-1/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=219821
* In command line options allow size to be specified using k/M/G/TMikolaj Golub2011-03-132-25/+9
| | | | | | | | | | suffixes. Approved by: pjd (mentor) MFC after: 1 week Notes: svn path=/head/; revision=219620
* Print some of the numbers in human readable form (using %N).Pawel Jakub Dawidek2011-03-071-6/+10
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=219373
* - Turn on printf extentions.Pawel Jakub Dawidek2011-03-071-2/+3
| | | | | | | | | | | | | - Load support for %T for pritning time. - Add support for %N for printing number in human readable form. - Add support for %S for printing sockaddr structure (currently only AF_INET family is supported, as this is all we need in HAST). - Disable gcc compile-time format checking as this will no longer work. MFC after: 2 weeks Notes: svn path=/head/; revision=219370
* Allow to compress on-the-wire data using two algorithms:Pawel Jakub Dawidek2011-03-061-1/+2
| | | | | | | | | | | | | | - HOLE - it simply turns all-zero blocks into few bytes header; it is extremely fast, so it is turned on by default; it is mostly intended to speed up initial synchronization where we expect many zeros; - LZF - very fast algorithm by Marc Alexander Lehmann, which shows very decent compression ratio and has BSD license. MFC after: 2 weeks Notes: svn path=/head/; revision=219354
* Allow to checksum on-the-wire data using either CRC32 or SHA256.Pawel Jakub Dawidek2011-03-061-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=219351
* Drop privileges after connecting to hastd, but before sending or receivingPawel Jakub Dawidek2011-02-031-0/+5
| | | | | | | | | anything. MFC after: 1 week Notes: svn path=/head/; revision=218215
* Add missing argument after r218192.Bjoern A. Zeeb2011-02-021-1/+1
| | | | Notes: svn path=/head/; revision=218201
* Add functions to initialize/finalize pjdlog. This allows to open/close logPawel Jakub Dawidek2011-01-271-0/+1
| | | | | | | | | file at will. MFC after: 1 week Notes: svn path=/head/; revision=217965
* Fix some more warnings found by clang.Rebecca Cran2010-11-221-0/+1
| | | | Notes: svn path=/head/; revision=215704
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whileJoel Dahl2010-08-161-1/+1
| | | | | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> Notes: svn path=/head/; revision=211397
* Update the arguments to yy_config_parse() to match r210883.Doug Barton2010-08-061-1/+1
| | | | | | | | Choose the more conservative option ('yes' to exit on error) to match the equivalent code in hastd. Notes: svn path=/head/; revision=210909
* Fix typo.Pawel Jakub Dawidek2010-07-291-1/+1
| | | | | | | | | PR: docs/149033 Submitted by: Kolar <hsn@sendmail.cz> MFC after: 3 days Notes: svn path=/head/; revision=210628
* mdoc: move remaining sections into consistent orderUlrich Spörlein2010-05-131-14/+14
| | | | | | | | | | This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections. Found by: mdocml lint run Reviewed by: ru Notes: svn path=/head/; revision=208028
* Fix compilation with WITHOUT_CRYPT or WITHOUT_OPENSSL options.Pawel Jakub Dawidek2010-04-221-2/+7
| | | | | | | | Reported by: Andrei V. Lavreniyuk <andy.lavr@reactor-xg.kiev.ua> MFC after: 3 days Notes: svn path=/head/; revision=207070
* Remove redundant WARNS?=6 overrides and inherit the WARNS setting fromUlrich Spörlein2010-03-021-1/+0
| | | | | | | | | | | the toplevel directory. This does not change any WARNS level and survives a make universe. Approved by: ed (co-mentor) Notes: svn path=/head/; revision=204596
* Please welcome HAST - Highly Avalable Storage.Pawel Jakub Dawidek2010-02-183-0/+779
HAST allows to transparently store data on two physically separated machines connected over the TCP/IP network. HAST works in Primary-Secondary (Master-Backup, Master-Slave) configuration, which means that only one of the cluster nodes can be active at any given time. Only Primary node is able to handle I/O requests to HAST-managed devices. Currently HAST is limited to two cluster nodes in total. HAST operates on block level - it provides disk-like devices in /dev/hast/ directory for use by file systems and/or applications. Working on block level makes it transparent for file systems and applications. There in no difference between using HAST-provided device and raw disk, partition, etc. All of them are just regular GEOM providers in FreeBSD. For more information please consult hastd(8), hastctl(8) and hast.conf(5) manual pages, as well as http://wiki.FreeBSD.org/HAST. Sponsored by: FreeBSD Foundation Sponsored by: OMCnet Internet Service GmbH Sponsored by: TransIP BV Notes: svn path=/head/; revision=204076