Pokazywanie postów oznaczonych etykietą ubuntu. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą ubuntu. Pokaż wszystkie posty

wtorek, 24 października 2017

Configurue Linux Mint / Ubuntu Linux to support .local domains and domains from local DNS

I had a problem where .local domains served from development server and resolved using local DNS server did not work.

To make it work, you don't need to modify /etc/resolv.conf

Here is the solution to this problem:

Go to
/etc/NetworkManager/NetworkManager.conf

find a line like this:
dns=dnsmasq

and comment it like this:
#dns=dnsmasq

Save/Close

Now open
/etc/avahi/avahi-daemon.conf

Find this line:
#domain-name=local

and change to:
domain-name=.alocal

Restart your machine and you are ready to go.

In theory it should be possible to make this work without restarting (by restarting just the proper services)

service avahi-daemon restart
service network-manager restart

But I restarted first and it was working so I'm not sure. Please let me know if it worked for you.

sobota, 20 lutego 2016

Linux - 0 bytes available but many gigs free

Today I woke up and found out that one of my servers stopped responding.
After attaching LCD and a reboot I was welcomed by a message stating that one of drives has bad sectors and needs to be replaced.

I decided to copy all the data from that drive to another witch had more than enough free space.
After a few hours of copying the precess stopped with a message stating that 0 bytes on target drive are available.

Quick check using df showed that there are 137GB free but 0 is available.
The drive is a 3TB WD Red with one 3TB ext4 partition.

After some digging I found out that this is normal on Linux.
When you create a partition, Linux reserves 5% of it's capacity for root user. It is intended to store logs and settings so that system has space to write even if users use all storage.
The thing is that it is not needed on all disks - if drive is used only to store let's say CCTV recordings you want all storage available. It is needed mainly on partition containing /var folder.

How to fix it? - use tune2fs

The command is as follows (need to run it as root/use sudo, replace XX with the number of your partition):

tune2fs -m 0 /dev/sdXX

on Ubuntu use

sudo tune2fs -m 0 /dev/sdXX


I hope this will save you some time.