The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘*nix’ Category

Nice diskinfo alias showing du, df, btrfs, parted, lsblk

Posted by jpluimers on 2016/05/20

I bumped into a disk full issue again because of the btrfs/snapper combination in openSuSE and df basically lying about the disk space, so I w rote this Nice diskinfo alias showing du, df, btrfs, parted, lsblk.

You can combine this with A bash script to btrfs snapshot details like disk sizes (requires btrfs quota to be enabled) to find out which snapper snapshots take up a truckload of space and might be safely removed.

–jeroen

via: How can a partition be full if du does not show it is? (via: linux – Super User) #OpenSuSE #btrfs #snapshots « The Wiert Corner – irregular stream of stuff.

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

Latest Tumbleweed distribution update likely kills sshd

Posted by jpluimers on 2016/05/03

After a recent big update to OpenSuSE Tumbleweed, I could not ssh into my system any more.

Symptoms

The ssh client side would report a Read from socket failed: Connection reset by peer which I misinterpreted as the sshd not running at all.

Luckily the server is a VM, so I could reach the console. There I saw this:

sshd trying to load files it shouldn't

sshd trying to load files it shouldn’t

The files should not be loaded as they are not specified in the sshd_config file:

dsa and ecdsa not specified in the config file

dsa and ecdsa not specified in the config file

So I knew something was broken. After reading some messages in the forums.opensuse.org I got at Bug 977812 – sshd killed by SIGSYS on client connection

The cause

As usual with such issues the cause seems a combination of factors:

And we have the culprit, I believe: together with the glibc upgrade, openssl
was updated from 1.0.2g-1.1 to 1.0.2-2.12 which brought, among others, patch
openssl-urandom-reseeding.patch.

Temporary fix

A temporary fix is to comment out a line in /etc/sshd_config so you get this diff:

-UsePrivilegeSeparation sandbox # Default for new installations.
+# UsePrivilegeSeparation sandbox # Default for new installations.

Be sure to undo this as soon as you’ve received a final fix.

Final fix

A final fix is being fast-tracked so it appears in Tumbleweed soon.

I will report after deployment of [opensuse-factory] New Tumbleweed snapshot 20160502 released! as I think it contains the fix.

Aftermath

I already knew about openQA: Test summary which lists the builds, but not the changes in the builds.

Reading through Information Board or the like for Tumbleweed I found the openSUSE Mailinglist Archive: opensuse-factory which does the announcements and release notes for Tumbleweed.

It had both the announcement of the “big patch”, ssh bug report and temporary fix:

–jeroen

 

 

Posted in *nix, Communications Development, Development, Internet protocol suite, Linux, openSuSE, Power User, SSH, SuSE Linux, TCP, Tumbleweed | 2 Comments »

Mac OS X Time Machine – Stuck on “Preparing Backup”

Posted by jpluimers on 2016/04/25

For one of my USB backup drives, Time Machine was stuck showing “Preparing Backup”.

tmutil (which has a lot of undocumented parameters) helped me out.

tmutil status would not show any change for hours either:

retinambpro1tb:~ root# tmutil status
Backup session status:
{
    BackupPhase = ThinningPreBackup;
    ClientID = "com.apple.backupd";
    DateOfStateChange = "2015-05-04 19:27:31 +0000";
    DestinationID = "01AE12C7-1D3E-469E-BE7E-32DA30F0030E";
    DestinationMountPoint = "/Volumes/Elements2TB1";
    Percent = "-1";
    Running = 1;
    Stopping = 0;
}
...
retinambpro1tb:~ root# tmutil status
Backup session status:
{
    BackupPhase = ThinningPreBackup;
    ClientID = "com.apple.backupd";
    DateOfStateChange = "2015-05-04 21:13:28 +0000";
    DestinationID = "01AE12C7-1D3E-469E-BE7E-32DA30F0030E";
    DestinationMountPoint = "/Volumes/Elements2TB1";
    Percent = "-1";
    Running = 1;
    Stopping = 0;
}

So I:

  1. removed the .inProgress file found by ls -al /Volumes/Elements2TB1/Backups.backupdb/`scutil --get ComputerName`/*.inProgress
  2. rebooted with the USB drive attached
  3. waited for spotlight to complete
  4. manually started a backup
  5. verified it made progress using tmutil (you need to run that as root, for instance with sudo su -)

And it indeed made progress and finished:

Read the rest of this entry »

Posted in *nix, Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.8 Mountain Lion, Power User, SpotLight | Leave a Comment »

Some real world ZFS on Linux experience by GridPP

Posted by jpluimers on 2016/04/22

GridPP – providing computing and storage facilities for grid computing in the UK – has published 3 nice articles on their use of ZFS on Linux and comparison against hardware RAID:

  1. GridPP storage news: ZFS vs Hardware Raid
  2. GridPP storage news: ZFS vs Hardware Raid System, Part II
  3. GridPP storage news: ZFS vs Hardware Raid System, Part III

Thanks Marcus Ebert for sharing these.

–jeroen

Posted in *nix, Power User, ZFS | Leave a Comment »

DVCS for your Linux etc configuration

Posted by jpluimers on 2016/04/11

Manually you can do it like this: How To Use Git to Manage your User Configuration Files on a Linux VPS | DigitalOcean.

But there is also etckeeper. There is even a set of manual installation steps for opensuse: backup – etckeeper for opensuse – bash script install and configure – Unix & Linux Stack Exchange.

Three important etckeeper gotchas with powerful scripts like pre-commit /etc/etckeeper/pre-commit.d:

  • Ensure you give them executable permissions like chmod 755.
  • Ensure they are valid sh scripts.
  • Do not give them the .sh extension:
    • fails: /etc/etckeeper/pre-commit.d/10rsync-var-lib-named-master
    • works: /etc/etckeeper/pre-commit.d/10rsync-var-lib-named-master.sh

–jeroen

via:

Posted in *nix, *nix-tools, etckeeper, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

cURL is not a wget clone (so cannot do mirror) – via: MacNN Forums

Posted by jpluimers on 2016/04/05

Even though cURL seems to handle https better than wget, it is not a wget replacement.

From the cURL FAQ :

1.3 What is cURL not?

Curl is not a wget clone. That is a common misconception. Never, during curl’s development, have we intended curl to replace wget or compete on its market. Curl is targeted at single-shot file transfers.

Curl is not a web site mirroring program. If you want to use curl to mirror something: fine, go ahead and write a script that wraps around curl to make it reality (like curlmirror.pl does).

Curl is not an FTP site mirroring program. Sure, get and send FTP with curl but if you want systematic and sequential behavior you should write a script (or write a new program that interfaces libcurl) and do it.

–jeroen

via:

Posted in *nix, cURL, Power User, wget | Leave a Comment »

Capture tmux output – the much less painful way | Rico’s Tech Memo – copy full tmux buffer to file…

Posted by jpluimers on 2016/03/21

Simple steps to Capture tmux output – the much less painful way | Rico’s Tech Memo

Note the last line under 8) is a literal command: type it as such and it will save to that file.

–jeroen

Posted in *nix, *nix-tools, Power User, tmux | Leave a Comment »

Upgrading from OpenSuSE 13.1 to 13.2

Posted by jpluimers on 2016/03/14

As etckeeper wasn’t available in the “normal” OpeenSuSE 13.1 package, I used the steps below to upgrade to 13.2 after reading SDB:System upgrade – openSUSE and How To Upgrade To openSUSE 13.2 From openSUSE 13.1 | Unixmen.

Note I installed inside tmux (to prevent any ssh disconnects from screwing the upgrade process):

Read the rest of this entry »

Posted in *nix, etckeeper, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

Getting the ESXi version from the console

Posted by jpluimers on 2016/03/10

Since ESXi is based on busybox, it is using ash a variation of sh (the classic bourne shell) called Almquist shell and most nxes use some form of bash a lot of things won’t work.

For instance, doesn’t support sh –version.

Luckily there are uname -mrs and (more elaborate) vmware -vl to get the version.

Note there is support busybox aliases so alias dir=”ls -laF” works, and you can define aliases for the version information too.

–jeroen

via:

Posted in *nix, *nix-tools, bash, Linux, Power User, SuSE Linux, Virtualization, VMware, VMware ESXi | Leave a Comment »

Mosh: the mobile shell

Posted by jpluimers on 2016/03/07

Reminder: install mosh and get it working when it runs behind a firewall.

Mobile shell that supports roaming and intelligent local echo. Like SSH secure shell, but allows mobility and more responsive and robust.

Links:

Then see how well it stacks up against or complements with the ssh/tmux combo.

–jeroen

Read the rest of this entry »

Posted in *nix, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »