Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
User Journal

Journal thoth's Journal: home server

I decided to get fancy with my small home network and get a server. My goal is to make it a file server and then eventually configure other services such as web server, backup server, and perhaps others. If I really get fancy and figure out how to do it, I'd like to make this system an LDAP server and have network logins for my computers. I'll chip away at this piece by piece over the upcoming months.

I bought a mini server, an HP N36L, and two 2 TB drives to go with it. It came with a 250 GB drive, so I bought the two 2 TB drives to setup a mirror. Great little box at a good price, but it didn't come with an optical drive so I install Debian Squeeze 64 bit via USB memstick.

The first thing I want to do, after getting the server up and running basic services, is to consolidate files (music, videos). After that, get my notebook computers backing up using backuppc (backuppc.com). But before all that, I need to create a mirror using those two 2TB drives. That means using mdadm for RAID, then creating an LVM volume on top of that space.

Create a RAID mirror:
sudo /sbin/mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sdb /dev/sdc

Check on it:
sudo /sbin/mdadm --detail /dev/md0
cat /proc/mdstat

Create the logical volume:
sudo /sbin/pvcreate /dev/md0
sudo /sbin/vgcreate lvm-mirror /dev/md0
sudo /sbin/vgdisplay lvm-mirror
sudo /sbin/lvcreate -l 476931 lvm-mirror -n mirror

Note: the 476931 came from the total number of PE's available in the volume group.

The mirror resync was crunching along fine, so I formatted the logical volume:
sudo mkfs.ext4 /dev/lvm-mirror/mirror

I mounted this, then unmounted and added a line into /etc/fstab, double checking it mounted with "mount -a". So far so good!

This discussion has been archived. No new comments can be posted.

home server

Comments Filter:

If you think the system is working, ask someone who's waiting for a prompt.

Working...