Skip to main content

Posts

Find the used hard disk data and solve disk pressure

I have a server which is running Ubuntu 18.04 and it is also a worker node for K8s. Sometimes I see that K8s is killing pods on this machine because of disk presseur and when I get df -h --total I can see that 85% (1.5T) of the disk is in use at / : ~$ df -h --total Filesystem Size Used Avail Use% Mounted on udev 126G 0 126G 0% /dev tmpfs 26G 5.3M 26G 1% /run /dev/sda2 1.8T 1.5T 276G 85% / tmpfs 126G 0 126G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 126G 0 126G 0% /sys/fs/cgroup /dev/loop0 90M 90M 0 100% /snap/core/7917 /dev/loop1 90M 90M 0 100% /snap/core/8039 /dev/sdb1 9.8G 203M 9.1G 3% /boot /dev/sdb2 511M 6.1M 505M 2% /boot/efi /dev/sdb3 1.8T 100M 1.7T 1% /home /dev/loop2 128K 128K 0 100% /snap/austin/42 /dev/loop3 3.0M 3.0M 0 100% /snap/micro/648 tmpfs 26G 0 26G 0% /run/user/1...

apache 2.2 - Blank page using Chrome but working on Safari or FF

We have a webpage (vimity.com) in php served by Apache on top of Ubuntu 9.04. The homepage looks great on FF and Safari but not on Chrome. The problem with Chrome is only on the Homepage, the rest of the page is looking good on all browsers. When we disable the cache the problem does not appear and Homepage looks also good on Chrome. On the logs I couldn't find anything strange, I see the request in the access log but nothing on the error log. Another thing we noticed is that if we disable the app cache (stored in files using Cache_Lite) the homepage works fine but if we activate it again it stops working, that's weird because on staging works perfect and the servers/configs/code are the same. If you take a look at the chrome console you'll see a line that says "GET http://www.vimity.com/ 200 (OK)" but in red, also in the resources tab, near the html you'll se a red circle with the number one inside (like a syntax error or something) but nothing else, no erro...

linux - Hostnames - What are they all about?

I've recently been "forced" to perform some sysadmin work, while this isn't something that I absolutely love doing I've been reading, experimenting and learning a lot. There is one fundamental aspect of server configuration that I've not been able to grasp - hostnames . In Ubuntu for instance, one should set the hostname like this (according to the Linode Library ): echo "plato" > /etc/hostname hostname -F /etc/hostname File: /etc/hosts 127.0.0.1 localhost.localdomain localhost 12.34.56.78 plato.example.com plato I assume that plato is an arbitrary name and that plato.example.com is the FQDN. Now my questions are: Is it mandatory? To what purpose? Where is it needed / used? Why can't I define "localhost" as the hostname for every machine? Do I have to set up a DNS entry for the plato.example.com FQDN? Should plato.example.com be used as the reverse DNS entry for my IP? Also, are there any "best ...

Useful Command-line Commands on Windows

The aim for this Wiki is to promote using a command to open up commonly used applications without having to go through many mouse clicks - thus saving time on monitoring and troubleshooting Windows machines. Answer entries need to specify Application name Commands Screenshot (Optional) Shortcut to commands && - Command Chaining %SYSTEMROOT%\System32\rcimlby.exe -LaunchRA - Remote Assistance (Windows XP) appwiz.cpl - Programs and Features (Formerly Known as "Add or Remove Programs") appwiz.cpl @,2 - Turn Windows Features On and Off (Add/Remove Windows Components pane) arp - Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP) at - Schedule tasks either locally or remotely without using Scheduled Tasks bootsect.exe - Updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR cacls - Change Access Control List (ACL) permissions on a directory, its subcontents, or files calc -...

Storage tiering and SLA models

I've started looking at switching storage charging models. Historically - it's been purely per-gig, in a big shared pool. But I'm looking at extending the model, and looking at tiering storage offerings - mostly because we're looking at an investment in SSD - but under our previous charging model, we've not really been able to justify it. (We have got some as a 'controller cache upgrade'). My initial start point is to: Take a 'storage chunk'. Probably a RAID group, but maybe 'a shelf' or 'a controller'. Sum up the usable gigs. Sum up the theoretical IOPs of the spindles (random read and write penalty writes) Sum up theoretical MB/sec throughput of the spindles. Divide IOPs and throughput by available TB, to set a 'performance allocation' based on each TB 'bought'. And look at a sample SATA configuration, sample FC/SAS configuration and SSD. Now, this is rather a simplification I know - and is rather a worst case scenar...

networking - How to set hostname if hosting multiple servers on the same machine?

I'm learning about setting up my own web and mail servers, and I've been confused about this question for days, and articles online (including Server Fault) seems to be so inconsistent with their use of the term 'subdomain' and 'hostname'. From my understanding: A host name uniquely identifies a computer in a network A domain and subdomain must have a DNS A record which points to one or more hosts Let's say my web server is at 1.2.3.4 , I have my host name set to development (confirmed by running hostname in bash shell), and I'm setting A records like so: @ -> 1.2.3.4 www -> 1.2.3.4 mx -> 1.2.3.4 mx -> 9.8.7.6 Then I have the www and mx subdomains pointing to my web server whose hostname is development . The mx subdoman also points to two hosts (for redundancy). Why do I need a hostname? My machine can already be identified using its IP address. I read somewhere that says a hostname is important because it gets sent in some messages...

hard drive - Consumer HDDs in a HP ProLiant DL180 G6?

Model: HP ProLiant DL180 507168-B21 Will a ProLiant DL180 G6 work with a single 1TB consumer hard drive in a caddy? Yes, I know I should use enterprise HDDs but we have a limited budget, and this server will be used for testing, not any critical operations. If the above stated configuration won't work, what will be the cheapest configuration I can do? Note: I am prepared to lose data on this drive. Answer Yes, this will work. Normally, I steer people away from cheap disks, but this is a cheap server and is particularly suited to being stuffed with cheap disks (versus other ProLiant models). The HP ProLiant DL180 G6 model you list is an 8-bay unit. The backplane is a hotplug backplane. Depending on your controller setup, you can use whatever 3.5" SAS or SATA disk you wish in the system. This server may have an HP Smart Array P410 controller or a handful of SATA leads to the motherboard. Can you clarify what you have, because the part number you listed is just the...

domain name system - Private DNS zone that resolves private subdomains, and forwards to public nameserver for existing public subdomains

I have a TLD with a series of subdomains that are public, say *.example.com . I also have a private server which is used as a SVN repository, which I would like to have available at svn.example.com , but only on the private network. Currently I've achieved that by creating the zone file svn.example.com.zone and using this declaration: zone "svn.example.com" IN { type master; file "/etc/named/svn.example.com.zone"; }; And in the zone file: @ IN NS svn.example.com. svn.example.com. IN A 10.200.1.1 All other domains are forwarded to the public nameserver. This works, but it's not ideal because it requires creating a whole new zone if I want to add a new private subdomain. If I make this zone the master record for the whole example.com TLD, then I assume requests to the currently public *.example.com will no longer work for clients using the private DNS (unless they are duplicated in the private DNS's zone file). Is there a way...

domain name system - DNS failover across multiple datacenters?

I've got a site that is starting to get a lot of traffic and just the other day, we had a network outage at the datacenter where our loadbalancer (haproxy) is hosted at. This worried me as despite all my efforts of making the system fully redundant, I still could not make our DNS redundant, which I think isn't an easy solution. Only thing I was able to find was to sign up for DNS failover from places like dnsme, etc .... but they cost too much for budding startups. Even their Corporate plan only gives you 50 million queries per month and we use that up in a week. So my question is, are there any self hosted DNS we can do that provides the failover like how dnsme does it?

domain name system - Linux DNS Client Update Tool

So I work in a web hosting environment, and I've got a handful of Linux boxen on our primarily Windows-based network. All the machines (both Windows and Linux) on the network have at least two network interfaces, each with its own DNS suffix, so we can separate backup and management traffic from the production web traffic. The issue is that the backup/management NIC on each machine is using DHCP to get an address and register itself in DNS, while the production NIC is static, and DHCP isn't an option. The Windows configuration is relatively simple, we set the one DHCP'ed NIC not to register with DNS and just leave DNS registration to the DHCP server. Then we set the static IP'ed NIC to register with DNS, and everything works fine. I want my Linux boxen to do the same thing, and I've got the DHCP NIC figured out, but I'm not finding a whole lot out there about ways to have Linux automatically register a static address in DNS. Has anyone done anything like that b...