Fresh HDD space arrived

WD30EZRXTwo years have past since I installed two 2TB disks on my home server. Last week I squeezed out the remaining bytes of my data volume, so I ordered two brand new 3TB Western Digital harddisks (WD30EZRX) to replace the current 2TB ones. Two things prevented an upgrade as easy as the previous one. First I wanted to do a clean install of Debian 7.1 “Wheezy” and secondly wanted to switch to UEFI boot and GPT, so I had to create a new partition table and a new EFI boot partition.

System specification (before upgrade):

  • Intel DQ67EPB3 board
  • Debian 6.0.7 “Squeeze”
  • 2x WD20EARS (in software RAID1 and LVM2)

(more…)

Oracle 11g ASM disk discovery

During the installation of Oracle 11gR2 on Red Hat Enterprise Linux 5 I stumbled upon a incorrect default setting for ASM disk discovery when using ASM lib. The discovery path is set to ‘/dev/raw/sd*’, which is incorrect because ASM lib creates the devices under ‘/dev/oracleasm/disks’.

Another thing to be aware of is the ownership of the disks. You need to run ‘/etc/init.d/oracleasm configure’ in order to configure the owner. If you just hit return the ownership of the disks is set to root. Because you will start the Oracle installation as user oracle the disks will not appear in the discovery step during the installation.

(more…)

Home server HDD upgrade

It’s been 1,5 year since I build a new home server. I’m quite happy with this system, but lately I am running out of hard disk space. This is mainly caused by HD movie editing which I’m recently into. That’s why I bought two new 2 TB hard disks (WD20EARS) today to replace the current 1 TB ones (WD10EVVS).

I’ve done my hard disk setup with Linux soft raid 1 (mirror). So the plan is to break the mirror switch one pair of disks, rebuild the mirror and repeat this for the other pair.

It essentially comes down to the following commands having two disks, sda and sdb, both with two partitions.

Break the mirror:
[code]
# mdadm /dev/md0 –set-faulty /dev/sdb1
mdadm: set /dev/sdb1 faulty in /dev/md0
# mdadm /dev/md0 –remove /dev/sdb1
mdadm: hot removed /dev/sdb1
# mdadm /dev/md1 –set-faulty /dev/sdb2
mdadm: set /dev/sdb2 faulty in /dev/md0
# mdadm /dev/md1 –remove /dev/sdb2
mdadm: hot removed /dev/sdb2
[/code]

Shutdown the system, and swap disks. Be sure to swap the correct disk, the one that have been removed from the mirror.

Power on the system and partition the newly added disk. This is where I had to pay attention. It appears the new Western Digital disks are 4096-byte per sector disks instead of the traditional 512-byte sector disks. In order to have good performing disks I had to correct the alignment of the new disk. This covered in greater detail on this page.

Partition the disks (ensure that you’re root filesystem is bootable):
[code]
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              64         126      506047+  fd  Linux raid autodetect
/dev/sdb2             134       12292    97667167+  fd  Linux raid autodetect
[/code]

Add the new disk to the mirror and watch the sync progress:
[code]
# mdadm /dev/md0 –add /dev/sdb1
# watch cat /proc/mdstat
# mdadm /dev/md1 –add /dev/sdb2
# watch cat /proc/mdstat
[/code]

Install grub on the new disk and  repeat the above steps for the other disk.

After the sync is completed run the grow command:
[code]
# mdadm /dev/md1 –grow –size=max
[/code]

Finishing steps:
[code]
# pvresize –verbose /dev/md0
# lvresize –verbose -L /dev/mapper/VG-LV
# resize2fs /dev/mapper/VG-LV
[/code]