Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm currently running a Debian 6.0 server with EXT3, but I'd like to move over to Arch. It's being used as a file server right now with a 1TB drive in it (of which 650GB in it is used). What I'd like to do at a later point (when I'm not completely broke) is buy another drive and add it to the same system (for backing up my main rig). What would be the easiest way of accomplishing this? I've looked into RAID, but it'd be useless because I'd have to reinitialize the array every time I added a new drive. Note: I'm not fussed about redundancy, it's only going to be hosting mirrored backups which I can easily remake in the case of data loss.

Basically: System with clean 1TB drive in, what should I do now to prepare for a new striped drive at a later date without having to reinitialize any arrays?

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

If you really don't care about reliability, you can use LVM and keep adding physical volumes to a single volume group. That is, you would have a single volume group acting as a virtual drive, made up of several physical volumes (the actual drives). Instead of PC-style partitions, you'd create logical volumes for filesystems and swap.

LVM is a good idea anyway if you're planning to extend your storage or move stuff around. It's a lot easier to resize an LVM volume or move it to a different drive than to do this for PC partitions, and all the LVM stuff can be done online (i.e. while running from the mounted volume).

Linux's RAID subsystem can grow RAID-5 and RAID-6 arrays (it's slow, but can be done online), but curiously not linear arrays, so you'd have to start with at least two disks.

You could also look into ZFS, a filesystem with built-in volume management. I don't know what its capabilities for adding storage are.

share|improve this answer
    
Accepted for good detail. Thanks, chap. –  luaduck Jan 25 '11 at 23:41
    
Recent versions of mdadm can now grow a raid0 on the fly. –  psusi Jul 19 '12 at 14:47
1  
While a good answer I'm kept wondering if there's a preferable choice of file system (rather than volume manager) in case one suspects one will do a lot of file system resizing later on. Perhaps I'm missing something and the choice of file system becomes irrelevant (with respect to resizing) in presence of LVM? –  Tilo Wiklund Jul 19 '12 at 15:45
    
@TiloWiklund You'll want to choose a filesystem that supports resizing, preferably online resizing. Ext2/ext3/ext4 — the default filesystem choice under Linux — is a decent choice: it can be grown online, and shrunk only offline. There isn't an alternative that I'd seriously consider now if the only “unusual” requirement is growth. So while the choice of filesystem is relevant, the default option is a good one, I don't have anything else to recommend. –  Gilles Jul 19 '12 at 16:07
1  
@TiloWiklund Mind, this answer is getting a bit old; BTRFS has better support now (and destined to improve), and I think it supports online resizing in both directions, so it may be a better choice if you start now. –  Gilles Jul 19 '12 at 16:10
show 2 more comments

Hey, I'm stupid! I can just use LVM (which I forgot can do striping). The rubber-ducking debugging method comes to the rescue again

share|improve this answer
add comment

I was looking for something like that, and found XtreemFS

http://www.xtreemfs.org/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.