Showing posts with label F18. Show all posts
Showing posts with label F18. Show all posts

Friday, July 5, 2013

Understanding df and LVM in Linux

df is a utility that tells you available space on mounted filesystems.  If you use the "-h" option, it will format the numbers in human readable format.
 
# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/fedora-root   50G  1.4G   46G   3% /
devtmpfs                 1.9G     0  1.9G   0% /dev
tmpfs                    1.9G     0  1.9G   0% /dev/shm
tmpfs                    1.9G  636K  1.9G   1% /run
tmpfs                    1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs                    1.9G  1.9G     0 100% /tmp
/dev/sda1                477M   78M  374M  18% /boot
/dev/mapper/fedora-home  864G   72M  820G   1% /home



So what we have here is a list of filesystem volumes, how much space they have, and where they're mounted.

The /dev/mapper/ prefix indicates that the specified filesystem is an LVM volume. In this case, there are two: /dev/mapper/fedora-root and /dev/mapper/fedora-home. Since this computer has a single hard drive, these are likely sliced out of /dev/sda2. Linux does this so that you can, in theory at least, expand /dev/mapper/fedora-root or /dev/mapper/fedora-home, at will.

/dev/sda1 is the boot partition - that's where you GRUB is located - that's the thing that the BIOS boots and which in turn boots Linux (or other OS's in a multi-boot configuration).

/dev/sda2 is not mounted at all, because it is formatted to be part of a LVM set.  In theory, when you want to expand /dev/mapper/*, you add another hard drive, put it into the LVM set, and expand /dev/mapper/*.


Wednesday, July 3, 2013

Set Fedora 18 to boot to text console rather than X

From here:

ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target 
 
 

Set hostname in Fedora 18

From here:

hostnamectl set-hostname {name}

hostnamectl status 

Install NFS on Fedora 18

From here:

yum -y install nfs-utils

edit /etc/exports

systemctl start rpcbind.service
systemctl start nfs-server.service
systemctl start nfs-lock.service
systemctl start nfs-idmap.service
systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl enable nfs-lock.service
systemctl enable nfs-idmap.service


Additional crap:

Firewall (from here):

# Enable NFS server

systemctl enable nfs-lock.service
systemctl enable nfs-server.service

systemctl start  nfs-lock.service
systemctl start  nfs-server.service

cat >/etc/firewalld/services/mountd.xml <<EOD<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>mountd</short>
  <description>Mount Lock Daemon</description>
  <port protocol="tcp" port="20048"/>
  <port protocol="udp" port="20048"/>
</service>
EOD

cat >/etc/firewalld/services/rpc-bind.xml <<EOD<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>rpc-bind</short>
  <description>Remote Procedure Call Bind</description>
  <port protocol="tcp" port="111"/>
  <port protocol="udp" port="111"/>
</service>
EOD

restorecon /etc/firewalld/services

firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service nfs
firewall-cmd --reload
firewall-cmd --list-all

Thursday, June 20, 2013

Disable Fedora 18 Power Saving.

Temporary fix:

setterm -blank 0 -powersave off -powerdown 0

Edit /etc/default/grub
Add consoleblank=0 to GRUB_CMD_LINUX

Then:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grep ^menuentry /boot/grub2/grub.cfg
Sources:
  • http://www.cyberciti.biz/tips/linux-disable-screen-blanking-screen-going-blank.html
  • http://ubuntuforums.org/showthread.php?t=1366354