Expanding a Mounted Root LVM Filesystem

These instructions are from https://www.rootusers.com/lvm-resize-how-to-increase-an-lvm-partition/. Note: Some output to the commands below that’s not relevant to these instructions has been removed, so your output will be different.

See capacity of current root file system:

$ df -h /
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root2   99G   82G   12G  88% /

Check size of volume group to make sure it has enough space:

$ sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  VG Size               931.27 GiB
Alloc PE / Size 53231 / 207.93 GiB
Free PE / Size 185174 / 723.34 GiB

Check size of logical volume:

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/root2
  LV Name                root2
  VG Name                ubuntu-vg
  LV Size                100.00 GiB

It has 100GB, but needs 175GB.

To expand the volume group by 75GB:

$ sudo lvextend -L+75G /dev/ubuntu-vg/root2

Check that it’s now 175GB:

$ sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/root2
  LV Name                root2
  VG Name                ubuntu-vg
  LV Size                175.00 GiB

Now expand the file system:

$ sudo resize2fs /dev/ubuntu-vg/root2

Check that it’s done:

$ df -h /
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root2  173G   93G   72G  57% /

Uncategorized

Comments (0)

Permalink

Dual Application Switchers

I have a dual monitor set up running Ubuntu 16. The goofy thing was there were two application switchers. One would be displayed on the monitor with the active window and the other would be displayed on the monitor with the cursor. If the cursor was on the same monitor as the active window, one would be on top of the other and it was difficult to tell what application would become active.
To fix this, run CompizConfig Settings Manager and uncheck “Application Switcher” in the Window Management section.

Uncategorized

Comments (0)

Permalink

Highlighting active window

In Ubuntu 14 and 16, there is not much to distinguish the active window visually. It can help to set a highly visible shadow around the active window, for instance, red.

  1. Install CompizConfig settings manager.
  2. Under Desktop, select Ubuntu Unity Plugin.
  3. Select the Decorations tab.
  4. Set Active window shadow color to red 255, Green 0, Blue 0, and Opacity 255.

Uncategorized

Comments (0)

Permalink

Copy+Paste Broken in Google Sheets

This had nothing to do with Google Sheets itself, but rather an extension I use called Don’t Fuck with Paste. This extension disables copy and paste blocking.  The extension had a major upgrade a couple months ago that enabled the extension only for sites added to a blacklist.  The blacklist supports regular expressions to match URLs.  Unfortunately, a blank expression matches everything and somehow a blank RegEx was in the blacklist–I don’t know if this is the default for the extension or if I did it by mistake and I haven’t tried to find out.  You can tell if the extension is active for a site if the extension’s icon is blue rather than grey.  You can tell if a blank RegEx is in the list by clicking on the icon and looking if there’s a cancel button next to a blank line:

instead of this (the URL displayed will be the one displayed in the current browser tab, but the important thing is that there’s no X next to it):

Clicking the X removed the blank RegEx and turned the extension off for all sites by default, thus fixing Google Sheets.

On finding extension problems

When something goofy is broken, the first thing to do is to browse to the site with an Incognito window, which turns off all extensions.  If the site works in Incognito mode, the problem is due to an extension.  The next step is to figure out which extension is breaking things.  If you don’t have an idea of which extension might be the problem, a binary search is the fastest way:  Disable the first half of all extensions, reload the page and see if it works.  If not, re-enable the first half, then disable the second half.  Keep splitting the groups in half until you find the extension at fault.

Uncategorized

Comments (0)

Permalink

Dot Files

Dot files are unix configuration files that contain your personalized settings for programs like Vim, Emacs, or tmux.  If you use more than one unix machine, keeping these file in sync is much easier if they’re stored in Git.  These instructions are how I do that.

Fork the GitHub repository

https://github.com/dotphiles/dotphiles

Set up for GitHub

If the machine hasn’t been set up with GitHib, follow these instructions
https://help.github.com/articles/set-up-git/
to install Git, set your commit name and email, and install GitHub credentials.

Clone the repository

git clone --recursive git@github.com:zymurgeek/dotphiles.git ~/.dotfiles
Do not leave off the recursive flag!

Manage dot files

See the instructions in ~/.dotfiles/README.md.

Uncategorized

Comments (0)

Permalink

Nexus 5 Lineage Incremental Update Procedure

This procedure is for installing nightly or weekly updates to Lineage, not moving from CyanogenMod to Lineage.

  1. Back up Tasker to internal storage (menu > data > backup)
  2. Perform a Titanium backup to save new user+system apps and newer versions system data
  3. Restore SwiftKey as keyboard in Settings > Languages & Inputs > Current Keyboard
  4. Optional: Delete old back up from phone if space needed.
  5. Back up current ROM with ROM Manager
  6. Save the backup to NAS with sudo adb pull /sdcard/TWRP/BACKUPS/06c2deb6006b0cb2
  7. Download Lineage update from Settings > About Phone > LineageOS updates and install.

Uncategorized

Comments (0)

Permalink

Nexus 5 Lineage Full Update Procedure

This procedure is for major updates such as moving to Lineage from CyanogenMod.

  1. Back up Tasker to internal storage (menu > data > backup)
  2. Perform a Titanium backup to save new user+system apps and newer versions system data
  3. Optional: Delete old back up from phone if space needed.
  4. Back up current ROM with ROM Manager
  5. Save back up in /sdcard/TWRP/BACKUPS/06c2deb6006b0cb2 to NAS
  6. Download Lineage and OpenGapps TGZ files and push to /sdcard
  7. Wipe all except internal storage
  8. Restore from cloud (Google)
  9. Sign in to all Google accounts
  10. Check mail
  11. Check Trello
  12. Sign in to Google Voice with phone native number
  13. Restore Tasker from Titanium backup

Notes:  Titanium backup failed because I started it before installing the supersu.zip (see Lineage OS root instructions). Fix is to install supersu, developer options > apps and adb, force stop titanium and restart titanium. Then Android asks if it should have root access.

Uncategorized

Comments (0)

Permalink

Kensington Expert Mouse Ubuntu Configuration

First identify the Expert Mouse’s device ID using xinput:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Kensington Kensington Expert Mouse id=9 [slave pointer (2)]
⎜ ↳ Dell KB216 Wired Keyboard id=11 [slave pointer (2)]
⎜ ↳ DELL Laser Mouse id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ Dell KB216 Wired Keyboard id=10 [slave keyboard (3)]
↳ Dell WMI hotkeys id=13 [slave keyboard (3)]

Next, get the ID of the button to change using “xinput test device_id”, e.g., this is the output from pressing the upper right button:
$ xinput test 9
button press 8
button release 8

Physical button positions:
1 = Lower left button
2 = Upper left button
3 = Lower right button
4 = Upper right button
5 = scroll ring

Button actions:
1 = left click
2 = middle click
3 = right click
8 = back

Normally the physical button positions are assigned the same button actions. The command to do this (in case you wanted to reset to default) is xinput --set-button-map 9 1 2 3 4 5 6 7 8 (again, where 9 is the device ID).

In my case, middle-click is assigned to the upper left button and back is assigned to the upper right. I wanted to swap them, so the command is:
xinput --set-button-map 9 1 8 3 4 5 6 7 2
where 9 is the device ID and “1 8 3 4 5 6 7 2” are the actions assigned to the first eight physical positions.

To persist these settings, add the xinput command to ~/.xsessionrc. For more details see How to configure the TrackPoint.

Uncategorized

Comments (0)

Permalink

Nvidia GTX 750 with Ubuntu 16.04

I’ve been using the nvidia-364 drivers for my Nvidia GTX 750 graphics card for the past few years.  These have to be reinstalled with each kernel upgrade.  A recent kernel upgrade led to the unfortunate finding that this driver is no longer available.  I went in search of what replaced it and found that the current version is nvidia-375.  The current instructions are as follows:

  1. Log in to your account in the TTY
  2. sudo apt-get purge nvidia-*
  3. sudo add-apt-repository ppa:graphics-drivers/ppa
  4. sudo apt-get update
  5. sudo apt-get install nvidia-375
  6. Reboot

Uncategorized

Comments (0)

Permalink

Limping along with a broken router

Two days ago our FiOS connection started crawling, with most web pages refusing to load at all. It’s a 15/5 Mbps connection that Google’s speed test reported as .2 Mbps. I called Verizon and a very patient and thorough tech ran diagnostics over the local fiber network, the ONT (Optical Network Terminal) and the router. He eventually concluded our router was the problem and arranged for a replacement to be shipped out. That should arrive later today, but in the mean time, there was no Internet in the house. I set up a local wireless hotspot (that does not go through FiOS) that lets most of the computers get back to work. However, I have a NAS that sits on my local LAN. If I connect to the hotspot, any of my Linux boxes that mount that NAS pause for about a minute while queries to the NAS time out. If I connect to the local ethernet connection, the NAS is fine, but there’s no functional Internet. What to do? The solution was rather simple. These instructions are for Ubuntu 16, but I haven’t tried them on earlier releases:

  1. Launch Network Connections
  2. Click on the Ethernet connection
  3. Select Edit
  4. Select the IPv4 Settings tab
  5. Click Routes
  6. Check “Use this connection only for resources on its network”

Source:  https://ubuntuforums.org/showthread.php?t=1499325

Uncategorized

Comments (0)

Permalink