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 working out a partition scheme for a new install. I'd like to keep the root filesystem fairly small and static, so that I can use LVM snapshots to do backups without having to allocate a ton of space for the snapshot.

However, I'd also like to keep the number of total partitions small. Even with LVM, there's inevitably some wasted space and it's still annoying and vaguely dangerous to allocate more.

So there seem to be a couple of different options:

  • Have the partition that will contain bulky, variable files, like /srv, /var, and /home, be the root partition, and arrange for the core system state — /etc, /usr, /lib, etc. — to live in a second partition. These files can (I think) be backed up using a different backup scheme, and I don't think LVM snapshots will be necessary for them.

  • The opposite: putting the big variable directories on the second partition, and having the essential system directories live on the root FS.

Either of these options require that certain directories be pointers of some variety to subdirectories of a second partition. I'm aware of two different ways to do this: symlinks and bind-mounts. Is one better than the other for this purpose? Is there another option? Do some linux distros support installation using this style of partition layout?

share|improve this question
    
cross-posted on AskUbuntu –  intuited Feb 5 '11 at 16:08
    
What's wrong with just using a single partition and creating a temp snapshot to backup? That's what I do ( with dump as it is faster than tar ). There's nothing dangerous about extending logical volumes with lvm. –  psusi Apr 12 '12 at 2:09

1 Answer 1

Well for starters, your root partition MUST contain '/', '/bin', '/sbin', '/lib', and '/etc'. You can not put these on a separate partition as they are all needed during the boot process before other filesystems are mounted up. (though you can do some messy initrd stuff to get around this, but it'll be a pain when you want to perform some simple task like modify your fstab)

After that, if you want to put the other directories on other partitions you can. Mount bind is the cleaner method of doing this as if you were symlinking, and some task want to look at the free space on /usr, it will query it, only to get the free space on the root partition instead. While I dont know of anything off the top of my head that would do this, the solution is less prone to problems than symlinking.

share|improve this answer
    
Thanks for pointing out the necessity of keeping certain directories on the root partition. Do you know what problems I might encounter because of bind-mounted root directories? –  intuited Feb 16 '11 at 1:22

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.