1 |
On Mon, Aug 04, 2008 at 03:10:37PM +1000, Alan E. Davis wrote |
2 |
> Norberto and Josh: |
3 |
> |
4 |
> Thank you for the suggestion. It's on the back burner. I have the space to |
5 |
> experiment with it now. I have balked for the time being on basis of, |
6 |
> partly, my need to be able to swap drives in and out, and have it clear in |
7 |
> mind which partitions belong to what. Also my main drive is a 10000 RPM |
8 |
> faster drive, and I'd like to keep the partitions or directories that are |
9 |
> mainly for storage separated. I really do notice a difference in the |
10 |
> performance of the drive. this is somewhat of a conundrum: how to keep the |
11 |
> current projects focused on the faster drive. |
12 |
|
13 |
There's another approach with bind mounts to reduce wasted space. The |
14 |
following example is not a joke (notwithstanding the opinions of some |
15 |
posters here <g>). I used a 500 megabyte / partition, playing it safe |
16 |
because it was my first try, but I could've gotten away with 200 megs. |
17 |
Here's what "fdisk -l" and "df" show... |
18 |
|
19 |
[d530][root][~] fdisk -l |
20 |
|
21 |
Disk /dev/sda: 500.1 GB, 500107862016 bytes |
22 |
255 heads, 63 sectors/track, 60801 cylinders |
23 |
Units = cylinders of 16065 * 512 = 8225280 bytes |
24 |
Disk identifier: 0xd0000000 |
25 |
|
26 |
Device Boot Start End Blocks Id System |
27 |
/dev/sda1 1 60801 488384001 5 Extended |
28 |
/dev/sda5 1 62 497952 83 Linux |
29 |
/dev/sda6 63 549 3911796 82 Linux swap / Solaris |
30 |
/dev/sda7 550 60801 483974158+ 83 Linux |
31 |
|
32 |
[d530][root][~] df |
33 |
Filesystem 1K-blocks Used Available Use% Mounted on |
34 |
/dev/sda5 482186 30376 426913 7% / |
35 |
udev 10240 152 10088 2% /dev |
36 |
/dev/sda7 483959368 100296316 383663052 21% /home |
37 |
shm 1031872 0 1031872 0% /dev/shm |
38 |
|
39 |
|
40 |
I create empty /opt /tmp /usr and /var directories in the 500 meg main |
41 |
partition (sda5). Except for swap, the rest of the drive is allocated |
42 |
to sda7, which is mounted as /home. I create /home/bindmounts and then |
43 |
/home/bindmounts/opt /home/bindmounts/tmp /home/bindmounts/usr and |
44 |
/home/bindmounts/var. Then I bindmount them to their equivalants on the |
45 |
/ partition. I have a script to set up the correct permissions. The |
46 |
result is that you can run with a 200 meg main partition, without using |
47 |
LVM. Under /home is /home/misc, where I put /home/misc/movies/ |
48 |
/home/misc/music and /home/misc/photos. |
49 |
|
50 |
This may not be ideal for a production server, but I like it at home, |
51 |
because I don't have to screw around with multiple partitions. |
52 |
|
53 |
-- |
54 |
Walter Dnes <waltdnes@××××××××.org> |