Replacing failed Raid Drive

Scenario / Question: A drive has failed in my raid 1 configuration, and I need to replace it with a new drive. Solution / Answer: Use mdadm to fail the drives partition(s) and remove it from the RAID array. Physically add the new drive to the system and remove the old drive. Create the same [continue...]

Reconnect or login to existing session

Scenario / Question: I logged into an ssh session on a remote computer and lost my connection, how do I reconnect to the same session ? This trick will help users and system administrators become less frustrated when working on remote systems, and not worry about losing their connection to the [continue...]

Force FSCK on Reboot

Scenario / Question: How do I force a fsck on the file system Solution / Answer: To force fsck that is used to check and repair Linux file systems. Fsck should always be run on unmounted file system. By invoking fsck while the system is starting or booting like on a reboot, you can ensure that [continue...]

Moving and Renaming Directories and Files

Now that we know how to create directories and files we need to be able to rename them and move them. In Linux the command to move and rename is the same ! command to rename and move directories and files NAME mv – move (rename) files SYNOPSIS mv [OPTION]… [-T] SOURCE DEST mv [continue...]

Creating Directories and Files

Today we begin learning how to work with the file system. We will cover how to create directories and files. The command to create directories NAME mkdir – make directories SYNOPSIS mkdir [OPTION] DIRECTORY… Lets first change our working directory to the temporary directory /tmp: $ [continue...]

Deleting or Removing Directories and Files

Now that we know how to create directories and files, we need to learn how to delete them. There are two commands for deleting or removing directories in linux. The command “rmdir” and “rm”. The “rmdir” and “rm” commands are unforgiving and there [continue...]

Linux File System Structure

While initially discussion on the file system structure isn’t the most exciting part of Linux. Knowing how the Linux file system is structured will help you understand Linux and be a better Linux user and administrator. The Linux File system is different in that it has One Tree and One [continue...]

Linux IPTables blocking yum

Scenario / Question: I can not use yum and appears that iptables is blocking yum from establishing a connection with the internet. Solution / Answer: IPTables needs to be configured to allow incoming ESTABLISHED,RELATED connections and establish connection with yum servers by allowing outgoing [continue...]

Linux IPTables blocking DNS and open port 53

Scenario / Question: IPTables is blocking DNS and I can not get DNS from Internet. Solution / Answer: IPTables needs to be configured to allow INPUT of port 53 and the OUTPUT of port 53. DNS uses both tcp and udp protocols on port 53 for communicating. UDP is used for queries transferring less [continue...]

How should I run fsck on a Linux file system

Scenario / Question: I need to check file system for errors using fsck. Can I run fsck on a mounted file system ? Solution / Answer: Running fsck on a mounted file system can result in data corruption. The two options are: 1) Change the running state of the system to single user mode and [continue...]

Next Page »