Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Hot answers tagged

20

I will address some of the aspects of FreeBSD jails and Linux Docker, of how they are similar and how they are different. both serve the same goal: it's an implementation of lightweight virtualization, when you run application in a separated and isolated compartment under same kernel, and here the similarities end, and differences begin Docker is a tool ...


10

Those numbers are obviously bogus. Your SSD doesn't have that many sectors at all, let alone offline uncorrectable ones. Check for firmware updates for your SSD that will fix the problem. Otherwise, ignore it. If you're really paranoid, you could replace the drives, but in that case you should use different drives, not the same brand from the same ...


5

Let's look into source code, as it's the best documentation in the world of open source. net/ipv4/tcp_diag.c: if (sk->sk_state == TCP_LISTEN) { r->idiag_rqueue = sk->sk_ack_backlog; r->idiag_wqueue = sk->sk_max_ack_backlog; } else { r->idiag_rqueue = max_t(int, tp->rcv_nxt - tp->copied_seq, 0); r->idiag_wqueue ...


5

camcontrol reprobe da0 will reprobe. after that I only needed: zpool online -e tank da0


4

The support for OpenJDK 11 is being worked on. As for running Oracle (Linux) Java - it is possible, but this JRE is unstable. For instance, installing MATLAB using it crashes the installer randomly during the process. However, your mileage may wary. EDIT: Ports for OpenJDK 11 and 12 have been added to the tree. See java/openjdk11 and java/openjdk12.


4

"NASware" is just WD marketing speak for drive firmware they claim to have optimized for use in NAS devices. There is no specific action you need to take beyond just using the drive normally. However, you may wish to create your zpool with ashift=12 to ensure that it is aligned on 4K sector boundaries.


4

Use of shutdown requires a privileged account. From freebsd.org's documentation: One must be root or a member of operator in order to run shutdown(8). If the user has sudo rights, you can forbid access to shutdown, reboot, poweroff and halt by modifying /etc/sudoers something like this: username ALL=(ALL:ALL) ALL, !SHUTDOWN or %groupname ALL=(ALL:...


4

Alright... Let's attempt an answer to this question. The setup and master/skeleton directories The "root" directory of the jail system is /home/j. It contains 3+ subdirectories: /home/j/ |- mroot/ # The master (read-only) root directory |- skel/ # The master (read-write) directory |- js/ # Each jail will have a subdirectory ...


4

It looks like you're in a pager, such as less or more. Try pressing the q key (a mnemonic for Quit).


3

I don't have answers for 1-3, only some additional information about Infiniband(IB) applications that may help you find the answer. I can answer 4 though. 1) What are my connectivity options? The primary purpose is sharing data -- is NFS my only choice, or does FreeBSD have something Infiniband-specific? 2) If it is NFS, does it have to be over IP, ...


3

Put this line into the rc.conf. Time will be synced when you start the system and/or when you (re)start ntpd. ntpd_sync_on_start="YES" This parameter causes "ntpd" to start with option "-g" (see /etc/rc.d/ntpd), (see man ntpd) -g, --panicgate. Allow the first adjustment to be Big. This option may appear an unlimited number of times. Normally, ntpd ...


2

There are many ways to run jails, virtual interfaces are one thing but with jails you can borrow just a particular IP address to the underlying system. Of course layer2 either should be allowed or limited to such jail (default it is limited). That way only single MAC address is used. Another way is to use bridges with virtual interfaces/vlans or firewall ...


2

First of all you have to install the port tree: portsnap fetch extract That will take some time. Then you have to move to the root of ports: cd /usr/ports Now you are able to search for the software you need. Do not look for the auxiliary software that called dependencies - look directly for those software you really need: make search name=samba48 ...


2

First you have to choose if you want info@domain1.com to be a different address vs info@domain2.com: I assume you do, otherwise you wouldn't need Postgresql in the picture. The second step is to tell Postfix where to find information on domains and email accounts: it looks like you want to use Postgresql instead of a local text file (see http://www.postfix....


2

From the FreeBSD man: -h The system is halted at the specified time. -p The system is halted and the power is turned off (hardware sup- port required) at the specified time. I believe you need shutdown -p now.


2

Check that the canmount property is set to on, and not to noauto or off. If you see this, you have a problem: # zfs get canmount zroot/usr/home/<username> NAME PROPERTY VALUE SOURCE zroot/usr/home/<username> canmount noauto default Fix it with: # zfs set canmount=on zroot/usr/home/<username> You may also ...


2

Aha, now the problem is obvious: relayhost = $mydomain You have configured Postfix to deliver all mail to $mydomain, which is set to localdomain. Your narrative indicates you meant to be relaying mail to Gmail, so your relayhost should be set to the appropriate Google hostname for that purpose, e.g.: relayhost = [smtp-relay.gmail.com]:25 or relayhost ...


1

ezjail covers the use-case you described. To answer your question: How you deal with rolling upgrades? Let me quote from FreeBSD Handbook 14.6.2. Initial Setup: To Populate the Jail with installworld The basejail can be installed from binaries created by buildworld on the host with ezjail-admin update ... installworld is executed, installing the host'...


1

Both of the comments to your post are on the right track. Here is a more fully fledged response. (TL;DR at bottom) As root, start by making a safety copy of your /etc/mail directory: # cd /etc # cp -Rp mail mail.safety For the purposes of this example, I'm going to assume that you have no customizations to your email configuration, and in fact, we'll ...


1

Default scan frequency is 3 seconds, you can set it with --emperor-freq. From uwsgi-docs: emperor-freq argument: required_argument parser: uwsgi_opt_set_int help: set the Emperor scan frequency (default 3 seconds) You have in uwsgi log [uWSGI] getting INI configuration from myapplication.ini and that means emperor loads your application. This log ...


1

df only shows mount points. When you run it on a directory that contains multiple files or directories, it shows the mount point where that file or directory resides. Once for every file. That's why you get the same mount point multiple times, once for every file of your list that resides on that mount point. Quote from the man page: df displays the ...


1

After a few hours looking at the source code and clever google'ing, I stumbled upon hard to find solution: Source: https://forum.opnsense.org/index.php?topic=9690.msg44232#msg44232 Step 6 is a bit unclear. You need to change the appropriate service (IPsec, Captive Portal, Web Proxy, OpenVPN or web GUI) to use the TOTP server. For the web GUI the ...


1

Add your public key to the postgresql users authorized keys file. This doesn’t happen during the init phase of your instance like with the root and freebsd user (cloud providers use scripts that do things like deploying ssh keys to a set of predefined users). This can be the same as the freebsd public key or you can use a different keypair for that purpose.


1

You have 'zfs_enable="YES"' in /etc/rc.conf right? This is what mounts all datasets at boot, it basically runs zfs mount -a to mount all ZFS datasets


1

You can select users with specific group from list of all users given by pw utility: pw usershow -P -a | grep groupname Result will be something like: Login Name: username1 #1024 Group: groupname #1002 Login Name: username2 #1025 Group: groupname #1002


1

Disregarding system scripts like getent, users can be in a group in two ways: either it is their principal group, defined in /etc/passwd, or they have it as a secondary group in /etc/groups. GROUPID=1000 sed -rn "s/^[^:]*:[^:]*:$GROUPID://p" < /etc/group | tr ',' '\n' sed -rn "s/^([^:]*):[^:]*:[^:]*:$GROUPID:.*/\\1/p" < /etc/passwd Should do it ...


1

I was able to attach the new disk booting into the single-user mode and using the same attach command. The order of how disks appeared in the system was the same. Using attach with the guid retrieved by the zdb command gave the same error. Still could not understand why the command would not work in the multi-user mode.


1

This is what zpool labelclear is for. The disk still has ZFS metadata on it indicating that it is part of a zpool, because you removed the disk without telling ZFS about it first. To resolve the problem, use zpool labelclear -f <device>. This will wipe the ZFS labels from the device so that it can be used in another pool. -f is required when the ...


1

Thank you for your help. Alas none of the above suggestions would work for me. After much reading and experimentation I found had to add the -r (to activate the regex) before the -i and this is the format I used for the regex, which seems to work. sed -r -i '' '/^120[.]152[.][0-9]{1,3}[.][0-9]{1,3}/d' /path/to/some/file to remove the ip 120.152.35.192 ...


1

I just did a detach like this and it worked ! zpool detach storage c9t24d1 And c9t24d1 was a hot spare that I just add to one of my mirror because I tough we had no drive available to replace a failed one. After putting a new drive in my spool before the hot spare finish resilvering, I just detach my spare to stop the silvering process and it work. After ...


Only top voted, non community-wiki answers of a minimum length are eligible