Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

home server

thoth (7907) writes | more than 3 years ago

User Journal 0

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 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!

Sorry! There are no comments related to the filter you selected.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?