[NCARC] Thoughts on Linux filesystems
Zak Smith
zak at computer.org
Wed Oct 17 15:27:46 EDT 2012
Nowadays I run boot/root on an SSD for reliability and then, since my
"home" directory is very large, have a dedicated 2 TB disk mounted on
/home. If I need extra volume for backups, etc, I mount them in the
appropriate place (/b1, /media/extra_disc, whatever). I allocate a
swap partition, but this is almost never used given "modern" amounts
of ram vs. my typical linux workload.
If there are specific subsets of my home directory I want to be
faster, such as mail, I will create a "user" directory on the SSD
filesystem and then just symlink back the appropriate locations in my
home directory.
With typical Linux package management (deb, yum, rpm, etc), there's no
point in keeping software installed from packages separate. I do
recommend keeping stuff you've installed "manually" (not through
packages) in one of the following: /usr/local, /opt, or just installed
in your user account (I typically use /home/zak/tools).
I do not recommend combining multiple partitions or multiple devices
into logical volumes/partitions because it reduces system reliability
(ie in the case of a device failure). If you need a logical partition
larger than the largest physical disk size, you need to have some sort
of underlying raid solution to pool devices into system that is more
reliable than the individual devices.
If you need to run multiple operating systems, I agree with Paul about
virtual machines. For example, I run Debian 6 on my workstation.
I run Windows 7 in VirtualBox for a few applications and testing.
When I want to test out a new linux distribution, I just load it in
another virtual machine in VirtualBox. Tying back into the topic of
discussion, the "filesystems" for these VM's are just files on my
/home volume.
While thinking about storage, do not forget a backup strategy.
Depending on how paranoid you are, this can range from copying a few
key files/directories to a flash stick once a month, to making
redundant, versioned site and off-site backups daily.
Here are a couple of my machines:
$ uname -a
Linux ajax 3.2.0-0.bpo.3-amd64 #1 SMP Thu Aug 23 07:41:30 UTC 2012 x86_64 GNU/Linux
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 168437052 103623224 63127180 63% /
tmpfs 8198592 0 8198592 0% /lib/init/rw
udev 8192672 404 8192268 1% /dev
tmpfs 8198592 0 8198592 0% /dev/shm
tmpfs 3279440 4 3279436 1% /run
/dev/sdb1 1951517908 849460292 1082522496 44% /home
/dev/sdc1 1951517908 1497491800 454026108 77% /home/zak/MEDIA
/dev/sdf1 2927300600 1513445244 1413855356 52% /home/zak/MEDIA/RAW
/dev/sdd1 1922789420 1464731244 360382576 81% /b1
/dev/sde1 1922789420 1140935284 684178536 63% /b2
$ uname -a
Linux styx 3.2.0-0.bpo.2-amd64 #1 SMP Fri Jun 29 20:42:29 UTC 2012 x86_64 GNU/Linux
zak at styx:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd1 113105420 4001808 106838012 4% /
tmpfs 4077400 0 4077400 0% /lib/init/rw
udev 10240 160 10080 2% /dev
tmpfs 4077400 0 4077400 0% /dev/shm
/dev/md0 1951515756 700198628 1251317128 36% /b1
/dev/sdb1 2927300600 1235291264 1692009336 43% /m1
On Wed, Oct 17, 2012 at 08:38:26AM -0600, Paul Davis wrote:
> I used to create different partitions for everything boot, swap, OS,
> usr/local, you get the idea. Now for my home systems I run all my UNIX
> stuff in Virtual Machines and have just one big partition. For the Linux
> and FreeBSD servers I set up at work I have a partition for boot and one for
> swap everything else is under one big partition.
>
> With disk sizes being so big now the main reason behind creating separate
> partitions no longer apply, at least for me. One reason would be to keep OS
> and applications backed up separately but I generally want to back up
> everything together since that would be the way I would restore them.
Along these lines, any "user applications" I have in my home directory
should "work" if I just mount the filesystem on another relatively
similar linux installation. When I upgrade OS versions, I usually
throw in a new boot/root drive and unplug everything else. Once the
base OS installation goes as planned, and I add any non-default
packages (postfix, postgres, or whatever), I can safety plug in and
mount the old /home volume and essentially have my old user
environment back.
BTW, my experience as a unix systems programmer/admin goes back to the
mid 90's, although in the past 10 years I've been mainly just getting
work done using linux.
-z
W8LF
--
# Zak Smith mobile 970-232-4468
More information about the NCARC
mailing list