Partitioning of 3T hard drives

use parted with

parted /dev/sdX

Most disks on x86/amd64 are prepared using an msdos label, thus supporting partitions up to 2T in size. To create larger partitions (2 TB and more), one must use a gpt label (the GUID Partition Type). With parted, this can be accomplished with mklabel gpt:

(parted) help
(parted) print
(parted) mklabel gpt
(parted) mkpart primary ext4 0% 100%
(parted) print
(parted) quit

Prepare partition with

mkfs.ext4 /dev/sdX

Mount and enjoy.

WebApp Error: : [Errno 24] Too many open files

Most likely the number of file descriptors not enough.
Check for number of file descriptors with

ulimit -a
ulimit -n

Increase in /etc/security/limits.conf


username hard nofile 3072
username soft nofile 2048

Another things to do, if above solution doesn’t help. As suggested at slashdot, increase number of max open connections in sysctl.conf, kernel headers and security limits.

Params that configure max open connections.

At /etc/sysctl.conf add:

net.core.somaxconn=131072
fs.file-max=131072

and then:

sudo sysctl -p

at /usr/include/linux/limits.h

change:

NR_OPEN = 65536

at /etc/security/limits.conf

add:

* soft nofile 65535
* hard nofile 65535

Mounting USB devices in KDE

After updating KDE to 4.9.5 my system stopped auto mounting external USB devices. The fix was to change udisk policy in


/usr/share/polkit-1/actions/org.freedesktop.udisks.policy


<action id="org.freedesktop.udisks.filesystem-mount">
<description>Mount a device</description>
<message>Authentication is required to mount the device</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>