lvm

Extending the logical var-volume

29.11.07, 18:53 | Tags: , | No comments

On my server, the /var-volume (in fact, the logical device /dev/vgroup/var, part of my LVM), is running slowly out of space. Therefore, I decided to extend it by 5 GB.

Fortunately, with reiserfs, you can do this while the volume is mounted – at least, this is what is said in the LVM-howto.

So, here’s what I did (after doing a full backup):

lvextend -L+5G /dev/vgroup/var
resize_reiserfs -f /dev/vgroup/var

This went extremely well and fast – I was really (positively) surprised! :)

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Preparing the server’s installation

29.05.07, 20:42 | Tags: , | No comments

I have to admit something: I already started working on the server, but somehow, I blew it up. I don’t know what the exact problem was, but I had nothing but trouble.
I decided to start all over; also, because I had read through some security guides concerning PaX and grSecurity and did not understand one single word, I decided to stick with normal gentoo-sources and not with hardened-sources (but still securing the box as much as possible).

Here’s what we do today: Setting up the LVM. Download the stage3 and portage tarball, extract them and prepare make.conf. Quite a big deal, so let’s get started!

LVM-setup: First, make sure that /dev/hda3 and /dev/hdb1 are set to partition type 8e (LVM). Then, activate the swap on /dev/hda2. Now, using the LVM guide, I create a volume group called “vgroup” containing the partitions /dev/hda3 and /dev/hdb1. Then, I create these directories as logical volumes:

  • /usr (takes 9.1GB on the current environment) – I’ll give this 20GB
  • /opt (not existent on the current environment) – I’ll give this 2GB
  • /var (takes 720M on the current environment) – this will get 10GB
  • /tmp (takes almost nothing on the current environment) – this will get 2GB
  • /home (containing all the MP3s, videos and all the data, currently taking 33G) – this will get the largest part of the rest, I make it with 200GB.
  • This leaves around 40GB unallocated for emergencies.

As described in the LVM guide, I create the logical volumes and format them – with reiserFS, I decided to give it a shot.
Now, following chapter 5 of the handbook, I download the i686 stage3 tarball and the portage snapshot. I extract both, as given in the handbook. Then, I update make.conf to look like this:
CHOST="i686-linux-pc-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
PORTAGE_NICENESS=3
AUTOCLEAN="yes"
FEATURES="distlocks parallel-fetch"
USE="nptl"

Let’s advance to chapter 6 of the handbook – before chrooting, select the mirrors and the rsync mirror and finally copy over DNS info. That’s about it for today – stay tuned for more!

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Reinstall the server – the project’s start

26.05.07, 16:26 | Tags: ,,, | No comments

After I have been blogging about my server quite a bit, it is now finally the time to start all over.

After my new client is up and running, I had some spare parts, and as already mentioned, I decided to put all of them together into a brand-new server box. Here’s the new hardware list:

  • Case: SilentMaxx ST-11 – still a robust tower with not much noise
  • Power: Verax FSP300-60ATV 80PRO – silent power supply with 200W, suitable for P4 (note that the manufacturer’s website does not seem to exist properly any more – at least, I could not find any link to the product; I found this and this instead)
  • CPU: Intel Pentium 4 with 2.5 GHz – this is a leftover from my old client
  • Mainboard: Asus P4PE – again a leftover from my old client, a 478 mainboard with Intel 82845PE / ICH4 chipset. There is no product site to be found any more at the Asus website – but there are still some downloads
  • RAM: Kingston KVR333X64V25/512 – 2x 512MB, Standard 64M X 64 Non-ECC 333MHz 184-pin Unbuffered DIMM (SDRAM-DDR, 2.5V, CL2.5, Gold)
  • Harddisk Drives: Here comes the fun part, as I now have two HDD – first, a Samsung Spinpoint SP1203N with 120G, second a Seagate Barracuda 7200 (ST3160021A, again no proper manufacturer link, but using Google, I found this) with 160 GB – I will install LVM to get the best out of them.
  • Graphic adaptor: an old Hercules 3D Prophet II; unfortunately, there is no adaptor embedded on the mainboard, so I had to use this one
  • DVD-drive: Plextor PX-116A (no manufacturer website to be found any more
  • DVD-R drive: LG GSA-4081B
  • Network adapter: integrated on Mainboard, a Broadcomm (I have to find out which one it is)
  • Printer: HP Deskjet 970Cxi
  • Scanner: Canon CanoScan N670U with 600×1200dpi and USB interface (no manufacturer page any more)

Now, the parts are assembled into an old case and let’s boot…. :)

In setup, I make sure that all IDE drives are properly detected; I disable the floppy drive, the second COM port, the parallel port, the gameport, the audio; then, I make sure that “Power up on PCI” is enabled for later power up on LAN.

Now, using a knoppix, I make sure everything is detected; the LAN is a broadcomm BCM4401, the Graphic adapter is detected as a Geforce 2 MX400, and the North- and the southbridge are there, too.

So, I start with wiping out the harddisk drives using cfdisk. Then, it is time to set up some new partition scheme! As I will have only a small /, containing some necessary stuff, I decided to have a partition scheme like this:
/dev/hda1 /    4GB
/dev/hda2 swap 512MB
/dev/hda3 LVM  the rest of hda
/dev/hdb1 LVM  the whole of hdb

I write these partition tables to the disk. That’s it for now; next is to start with a proper gentoo cd and activate LVM to create the volume groups. Then, it’s time to get Gentoo up and running!

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon

Some ideas for the server

17.05.07, 18:50 | Tags: ,, | No comments

This is mainly a “note to self”, but why don’t post it? Maybe it will help some others….

As I now have a new client and everything is save and working ok, it’s time to put the old hardware away. But today I had the idea of combining the old server hardware (which will be reinstalled anyway) and some of the old client’s hardware into a brand new server…. let’s see what I can make out of this. An LVM might be an idea, as I will have two harddisk-drives then…

Also, there was a nice article in this week’s c’t about automatically waking up a Linux system – something that I will try to implement on my new server. Finally, I will install vmware on the server instead of the client – because most of the time, my server is doing nothing (besides, well, serving some files), so why not use it’s computing power for this? Let’s see how far this will advance…
What else shall the server do besides what it is already doing? Well, some remote X can come in handy from time to time – so despite other thoughts initially, I will probably put X onto it (but no Gnome or KDE, just something like some simple window manager or so…. Also, I will probably add NFS in addition to Samba (why using Samba when sharing from Linux to Linux?); the Backup mechanism needs some serious rethinking (because I almost do not use it nowadays), including making the USB harddrive accessible on the LAN. One possibility is Amanda; there is an entry on the Gentoo Wiki dedicated to Backup programs and strategies. Finally, I want an Apache Tomcat server to be up and running on the box; also, some kind of VPN would be nice…
I will start with the whole “server rebuilding project” in mid-summer, I assume.

Share and Enjoy:
  • Digg
  • Twitter
  • del.icio.us
  • Facebook
  • Technorati
  • MySpace
  • StumbleUpon