failed hard drives

April 26th, 2011 No comments

Keeping track of my drive failures, since April 2011.

Age
(Months)
Purchased Died Model
18 2010-04 2011-10 1.5 TB Western Digital Green 64MB Cache 5400RPM
15 2010-04 2011-07 1.5 TB Western Digital Green 64MB Cache 5400RPM
26 2009-02 2011-04 1 TB Hitachi Deskstar 7K1000.B 16MB Cache 7200RPM
Categories: hardware

parted

April 25th, 2011 No comments

Create a single, aligned partition on a drive larger than 2TB.

% sudo parted /dev/sdx
(parted)% mklabel gpt
(parted)% mkpart primary 1 -1
Categories: file systems, howto

New HTPC

January 31st, 2011 No comments

Just replaced my heavily used Ubuntu HTPC with a 6 watt AppleTV 2. Both run XBMC.

Specs of the old, silent HTPC:

  • Intel Core 2 Duo E4300 1.8GHz w/2MB Cache
  • Intel DQ965GF motherboard with passive chipset heatsinks
  • Scythe Ninja passive CPU heatsink
  • 4GB (2x 2GB DIMMS) ADATA DDRII 800 MHz memory
  • 512 MB MSI N210-MD512H GeForce 210 PCIe 2.0 passive video card
  • 40 GB Kingston SSDNOW V-series (Intel rebranded) SATA SSD
  • 18x DL DVD+-RW Optiarc Ad-7170S 2MB Cache SATA optical drive
  • Antec Sonata case
  • Dual 120mm Yate Loon case fans
  • Seasonic 330W power supply
  • Ubuntu 10.04 AMD64 with XBMC

Video is just as smooth on the AppleTV as on the HTPC.

Categories: htpc

15,471,232 Pixels

November 13th, 2010 No comments

Screens I look at on a normal weekday:

  • iPhone 4 (3.5″) (960 x 640)
  • iPad (9.7″) (1024 x 768)
  • Netbook (10.1″) (1024 x 600)
  • Work MacBook (15.4″) (1440 x 900)
  • Work Desktop (27″ + 24″) (2560 x 1440 + 1920 x 1200)
  • Home Desktop (30″) (2560 x 1600)
  • HTPC (42″) (1920 x 1080)
Categories: ramblings

Linux Software RAID10 Benchmarks

January 31st, 2010 1 comment

Tests are done across four 7200RPM SATAII drives on a PCI-X card sitting on a PCI (32-bit, 133MB/sec theoretical max) bus, probably the slowest bus configuration possible, and then again after being moved to a motherboard with dual PCI-X slots. Server is running Ubuntu 9.10 AMD64 Server.

Benchmark is a simple ‘dd’ sequential read and write.

write: dd if=/dev/zero of=/dev/md2 bs=1M
read: dd if=/dev/md2 of=/dev/null bs=1M

mdadm –create /dev/md2 –verbose –level=10 –layout=n2 –raid-devices=4 /dev/sd[ftlm]1

PCI PCI-X
write: 13.2 MB/s 144 MB/s
read: 4.0 MB/s 89.3 MB/s

mdadm –create /dev/md2 –verbose –level=10 –layout=f2 –raid-devices=4 /dev/sd[ftlm]1

PCI PCI-X
write: 48.3 MB/s 131 MB/s
read: 92.7 MB/s 138 MB/s

mdadm –create /dev/md2 –verbose –level=10 –layout=o2 –raid-devices=4 /dev/sd[ftlm]1

PCI PCI-X
write: 47.4 MB/s 135 MB/s
read: 98.7 MB/s 142 MB/s

And more comparisons:

RAID1 (PCI)

write: 38.9 MB/s
read: 64.8 MB/s

Single Disk (PCI)

write: 59.4 MB/s
read: 71.9 MB/s

Categories: file systems, server

Remove Stale LVM Devices

January 23rd, 2010 No comments

Have an LVM device left on your system from a drive that was removed before pvremove was run?

1
$ sudo dmsetup remove /dev/mapper/removed-device
Categories: file systems

My Tivo Twitters

September 22nd, 2009 No comments

I wrote a short script that sends a Tweet whenver my Tivo HD starts recording a show. You can download it below. It runs best on a Linux computer that can constantly poll the Tivo.

Download: tivo_twitter.sh script

Results: http://twitter.com/30west

Categories: devices

365 Days of Uptime on a Linksys router

July 8th, 2009 2 comments

I passed 365 days of uptime on my Linksys WRT54GL v1.1 router. It’s running DD-WRT firmware, and sits on a large APC UPS. Total data transfer on the router’s WAN port is reported at 1,570,619 MB down/ 79,832 MB up.

365days

Categories: devices

Replace an LVM Drive with a Larger One

March 21st, 2009 No comments

LVM allows you to hot add devices to expand volume space. It also allows you to hot remove devices, as long as there are enough free extents in the volume group (vgdisplay) to move data around. Here I’m going to replace a 400 GB drive (sdg) with a 750 GB one (sdf) from logical volume “backup” on volume group “disks”. It does not matter how many hard drives are in the volume group, and the filesystem can stay mounted.

  1. Partition and create a physical volume on the device
    1
    
    $ sudo pvcreate /dev/sdh1
  2. Add the new drive to the volume group
    1
    
    $ sudo vgextend disks /dev/sdh1
  3. Move all extents from the old drive to the new one (this step may take hours)
    1
    
    sudo pvmove -v /dev/sdg1
  4. Remove the old drive
    1
    
    $ sudo vgreduce disks /dev/sdg1
  5. Expand the logical volume to use the rest of the disk. In this case, another 350GB.
    1
    
    $ sudo lvextend -l+83463 /dev/disks/backup
  6. Expand the file system
    1
    
    $ sudo resize2fs /dev/disks/backup
Categories: file systems, howto

mdadm Cheatsheet

November 4th, 2008 No comments

Scan a system for RAID arrays and save findings so the array reappears across reboots:

1
# mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Create a RAID5 array out of sdm1, sdj1, and a missing disk (all partitioned with raid-autodetect partitions)

1
# mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sd[mj]1 missing

Create a RAID1 array

1
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sd[ts]1

Remove a RAID array

1
2
# mdadm --stop /dev/md1
# mdadm --zero-superblock /dev/sd[ts]1

Replace a failed drive that has been removed from the system

1
# mdadm /dev/md3  --add /dev/sdc1 --remove detached
Categories: file systems