sobota, 27 października 2007

How to create partitions based on RAID

Nowadays, when I create new server class machine it has allways kind of mirroring. There are sometimes questions how to properly create RAID partitions, what is practice? Here is easy scheme:

We want install two disks 250GB both. They will be mirrored with RAID1. Additionally we want to have LVM on my main RAID partition.

Firstly we have to remember that /boot partition can't be located on LVM. Why? Bootloader can't use LVM. It has to start initrd and then it can start LVM partitions.

So, we create two partitions, same on each disk and bind then into two RAID1 partitions. First, small one, is for /boot while the second is for LVM. On LVM partition we can put partitions anyhow because there is possibility to change size of them in the future. It is not recommended to change size of /root partition (especially reduce) but it is not impossible. We have to remember about swap partition and that is all.

Here are outputs of few commands:

# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
244091520 blocks [2/2] [UU]

unused devices:

# df -h
System plików rozm. użyte dost. %uż. zamont. na
/dev/mapper/wew-root 7,6G 2,5G 4,8G 35% /
/dev/md0 99M 16M 78M 17% /boot
tmpfs 506M 0 506M 0% /dev/shm
/dev/mapper/wew-home 9,5G 154M 8,9G 2% /home
/dev/mapper/wew-var 19G 536M 18G 3% /var

# cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/wew-swap partition 2031608 0 -1

# lvdisplay
/dev/hdc: open failed: Brak medium
--- Logical volume ---
LV Name /dev/wew/root
VG Name wew
LV UUID MHnbOQ-cn2n-Vc0y-xPJA-naUS-KXx5-ZgJYMt
LV Write Access read/write
LV Status available
# open 1
LV Size 7,81 GB
Current LE 250
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/wew/home
VG Name wew
LV UUID gPZHmg-3R7e-Aveg-1fAv-olOV-Du15-zjIvfp
LV Write Access read/write
LV Status available
# open 1
LV Size 9,75 GB
Current LE 312
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

--- Logical volume ---
LV Name /dev/wew/var
VG Name wew
LV UUID HbT3ha-MiRz-y902-xkyb-3Ehj-n3zg-RHvAB6
LV Write Access read/write
LV Status available
# open 1
LV Size 19,53 GB
Current LE 625
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2

--- Logical volume ---
LV Name /dev/wew/swap
VG Name wew
LV UUID 3cLfN5-GzEX-Wrjq-IHvc-Vzx3-lkfB-smhC4n
LV Write Access read/write
LV Status available
# open 1
LV Size 1,94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3


As you can see I'm not using whole disk space. I don't know now what will be bigger in the future, /home or /var, but i'll be able to expand them freely.

środa, 24 października 2007

Wifi for Acer Aspire 3023 WLMi for Ubuntu 7.10

Problem: Wifi for Acer Aspire 3023 WLMi for Ubuntu 7.10 does not work

Resolution: (not trivial)

This is common issue (broadcom wireless) but with little addition. Acer Aspire 3023 WLMi has Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller is described here as 'usually not working'. I don't know in what other notebooks it is mounted but I found resolution for Acer Aspire 3023 WLMi. Problem is in those special buttons - precisely in WiFi button. Adding broadcom firmware does not cause wifi working.

Ok, here is resolution:

Part 1 - install Broadcom wireless bcm4318
Start with this page.
In shortcut:
- obtain windows driver for wireless from here
- unzip it
- install bcm43xx-fwcutter
- use this bcm43xx-fwcutter on downloaded driver
# bcm43xx-fwcutter -w /lib/firmware ./bcmwl5.sys
# bcm43xx-fwcutter -w /lib/firmware/`uname -r` ./bcmwl5.sys
With other broadcom controller now you should have wifi

Part 2 - enable wifi button
There is module written for this purpose - acerhk
In shortcut:
- download this or this and untar
- enter directory
- edit file acerhk.c and change first uncommented line
#include <linux/config.h>

to

#include <linux/autoconf.h>

- # make && make install
- edit file /etc/modules and add following lines:
acerhk poll=1 autowlan=1
bcm43xx
After rebooting notebook it should work. Now you have gleaming wireless button (and mail client button flashing :) - don't ask, I don't know why).

Entry

This is my first blog. It's gonna be tech blog and kind of reminder. I'll insert here interesting things, achievements and so on. In fact this post is just for testing purposes but there is something I want to add.



Let it be manifesto of this techblog.