Ask Your Question

blorg's profile - activity

2017-12-16 13:18:52 -0500 received badge  Popular Question (source)
2017-11-15 22:05:02 -0500 received badge  Necromancer (source)
2017-11-15 08:24:35 -0500 commented answer How to find out whether or not a file/directory resides on SSD or HDD?

I started to answer this in the comments, but we're limited to how much I can type as a comment, so, I made a new post.

2017-11-15 08:23:05 -0500 answered a question How to find out whether or not a file/directory resides on SSD or HDD?

I'll give you some stuff to start with, but I'd really recommend you go read up on Linux LVM (Logical Volume Manager) and how this all ties together. A Beginner's Guide to LVM is a good place to start.

Some basic terms:

PV - Physical Volume - The actual physical drives themselves VG - Volume Group - a group of PVs linked together to act like a single disk LV - Logical Volume - a slice of a VG

One one of my boxes at home, I have a 256 gig SSD, 2 2TB spinning disks and a 4 TB spinning disk. The SSD is a single PV VG with 1 LV on it that has the base OS bits on it, the spinning disks are all in another VG with currently two separate LVs.

$ sudo pvscan    # scan physical volumes
  PV /dev/sdb1   VG ccmd_home       lvm2 [1.82 TiB / 0    free]
  PV /dev/sdc1   VG ccmd_home       lvm2 [1.82 TiB / 0    free]
  PV /dev/sdd    VG ccmd_home       lvm2 [3.64 TiB / 3.29 TiB free]
  PV /dev/sda2   VG fedora-server   lvm2 [232.39 GiB / 0    free]
  Total: 4 [7.50 TiB] / in use: 4 [7.50 TiB] / in no VG: 0 [0   ]

$ sudo vgscan    # scan volume groups
  Reading volume groups from cache.
  Found volume group "ccmd_home" using metadata type lvm2
  Found volume group "fedora-server" using metadata type lvm2

$ sudo lvscan    # scan logical volumes
  ACTIVE            '/dev/ccmd_home/home' [1.00 TiB] inherit
  ACTIVE            '/dev/ccmd_home/tres' [2.99 TiB] inherit
  ACTIVE            '/dev/fedora-server/swap' [15.62 GiB] inherit
  ACTIVE            '/dev/fedora-server/root' [216.77 GiB] inherit

So, let's say I wanted to remove one of those 2TB disks and use it for something else.

First, I'd need to see if I have free space to do so. We can see that in the 'ccmd_home' VG, I have two LVs defined, using a total of 4 TB of the 8 TB in the VG (using rounded numbers). I have enough free space to remove a PV from the VG.

Now, I need to see if that disk has data on it. From the 'pvscan' output above, it looks like it probably does, but to double-verify, we can use 'pvdisplay':

sudo pvdisplay /dev/sdb1
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               ccmd_home
  PV Size               1.82 TiB / not usable 4.09 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476931
  Free PE               0
  Allocated PE          476931
  PV UUID               b1YmnD-TLEH-ZHvM-JoYR-cze2-gYqD-4TSZfz

Presumably, I want to keep that data, so I need to move it. I have two options here, both using the 'pvmove' command. I can use pvmove /dev/sdb1 and let the system find (available) free space, or I can specify a destination explicitly with pvmove /dev/sdb1 /dev/sdd since I know that /dev/sdd is in the VG and has free space. If you're not sure, use the first one. This can take a while, depending on how much data is on the disk.

Once the data ... (more)

2017-08-12 16:36:48 -0500 received badge  Scholar (source)
2017-08-10 10:01:56 -0500 answered a question How to find out whether or not a file/directory resides on SSD or HDD?

What probably happened is that the installer stuck both drives into a single LVM volume.

If you want things separate, you're going to have to shrink your filesystems so that everything fits on the SSD, then run some LVM commands to remove the 1TB drive from the VG, create a new VG with just the HDD in it, and mount it on a temporary mount (like /temphome), copy your data from /home to /newhome, delete the data from /home after you've verified you've got everything, unmount /newhome and re-mount it as /home, fixing up your /etc/fstab to make sure everything comes back up properly after a reboot.

There are Linux LVM tutorials out there, and it's not really all that complicated of a task, you just have to not be afraid of the command line.

2017-08-04 09:53:48 -0500 answered a question uninstall fedora from triple-boot system

Yeah, you don't really 'uninstall' any Linux distro, you just format over it. You just need to make sure that you don't hose up the partition with the grub bits on it that is first loaded.

You should be able to use Gparted to remove your Fedora bits and extend your other filesystems to use the space, then boot into Xubuntu and run sudo update-grub to remove Fedora from the boot menu. This is assuming that Xubuntu's grub is the one that the system initially boots from.

2017-08-04 09:45:51 -0500 commented answer cron refuses to shutdown my computer

The markdown on this system hosed up the formatting, that should have been multiple lines. In the preview of my comment, it showed it correctly. There should be a newline between shutdown and 30. I was trying to demonstrate running the command sudo cat /etc/cron.d/shutdown. The $ was the shell prompt. The rest of it would be the output.

Maybe a little clearer:

In the directory /etc/cron.d/shutdown, put a file that contains 30 22 * * * /sbin/shutdown -h now

2017-08-03 03:58:31 -0500 received badge  Teacher (source)
2017-08-02 20:39:16 -0500 received badge  Editor (source)
2017-08-02 18:07:41 -0500 commented answer cron refuses to shutdown my computer

Might have to fully-path shutdown:

30 22 * * * /sbin/shutdown -h now

2017-08-02 18:05:54 -0500 answered a question cron refuses to shutdown my computer

Have you checked to see if the cron job is running at all?

$ sudo journalctl -u crond

Also, I think you can shut down a Linux box when you're logged in to the system locally. The cron job will not be run as you as though you were logged in.

Try putting the job in /etc/cron.d w/o any usernames:

$ sudo cat /etc/cron.d/shutdown 30 22 * * * shutdown -h now

And see if that works.

2017-07-31 08:49:28 -0500 answered a question F26 installed and missing grub.cfg entry for Windows 10. Howto manually create that entry?

The Win10 section of my /boot/grub2/grub.cfg looks like:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows' --class windows --class os $menuentry_id_option 'osprober-chain-32886C14886BD53F' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  32886C14886BD53F
        else
          search --no-floppy --fs-uuid --set=root 32886C14886BD53F
        fi
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Even though that UUID looking identifier does not match what blkid returns, so, not sure what that number represents:

# blkid --probe /dev/sda2
/dev/sda2: LABEL="Windows" UUID="88906DD9906DCDEE" TYPE="ntfs" USAGE="filesystem" PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="0cec76c1-02" PART_ENTRY_TYPE="0x7" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="20291584" PART_ENTRY_SIZE="251658240" PART_ENTRY_DISK="8:0"

I was able to reproduce this output using the /etc/grub.d/30_os-prober stub:

[/etc/grub.d] scratch # export pkgdatadir=/usr/share/grub
[/etc/grub.d] scratch # ./30_os-prober 
Found Windows 10 on /dev/sda1
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-32886C14886BD53F' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  32886C14886BD53F
        else
          search --no-floppy --fs-uuid --set=root 32886C14886BD53F
        fi
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}

Though it looks like it used os-prober to find that install. If your run of that didn't produce any output, then this probably won't work for you.

What do you get from sudo fdisk -l ?

Sample output from my ThinkPad:

$ sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0cec76c1

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048  20291583  20289536   9.7G 12 Compaq diagnostics
/dev/sda2        20291584 271949823 251658240   120G  7 HPFS/NTFS/exFAT
/dev/sda3       271949824 272973823   1024000   500M 83 Linux
/dev/sda4       272973824 976773119 703799296 335.6G  5 Extended
/dev/sda5       272975872 976773119 703797248 335.6G 8e Linux LVM




Disk /dev/mapper/fedora_scratch-swap: 7.7 GiB, 8204058624 bytes, 16023552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_scratch-root: 69 GiB, 74088185856 bytes, 144703488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_scratch-home: 259 GiB, 278048800768 bytes, 543064064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

In the above output, /dev/sda2 is the WIndows install, but /dev/sda1 is where the Windows boot-loader is located.

2017-07-31 07:26:49 -0500 received badge  Supporter (source)
2017-07-26 13:35:54 -0500 received badge  Student (source)
2017-07-26 13:07:43 -0500 asked a question After upgrading from 25->26, NetworkManager can't get an IP on boot (KDE Spin)

Running on a ThinkPad T430S, using the Intel 82579LM Gigabit NIC.

When it (re)boots, NetworkManager can't get an IP from DHCP. In the journal, I see:

Jul 26 09:47:46 scratch NetworkManager[1151]: <info>  [1501080466.1776] manager: (enp0s25): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Jul 26 09:47:46 scratch NetworkManager[1151]: <info>  [1501080466.1791] device (enp0s25): state change: unmanaged -> unavailable (reason 'managed', internal state 'external')
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9414] device (enp0s25): link connected
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9422] device (enp0s25): state change: unavailable -> disconnected (reason 'carrier-changed', internal state 'managed')
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9463] device (enp0s25): Activation: starting connection 'em1' (1039e6e4-4690-434b-989f-6436d8dd0066)
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9467] device (enp0s25): state change: disconnected -> prepare (reason 'none', internal state 'managed')
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9474] device (enp0s25): state change: prepare -> config (reason 'none', internal state 'managed')
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9597] device (enp0s25): state change: config -> ip-config (reason 'none', internal state 'managed')
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9605] dhcp4 (enp0s25): activation: beginning transaction (timeout in 45 seconds)
Jul 26 09:47:49 scratch NetworkManager[1151]: <info>  [1501080469.9693] dhcp4 (enp0s25): dhclient started with pid 1902
Jul 26 09:47:50 scratch dhclient[1902]: DHCPREQUEST on enp0s25 to 255.255.255.255 port 67 (xid=0x188e4416)
Jul 26 09:47:53 scratch NetworkManager[1151]: <info>  [1501080473.9049] device (enp0s25): state change: ip-config -> unavailable (reason 'carrier-changed', internal state 'managed')
Jul 26 09:47:53 scratch NetworkManager[1151]: <info>  [1501080473.9100] dhcp4 (enp0s25): canceled DHCP transaction, DHCP client pid 1902
Jul 26 09:47:53 scratch NetworkManager[1151]: <info>  [1501080473.9100] dhcp4 (enp0s25): state changed unknown -> done

and it repeats until I restart the NetworkManager service, where it immediately starts working.

Seems to work fine if I boot with the ethernet disconnected and wi-fi enabled, though the ethernet does not work if I plug it back in (w/o a restart of the service).

All packages are up to date as of this posting.

2016-07-22 11:45:01 -0500 answered a question sshfs between fedora hosts not working

I didn't find a root cause, but it is working now.

I uninstalled all of the old/non-fc24 installed pkgs and now it works. I don't know which one was causing problems, but it's working now.

2016-07-18 13:23:04 -0500 commented answer Screencasting Software doesn't work on my Fedora 24

Then that is the first problem you need to solve. Try uninstalling and re-installing ffmpeg and it's dependencies.

2016-07-18 13:22:52 -0500 commented question sshfs between fedora hosts not working

SELinux is disabled. Regular ssh connections work. I can sshfs mount filesytems on these hosts from MacOS X and I can mount MacOS X on these hosts.

Attempts to use sftp fail in a similar manner, both using the external sftp server as well as the built-in one.

2016-07-12 22:24:52 -0500 answered a question F24 Kernel 4.5.7-300.fc24- Freezes

Do you have any F24 kernels that boot on this system? Maybe boot an older one that does work and run dnf -y update and see if you get a newer one that might work.

My system (upgraded from 23 to 24 & updated today) is running 4.6.3-300.fc24.

2016-07-12 21:25:16 -0500 answered a question Screencasting Software doesn't work on my Fedora 24

It looks like it crashed while looking for external tools. On my system, I show it searching for ffmpeg and pactl.

Maybe see if ffmpeg is working properly.

See if you can grab a single frame of a video file as a jpg:

ffmpeg -ss 1 -i "somefile.mp4" -vframes 1 -an -vcodec mjpeg -f rawvideo "somefile.jpg"
2016-07-12 21:25:14 -0500 asked a question sshfs between fedora hosts not working

I have two Fedora 24 hosts, both of them have been upgraded from Fedora 22->23->24 using what has become the dnf system-upgrade process.

One running workstation, the other the server spin.

Using either of them, I can use sshfs to mount remote filesystems served up by NetBSD or MacOS X, but it fails trying to do mounts between the Fedora hosts.

$ sshfs -o debug -o idmap=user -o sshfs_debug server: /home/mparson/sshfs/
SSHFS version 2.5
FUSE library version: 2.9.7
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <server> <-s> <sftp>
mparson@server's password: 
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
Extension: fsync@openssh.com <1>
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.24
flags=0x0003f7fb
max_readahead=0x00020000
remote_uid = 1000
   INIT: 7.19
   flags=0x00000011
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 1, success, outsize: 40
unique: 2, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 2338
   unique: 2, success, outsize: 32
unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 2836
getattr /
[00002] STAT
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 57, pid: 2837
LOOKUP /.xdg-volume-info
getattr /.xdg-volume-info
[00003] STAT
unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 2338
getattr /
[00004] STAT
  [00002]          ATTRS       41bytes (0ms)
   unique: 3, success, outsize: 120
unique: 6, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 2836
   unique: 6, success, outsize: 32
  [00003]         STATUS       33bytes (0ms)
  [00004]          ATTRS       41bytes (0ms)
unique: 7, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0
   unique: 7, success, outsize: 16
   unique: 4, error: -2 (No such file or directory), outsize: 16
   unique: 5, success, outsize: 120
unique: 8, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 2338
getdir[0]
[00005] OPENDIR
  [00005]         HANDLE       17bytes (0ms)
[00006] READDIR
[00007] READDIR

It pauses here so I switch to another terminal and try to do an 'ls' on the mounted dir, which also hangs for a bit, then gives an error:

$ ls -l sshfs
/bin/ls: cannot access 'sshfs': Input/output error

Back on the first terminal, some more debug info gets printed, then I get prompted for my password again:

 unique: 9, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 2846
getattr /
[00008] STAT
Timeout, server server not responding.
remote host has disconnected
   unique: 9, error: -5 (Input/output error), outsize: 16
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <server> <-s> <sftp>
mparson@server's password:
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
Extension: fsync@openssh.com <1>
[00009] CLOSE
   unique: 8, error: -5 (Input/output error), outsize: 16
  [00009]         STATUS       33bytes (0ms)

sent:               8 messages, 158 bytes
received:           5 messages, 165 bytes
rtt min/max/avg:    0ms/0ms/0ms
num connect:        2

And it gives me my shell prompt back.