Category Archives: Server Information

Impending hard drive upgrade and howto for the server.

Well, this weekend, I am planning on upgrading the 1TB storage drive on the server to a 2TB drive.  I now already have a 2TB backup drive, and the storage and backup drives are in ‘hot swap’ SATA bays, so it will be fairly easy…. So, I thought I would go over the steps required.  (There aren’t that many.)

First, become root user!

Step #1 : Partition the new disk using fdisk command

Following command will list all detected hard disks:

# fdisk -l | grep '^Disk'

Output:

Disk /dev/sda: 200.0 GB, 200049647616 bytes
Disk identifier: 0xe88de88d
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
Disk identifier: 0xa982b1a3
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
Disk identifier: 0x5f09e44e

You may see a few lines like /dev/dm-x: .  I have snipped them out as they are from LVM and of no concern. The disk identifier lines can also be ignored.

To partition the disk – /dev/sdc, enter:

# fdisk /dev/sdc

The basic fdisk commands you need are:

  • m – print help
  • p – print the partition table
  • n – create a new partition
  • d – delete a partition
  • q – quit without saving changes
  • w – write the new partition table and exit

Step#2 : Format the new disk using mkfs.ext4 command

To format Linux partitions using ext2fs on the new disk:

# mkfs.ext4 /dev/sdc1

(I chose the ext4 filesystem, because it’s a journaling filesystem.)

Step#3 : Mount the new disk using mount command

First create a mount point /disk1 and use mount command to mount /dev/sdc1, enter:

# mkdir /mnt/disk1
# mount /dev/sdc1 /mnt/disk1
# df -H

(I will create /mnt/disk1 as a temporary ‘landing zone’,  since I shall be ‘cloning’ /dev/sdb1 to /dev/sdc1 —  I will go over that easy command in the next post covering this.)

Step#4 : Update /etc/fstab file

Open /etc/fstab file, enter:

# nano /etc/fstab

Append as follows:

/dev/sdb1  /mnt/disk1   ext4   defaults    1 2

Save and close the file.

(You can use vi instead of nano, but I prefer the feel of nano as it’s almost identical to pico.  Guess I’ve dated myself, heh)

I will cover the directory and file cloning in a day or so.

 

Installed UPS software and signalling cable on server

CRAB-UPS

Well, when I replaced the server’s UPS batteries,  I noticed that when I upgraded the hardware in late 2010, I must have forgotten to set up the UPS software.  So, I dug out a UPS printer cable, attached that between the server and the UPS, and used yum extender (since the server is Fedora) to install apcupsd, apcupsd-cgi, and apcupsd-gui.  The screenshot shows apcupsd-gui running.  For those of you that are interested in compiling apcupsd from source code, I will try to add a comment to this post in a day or so.  😉

Planning on changing UPS batteries today.

Well, the replacement batteries for my APC Smart-ups 750XL finally arrived, and I am planning on ‘hot swapping’ the batteries today.  NO server downtime will be associated with this task.  Replacement is indicated because a few months ago, they started failing auto self test, then they passed for a month or so, then started failing again.  So, I think they are toast.  😉

Informational Update

Well, a lot of things have happened since my last blog fell by the wayside. I think I shall only focus on the most recent server stuff.

In November or December of 2010, I upgraded the aging (10-year-old) CRAB server to both new hardware, as well as Fedora 13 (from Redhat 7.3). I really need to update it a few more revisions sometime soon, as I think Fedora is up to 20 or something. They seem to be cranking out the updates at light speed.

Most recently, my ex-wife, Teri, stopped her job, sold her house, and bought an RV. She reached out to me to create a blog for her and her husband’s travels. Her blog is running on PivotX, and I password protected it to keep out unwanted viewers. Otherwise, I’d post the URL here.

On the server-side of the coin, I have just about filled up the 1TB storage drive, so I have already purchased a 2TB ‘upgrade’ hard drive. 🙂 I actually have all the blogs running on it, even though they are utilizing an SQL database structure on the system drive. Since I have the large storage and backup drives residing in ‘hot swap’ bays, I will pop out the backup drive, pop in the upgrade drive, and while the system is running (blogs being updated, music streaming, ftp clients connecting, etc), I will just do a ‘cp -rp’ Linux command, so that it will ‘clone’ the smaller drive to the larger drive (including ALL the filestamps and permissions). When done, I shall just unmount both, pull the smaller drive, and move the larger one to that bay, and reinstall the backup drive.

Bottom line is, my users should see *minimal* down time and inconveniences. 🙂

While I’m at it, I will need to ‘hot swap’ the server/modem/router APC Smartups 750EX UPS batteries, since they are dying.

I will keep y’all posted, but I intend to get proactive on all this the first week of September, or so. (Maybe even upgrading Fedora to 15 or 16, heh)