Category Archives: Linux

Linux

RHEL – Drive Fix (COMPLETE)

Super excited to say this one would appear to be in the books. I stopped the services and backed up the partition. I didn’t bother trying to shrink it, just blew it away and recreated the home partition and as I write this, xfsrestore is chugging along restoring files. I have already grown the root from 75 GB to 2.1 TB. This seems to have fixed all the issues the web server was exhibiting. Funny how having enough space helps with that.

So just to be clear, the restore takes (in my particular case) 5 times as long as the backup. I don’t think I realized that was the case otherwise I would have probably just picked up a SATA single that I could have internalized instead of the USB 2.0 external drive.

When I rebooted after it was done, I didn’t get to see what happened but I believe it error-checked the drive and rebooted again. My heart skipped a few beats but by that point, I was watching the console and everything was coming up properly.

Initial tests indicate everything is back to the way it was. Email is dropping back into the home/vmail structure. We have oodles of room on the root and home. Life is good today.

Linux

RHEL – Drive Fix

This post is a collection of data related to fixing an issue with the distribution of space coming from a Dell

Services that need to be stopped:

  • postfix.service – Postfix is delivering the mail to home/vmail
  • dovecot.service – Dovecot looks to the home/vmail

Commands that will be run:

XFSDUMP – backs up the /home filesystem to external USB drive:
xfsdump -l 0 -f /mnt/linuxBackup/home.xfsdump /home

xfsrestore -f /mnt/linuxBackup/home.xfsdump /home

Important links

Linux

RHEL – Gee Ar Umble…

So when I reformatted the server to Red Hat Enterprise Linux, it was basically a fresh start as I got rid of the SAS drives in favor of SATA, there’s a rant someplace on my tech blog about it. Long story short I accepted all the defaults and got on with the business of getting everything that had been set up on Fedora ported over to RHEL. One thing I noticed was mount point / had 75GB while /home had 12TB. Odd but surely there would be a way to shrink home and add it to the root, I’ll contend with it later.

So now it’s later because I have round about 6GB left on the root and now we find XFS filesystems don’t have shrink capabilities… Nice!!! It appears that it wasn’t thought of because hey, storage is cheap, buy and attach new drives and expand the LVM2 VG.

Linux

Server Changeover Complete

Apologies for the site being offline from 2/13 – 2/18. The storage array needed to be changed over.
Short story: Hard drive crashed.
Long story: Back in 5/20, I found WD SAS 3TB drives on newegg for like $50 apiece and got a dell H310 raid card for $25 and set my Linux server up with 4 of those bad boys in a RAID 5 array. Turns out the drives were used which brings me to the moral of the story never buy from TDT Technologies on NewEgg.com. So I had one drive fail about 6 months ago and I knew it was a matter of time before another was going to die so I ordered 4 new Seagate 4TB SATA drives and the cables to hook into the H310 and went about my merry way until Sunday 2/13 when I lost the 2nd SAS drive and all was lost. Well not really as the system was rsynced with the NAS so no biggie, I had the data.
Now I’ve been with Fedora since Fedora was spun off from RedHat a billion or so years ago in computer time. I love Fedora and my last build I was tempted to move to CentOS but couldn’t get it to run with the hardware so Fedora to the rescue and Fedora it was. But now thanks to the CentOS debacle RedHat is now giving RHEL subscriptions to folks like me that only use one server and don’t make any money off of. So now I’ve got just under 11TB worth of space on my array with new drives in a RAID 5 configuration running Red Hat Enterprise Linux 8.5!!! This is a huge win because I wanted to get certified in RHEL and now I’ve got a box to work with and it’s long term support. And I’ve learned a bunch to be able to convert my Fedora rsync backups to the RHEL OS.

Linux

Certbot Adding Domain to a Cert

I self-host my websites because, well I’m a computer geek and that’s what we do. Back in the dark ages, we used to pay out the nose for SSL certificates to protect the site content in transit. To this day I won’t deal with GoDaddy because of an issue with that. But then LetsEncrypt was formed by the industry heavyweights and offered free SSL certs for your self-hosting needs.

As I like registering domains on whims, I need to secure them when I bring them up and here’s what you need to do.

First, look up the certificates that you have with:
certbot certificates

Then add the domain you want to at the end of the list, in this case, domain4.com:
certbot certonly –cert-name [CERTNAME] -d domain1.com,domain2.com,domain3.com,domain4.com

Linux

Linux – Block SSH and FTP Access to Specific IP and Network Range in Linux

I’m not sure why but someone in China must think my Linux server contains massive secrets and sometimes even when using fail2ban it seems to be bogged down by attempts to login as root to my SSH by brute force attack which leaves me scratching my head as to if anyone really allows root access to SSH.

Anyhow, the goal is to just reject these jokers at a transport level on the firewall.

The article on how to do this is here.

The relevant commands are:

firewall-cmd --direct --add-rule ipv4 filter INPUT 1 -m tcp --source 192.168.1.100/24 -p tcp --dport 22 -j REJECT
firewall-cmd --reload
Linux

Linux – Open Established connections

When you need to see what/who is connected to the server use this:
Point in time:
netstat -nap | grep EST
Ongoing:
watch ‘netstat -nap | grep EST’

Linux

A Rather Pleasant Experience

So my home Linux server has been running for about half a year without a reboot on FC19 and being a glutton for punishment I decided to give fedup a try again. This time I’m happy to say that it was an enjoyable experience.

read more »

Linux

Online File Storage and Management

I’ve been looking for some time trying to find a nice and easy file management server I could host that would give me the same abilities as a ‘Drop Box’ or ‘Google Drive’.  Finally stumbled on an open source server that does just that, it’s called Pydio and installs on a standard LAMP server and gives you that capability.  So far I’m really impressed, it has the drag and drop features that you’ve come to expect and does a heck of a job.

Linux

fedup

So I finally got around to looking at Fedora’s page and realized that once again it’s time for an upgrade.  This time (moving from 17 to 18) there is a new utility called fedup (Fedora Update) that streamlines the transition from one version to another.  The documentation can be found here and so far it’s doing a bang up job.