RTFM

[Read This Fine Material] from Joshua Hoblitt

`df -h` from coreutils knows about *petabytes* (and beyond)

| 0 comments

I was very excited to create my first > petabyte (pebibyte actually) single filesystem this afternoon! And sure enough, df -h reported the size in PiB. I remember filing a bug on df not supporting terabytes (tebibytes) over a decade ago. Thus, I was slightly surprised to discover that it knows about PiBs.

$ df -h /dev/mss1 /dev/dl1
Filesystem      Size  Used Avail Use% Mounted on
/dev/mss1       1.1P  663T  386T  64% /net/mss1
/dev/dl1        350T   18M  350T   1% /net/dl1
$ rpm -q coreutils
coreutils-8.4-31.el6_5.1.x86_64

Continue Reading →

How to manually remove puppet exported resources from storeconfigs

| 0 comments

I currently have a puppet 3.7.2 installation that’s still using storeconfigs (yes, I know it’s a deprecated feature). Exported resources contained in the storeconfigs database have the anonying property of never expiring. Under normal operation they will persist up until the point that the node is decomissioned via the node face. Eg.: puppet node clean hostname.example.org

That mechanism falls down in the scenario that the node is not being decomissioned and the manifest has changed to no longer contain the exported resource(s). Running puppet node clean ... purges not just exported resources but also invalidates the agent’s x509 certificate. This is a tad overhanded and unfortunately the node face does not have an option to invoke only the #clean_storeconfigs method. I decided it wasn’t worth the effort to add one as it would be unlikely to get merged upstream since the entire facility is about to be removed.

I briefly attempted to get my head around what ActiveRecord was doing to the database when a node was purged by code inspection but decided it would be more expedient to cheat and observe the queries directly.
Continue Reading →

How to delete an LSI MegaRAID Virtual Drive that’s been marked as “bootable”

| 0 comments

The LSI MegaCLI management utility has such an atrocious set of camel case flags that it drives even a cli junky like myself into using the MegaRAID Storage Manager (MSM) GUI for most routine tasks. However, there are a number of important management functions that are not exposed in the GUI. The one I banged into today is that you can not delete a virtual drive if it’s been marked as “bootable”. Eg:

Screenshot-MegaRAID Storage Manager - v13.04.03.01
Continue Reading →

How to fix `foreman-rake db:migrate`: Mysql2::Error: Can’t DROP ‘inherited_from’; check that column/key exists: ALTER TABLE `user_roles` DROP `inherited_from`

| 0 comments

TheForeman foreman-rake db:migrate task fails when upgrading between 1.3.x -> 1.4.x and from any version < =1.3 to at least 1.5.2. The fix is to edit the rake task /usr/share/foreman/db/migrate/20130924145800_remove_unused_role_fields.rb. Bug #4518 is open for this issue.

Continue Reading →

Dynamically changing the MTU of a Linux bridge interface

| 0 comments

It appears that at least with the EL6.x 2.6.32-220.23.1.el6.x86_64 kernel and the bridge-utils-1.2-10.el6.x86_64 package, there are restrictions on the possible MTU values that made be set for a bridge interface. Specifically, you may not set the MTU of the bridge group to be greater than the lowest MTU of a componet interface.

Consider the following, fairly typical for a hypervisor node, configuration of a physical interface (eth0), a 802.1q tagged interface (eth0.27), a bridge interface (br27), and a tun interface for a QEMU VM (vnet1). The tagged interface is a virtual interface of the physical ethernet device (eth0). While the tagged interface and tun interface are both members of the br27 bridging group.

Example of a typical Linux bridge group configuration

Example of a typical Linux bridge group configuration


Continue Reading →