LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2006, 09:01 PM   #1
neptune_
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
Can't decide on disk partitioning


Hi everyone,

I just upgraded my computer and trying to plan a Ubuntu 6.06 installation.

However, I'm stuck at trying to determine how best to partition the disks I have:
1x 160gb SATA
1x 200gb IDE

To be honest, I haven't decided what role this system will have. It's going to become my daily-use machine: web, email, music, video, dvd/cd writing, etc.
Apart from that, it will need to communicate with my Windows print server and shared folders (also on Windows).
Eventually, the plan is to migrate these two functions over to this system on Ubuntu.

My wife has a Windows laptop that requires printing and shared storage space. And I have the aforementioned Windows system (which is my current daily use machine). The Windows desktop has just 2x 13gb IDE and 1x 4gb SCSI drives.

I spent some time today researching this topic.

Here's what I've come up with:

swap - 2 GB (system has 1GB physical RAM)
boot - 150 MB
root - 5 GB
tmp - 1 GB
usr - 25 GB
opt - 25 GB
var - 25 GB
home - 30 GB
media - 100 GB
fat32 - 30 GB
export - 30 GB *

total: 273.15 GB

* Regarding the export or srv partition: what filesystem does it need to be if I use SAMBA to share files across my Windows network? Does this need to be FAT32 or can I use XFS or ext3?

How does this scheme look? I'd appreciate some constructive critique / suggestions / comments.
Keep in mind that I'm a newbie and trying to learn so please be gentle.

Thanks!
 
Old 10-12-2006, 09:32 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,274

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Mmmmm - no doubt you chose Ubuntu because it looks (somewhat) like Windows and is simple.
A partition scheme like that is just asking for trouble. You will be driven nuts trying to move stuff around when one of those partitions fills up.

Separate boot, swap home is fine - give the rest of the (boot) disk to the system; as one partition. Then it doesn't matter where the growth is.
If one directory (say /media) gets too big, give it some space on the other disk, and move it over. Much easier to do it at your convenience when you are more comfortable with how things are working.
Simple is usually best.
 
Old 10-12-2006, 10:30 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
There are two types of people: Those who like to partition and those who don't. While there is some truth to syg00's comment "Simple is usually best", there is also some truth to "Flexibility (and it's inherant complexity) is sometimes best".

It depends on your personal mindset and if you like the feeling of successfully juggling complexity, or if you prefer simplicity.

It appears to me that you are not one to be intimidated by the more complex. I base this on the fact that you say you're a newbie, but you've already done enough research to propose a not-so-newbie partitioning scheme. Personally I like your basic scheme, but disagree with your chosen partition sizes.

I would recommend you look into LVM ("Logical Volume Management"). This is not normally a newbie thing, but you don't seem to be acting like a newbie. LVM allows you to easily change "partition" sizes (actually "logical volumes", but functionally equivalent to partitions). So you don't have to get the sizes right on your first guess. Adjust them later. Check out the LVM HowTo at http://tldp.org/HOWTO/LVM-HOWTO/

Quote:
Regarding the export or srv partition: what filesystem does it need to be if I use SAMBA to share files across my Windows network?
Any filesystem type you want. The underlying filesystem does not matter to Samba, as Samba shares things using the smb protocol.

---

And to give syg00 a good laugh, below is one of my systems! Simple? Bahhh ... who needs simple!!!

I would not recommend it, unless one of your goals is to just learn by experimenting. I started off with each LVM logical volume as small as practical, and grew each one as needed. Look closely at my fdisk output and you'll see lots of free unpartitioned space on hdb, and even some unpartitioned space in the middle of hda! My original plan for hda was for Windows to grow upward, and for Linux to grow downward. So that's what left the free space in the middle. Now I don't even dual-boot to Windows anymore, so those partitions will probably be gobbled up into LVM PV's soon.

The most useful info for you might be my df output. You can see how much I'm using of /usr, /opt, /var, /boot, etc. Way less than you are proposing with your hard partitioning scheme. I have 1Gb of memory and 512Mb of swap. I don't think my system has ever touched swap (it's a basic desktop installation). 2Gb of swap is a waste of disk space IMHO.
Code:
-----------------------------------------------------------------------------
# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/hda8                             287M  148M  125M  55% /
/dev/hda9                              30M  7.6M   21M  28% /boot
/dev/mapper/vg_linux-opt              614M  536M   60M  91% /opt
/dev/mapper/vg_linux-tmp               94M  4.4M   85M   5% /tmp
/dev/mapper/vg_linux-usr              3.3G  2.8G  443M  87% /usr
/dev/mapper/vg_linux-var              1.4G  896M  472M  66% /var
/dev/mapper/vg_myth-recordings        159G  126G   34G  80% /srv/video/mythtv
/dev/mapper/vg_fileserver-music        16G   15G  980M  94% /srv/music
/dev/mapper/vg_fileserver-photography 8.9G  8.0G  499M  95% /srv/photography
/dev/mapper/vg_fileserver-data        992M  508M  444M  54% /srv/data
/dev/mapper/vg_linux-home             192M  131M   56M  71% /home
tmpfs                                  10M  172K  9.9M   2% /dev
tmpfs                                 507M     0  507M   0% /dev/shm
-----------------------------------------------------------------------------
# fdisk -l
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          34      273073+   b  W95 FAT32
/dev/hda2              35         799     6144862+   7  HPFS/NTFS
/dev/hda3            2272       24321   177116625    f  W95 Ext'd (LBA)
/dev/hda5            2272       22939   166015678+  8e  Linux LVM
/dev/hda6           22940       24214    10241406   8e  Linux LVM
/dev/hda7           24215       24278      514048+  82  Linux swap / Solaris
/dev/hda8           24279       24317      313236   83  Linux
/dev/hda9   *       24318       24321       32098+  83  Linux

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        6080    48837568+   5  Extended
/dev/hdb5               1        1216     9767457   8e  Linux LVM
/dev/hdb6            1217        2432     9767488+  8e  Linux LVM
/dev/hdb7            2433        3648     9767488+  8e  Linux LVM
/dev/hdb8            3649        4864     9767488+  8e  Linux LVM
/dev/hdb9            4865        6080     9767488+  83  Linux
-----------------------------------------------------------------------------
# pvs
  PV         VG            Fmt  Attr PSize   PFree
  /dev/hda5  vg_myth       lvm2 a-   158.32G      0
  /dev/hda6  vg_linux      lvm2 a-     9.77G   3.88G
  /dev/hdb5  vg_backup     lvm2 a-     9.31G      0
  /dev/hdb6  vg_fileserver lvm2 a-     9.31G      0
  /dev/hdb7  vg_fileserver lvm2 a-     9.31G 320.00M
  /dev/hdb8  vg_fileserver lvm2 a-     9.31G   1.64G
-----------------------------------------------------------------------------
# vgs
  VG            #PV #LV #SN Attr  VSize   VFree
  vg_backup       1   1   0 wz--n   9.31G    0
  vg_fileserver   3   3   0 wz--n  27.94G 1.95G
  vg_linux        1   5   0 wz--n   9.77G 3.88G
  vg_myth         1   1   0 wz--n 158.32G    0
-----------------------------------------------------------------------------
# lvs
  LV          VG            Attr   LSize   Origin Snap%  Move Log Copy%
  backup      vg_backup     -wi-a-   9.31G
  data        vg_fileserver -wi-ao   1.00G
  music       vg_fileserver -wi-ao  15.99G
  photography vg_fileserver -wi-ao   9.00G
  home        vg_linux      -wi-ao 204.00M
  opt         vg_linux      -wi-ao 652.00M
  tmp         vg_linux      -wi-ao 100.00M
  usr         vg_linux      -wi-ao   3.46G
  var         vg_linux      -wi-ao   1.49G
  recordings  vg_myth       -wi-ao 158.32G
-----------------------------------------------------------------------------

Last edited by haertig; 10-12-2006 at 10:35 PM.
 
Old 10-12-2006, 10:30 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
This is when engineers sometimes stop and ask "What swamp are we trying to drain?"

Let me start by asking why you need more that ONE partition.....OK, you probably do want swap, so make it TWO.

Beyond that, I understand the reason for /home to be separate, and maybe also for a separate /boot. So I can see four partitions. Any more and I think you really need to ask what you are trying to accomplish.
 
Old 10-12-2006, 10:41 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by pixellany
This is when engineers sometimes stop and ask "What swamp are we trying to drain?"
Hey, I'm an engineer and I never ask this! I thought we were trying to create a swamp, not drain one!!!
 
Old 10-12-2006, 11:05 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,274

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Helps prove the adage that Linux is all about choice.
As for haertig ... phhhhttt !!!!. One of one boxes has nine (last count) different systems - including Solaris.
It has (more than) it's share of partitions. But unnecessary in this case IMHO.
However, as always, I'm happy to accede to your (constant ... ) attempts to convert the unwashed masses to the benefits of LVM.
 
Old 10-12-2006, 11:17 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by syg00
I'm happy to accede to your (constant ... ) attempts to convert the unwashed masses to the benefits of LVM.
Yes, am am opinionated in my enthusiasm for LVM, aren't I???!!! What can I say. I was always a big fan of partitioning, even when I was a toddler back in the '50s. With all the systems I've set up in the past, and all the partition sizes I've mis-guessed, LVM was my savior! Screw things up initially, and fix them later. It's a perfect match for the way I do things!
 
Old 10-13-2006, 08:32 AM   #8
neptune_
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by haertig
There are two types of people: Those who like to partition and those who don't. While there is some truth to syg00's comment "Simple is usually best", there is also some truth to "Flexibility (and it's inherant complexity) is sometimes best".

It depends on your personal mindset and if you like the feeling of successfully juggling complexity, or if you prefer simplicity.

It appears to me that you are not one to be intimidated by the more complex. I base this on the fact that you say you're a newbie, but you've already done enough research to propose a not-so-newbie partitioning scheme. Personally I like your basic scheme, but disagree with your chosen partition sizes.

I would recommend you look into LVM ("Logical Volume Management"). This is not normally a newbie thing, but you don't seem to be acting like a newbie. LVM allows you to easily change "partition" sizes (actually "logical volumes", but functionally equivalent to partitions). So you don't have to get the sizes right on your first guess. Adjust them later. Check out the LVM HowTo at <url removed>

Any filesystem type you want. The underlying filesystem does not matter to Samba, as Samba shares things using the smb protocol.

---
Your insight is very helpful!

Yes, I am familiar with LVM and in fact, it is my intention to use it in my partition scheme. I've read the How-To document already that you've linked to, and to be honest, I've played around a little with resizing LVM partitions in the recent past based solely on that same How-To. I feel fairly confident in using LVM.

My question to you is - what would your recommendation be on partition sizes then? Perhaps I can reduce swap to 1 GB? I'd rather shoot high and adjust down later if needed. However, I do see the point that others have made about having too many partitions. By nature, I'm a pretty organized guy and lumping everything together bothers me. Having said that, I don't mind a good compromise between simple yet organized.

Quote:
Originally Posted by haertig
And to give syg00 a good laugh, below is one of my systems! Simple? Bahhh ... who needs simple!!!

I would not recommend it, unless one of your goals is to just learn by experimenting. I started off with each LVM logical volume as small as practical, and grew each one as needed. Look closely at my fdisk output and you'll see lots of free unpartitioned space on hdb, and even some unpartitioned space in the middle of hda! My original plan for hda was for Windows to grow upward, and for Linux to grow downward. So that's what left the free space in the middle. Now I don't even dual-boot to Windows anymore, so those partitions will probably be gobbled up into LVM PV's soon.

The most useful info for you might be my df output. You can see how much I'm using of /usr, /opt, /var, /boot, etc. Way less than you are proposing with your hard partitioning scheme. I have 1Gb of memory and 512Mb of swap. I don't think my system has ever touched swap (it's a basic desktop installation). 2Gb of swap is a waste of disk space IMHO.
Code:
-----------------------------------------------------------------------------
# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/hda8                             287M  148M  125M  55% /
/dev/hda9                              30M  7.6M   21M  28% /boot
/dev/mapper/vg_linux-opt              614M  536M   60M  91% /opt
/dev/mapper/vg_linux-tmp               94M  4.4M   85M   5% /tmp
/dev/mapper/vg_linux-usr              3.3G  2.8G  443M  87% /usr
/dev/mapper/vg_linux-var              1.4G  896M  472M  66% /var
/dev/mapper/vg_myth-recordings        159G  126G   34G  80% /srv/video/mythtv
/dev/mapper/vg_fileserver-music        16G   15G  980M  94% /srv/music
/dev/mapper/vg_fileserver-photography 8.9G  8.0G  499M  95% /srv/photography
/dev/mapper/vg_fileserver-data        992M  508M  444M  54% /srv/data
/dev/mapper/vg_linux-home             192M  131M   56M  71% /home
tmpfs                                  10M  172K  9.9M   2% /dev
tmpfs                                 507M     0  507M   0% /dev/shm
-----------------------------------------------------------------------------
# fdisk -l
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          34      273073+   b  W95 FAT32
/dev/hda2              35         799     6144862+   7  HPFS/NTFS
/dev/hda3            2272       24321   177116625    f  W95 Ext'd (LBA)
/dev/hda5            2272       22939   166015678+  8e  Linux LVM
/dev/hda6           22940       24214    10241406   8e  Linux LVM
/dev/hda7           24215       24278      514048+  82  Linux swap / Solaris
/dev/hda8           24279       24317      313236   83  Linux
/dev/hda9   *       24318       24321       32098+  83  Linux

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        6080    48837568+   5  Extended
/dev/hdb5               1        1216     9767457   8e  Linux LVM
/dev/hdb6            1217        2432     9767488+  8e  Linux LVM
/dev/hdb7            2433        3648     9767488+  8e  Linux LVM
/dev/hdb8            3649        4864     9767488+  8e  Linux LVM
/dev/hdb9            4865        6080     9767488+  83  Linux
-----------------------------------------------------------------------------
# pvs
  PV         VG            Fmt  Attr PSize   PFree
  /dev/hda5  vg_myth       lvm2 a-   158.32G      0
  /dev/hda6  vg_linux      lvm2 a-     9.77G   3.88G
  /dev/hdb5  vg_backup     lvm2 a-     9.31G      0
  /dev/hdb6  vg_fileserver lvm2 a-     9.31G      0
  /dev/hdb7  vg_fileserver lvm2 a-     9.31G 320.00M
  /dev/hdb8  vg_fileserver lvm2 a-     9.31G   1.64G
-----------------------------------------------------------------------------
# vgs
  VG            #PV #LV #SN Attr  VSize   VFree
  vg_backup       1   1   0 wz--n   9.31G    0
  vg_fileserver   3   3   0 wz--n  27.94G 1.95G
  vg_linux        1   5   0 wz--n   9.77G 3.88G
  vg_myth         1   1   0 wz--n 158.32G    0
-----------------------------------------------------------------------------
# lvs
  LV          VG            Attr   LSize   Origin Snap%  Move Log Copy%
  backup      vg_backup     -wi-a-   9.31G
  data        vg_fileserver -wi-ao   1.00G
  music       vg_fileserver -wi-ao  15.99G
  photography vg_fileserver -wi-ao   9.00G
  home        vg_linux      -wi-ao 204.00M
  opt         vg_linux      -wi-ao 652.00M
  tmp         vg_linux      -wi-ao 100.00M
  usr         vg_linux      -wi-ao   3.46G
  var         vg_linux      -wi-ao   1.49G
  recordings  vg_myth       -wi-ao 158.32G
-----------------------------------------------------------------------------
This is great! I love seeing how others have partitioned their disks. Your post has definitely helped and given me some further points to consider.

Much appreciated!
 
Old 10-13-2006, 12:51 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Here's what I originally allocated to my major filesystems. Remember, I try to start out small and grow as needed. These initial allocations were sufficient to install a Debian "Desktop System".
Code:
/boot  25Mb
/     300Mb
/usr    2Gb (LVM)
/var    1Gb (LVM)
/opt   50Mb (LVM)
/tmp  100Mb (LVM)
/home  50Mb (LVM)
Also, I have /usr/local symlinked to /opt

Here's what I'm currently using of these major filesystems:
Code:
/boot   8Mb used,  25Mb allocated
/     150Mb used, 300Mb allocated
/usr    3Gb used, 3.3Gb allocated
/var    1Gb used, 1.5Gb allocated
/opt  550Mb used, 650Mb allocated
/tmp    5Mb used, 100Mb allocated
/home 150Mb used, 200Mb allocated
I also have other LVM filesystems specific to my installation. These include /srv/video/mythtv, /srv/photography, /srv/music, /srv/data, and /backup. /backup is not normally mounted (only during backups or restores).

Multiple filesystems (on hard partitions or LVM logical volumes) allow you to chose different filesystem types as needed. In my case, I use ext3 across the board except for /srv/video/mythtv, which is XFS. When chosing a filesystem type to use with LVM, keep in mind that all the Linux filesystem types allow you to grow them, but not all of them allow you to reduce them. I know XFS and JFS cannot be shrunk ... there may be others as well. Keep this in mind when chosing types. The lvreduce command supplied by LVM is useless if you cannot shrink the filesystem installed on that logical volume.

Multiple filesystems will encapsulate filesystem corruption should you be unlucky enough to run into that. For example, if my /opt became corrupted I would expect to be able to boot my system (errors would occur when trying to mount /opt, but the system would still boot). I could then recreate the /opt filesystem ("reformat") and restore from my /opt backup. That /opt backup is much smaller than a backup from a different system with everything under one big / filesystem. If you experienced filesystem corruption in your one and only big / filesystem, you might find yourself in a non-bootable situation. Of course if I corrupted my / filesystem, I'd be just as screwed as everybody else (non-bootable possibly). However, booting Knoppix and restoring / from my / backup (only 150Mb) would be quick and easy. (Although, I do have a /backup filesystem, that is not the ONLY place I store my backups. They are stored there for quick access if possible, but they are also stored offline for the BIG disaster situations!)

Your question on swap size - I can only tell you what I did, not what's necessarily "correct". I have 1Gb of memory on a desktop system. I setup 512Mb of swap. My system never touches this swap (which is a good thing, BTW!) Take that for what it's worth.

---

What I would change were I to start from scratch again:

(1)

I initially partitioned some Windows stuff at the beginning of the disk. I then partitoined Linux stuff at the end of the disk. Leaving the middle unpartitioned. My thoughts were that if I wanted to change Windows partition sizes later, it would be much easier to expand into that unused adjacent free space in the middle of the disk. Partition Magic handles this Windows resizing, but it's much happier dealing with adjacent space.

That sounds good in theory (at least it did to me), but practically it caused some headaches. After initial partitioning, I added another Linux LVM volume to the middle of the disk, as a logical partition inside the existing extended partition. This caused all my Linux partition numbering to shift. Originally /boot was hda8. Now it's hda9. A similar move occurred for my / partition. To deal with this change I had to modify grub's menu.lst, /etc/fstab, and recreate a new initrd. I did the grub and fstab stuff right off the bat realizing that was obviously needed. But I didn't consider the initrd step. So I had a non-bootable system for a while (Knoppix to the rescue to create a new initrd, after I figured out what had gone wrong.) In retrospect, this hassle would have been avoided with a more standard "partition and grow from the start of the disk" scenerio. Oh well, at least I gained experience in recreating initrd's targeted for Debian from within a Knoppix boot (a bit of symlink'ing and chroot'ing was required due to differing kernel versions)! It didn't help that at that time Knoppix (version 4) did not support LVM2 (only LVM1). But you can apt-get install LVM2 into Knoppix4. Knoppix5 now supports LVM2 out of the box.

(2)

When I first setup my system, I didn't know how much I'd be using Windows and how much Linux. LVM is great for changing Linux filesystem sizes, but Windows is not so sophisticated. So to allow maximum flexibility for future partitioning of unused space (Linux or Windows), I created multiple smaller LVM PV's ("physical volumes") out of multiple hard partitions. That allowed unused chunks or disk to later be hard partitioned for Windows, or turned into additional LVM PV's for addition to a VG ("volume group").

While not creating any problems, that was overkill. I would say give a hard partition to /boot, another one to /, and then turn the remainder of the disk into one LVM PV. Then carve out your logical volumes for your filesystems from that (including swap). I have a seperate hard partition for swap, but in retrospect that probably should have been put on LVM as well.

I wouldn't even install Windows. After learning and becoming comfortable with Linux, I doubt you'll be going back (or even dual-booting). At least with LVM it's easy to do a pvcreate on those extra Windows partitions and snarf them up into some LVM volume group. So no real harm done by initially installing Windows, I guess. Other than a bit of wasted time. If you do decide to dual-boot Windows, do yourself a favor and install Windows first (but leave unpartitioned disk space for Linux). Linux is much kinder to an existing Windows install than Windows is to an existing Linux one.
 
Old 10-13-2006, 01:17 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by haertig
Hey, I'm an engineer and I never ask this! I thought we were trying to create a swamp, not drain one!!!
I work in the Space Business (JPL)--one of my all time favorites spotted on a colleagues door:
The JPL way: "If you can see the light at the end of the tunnel--order more tunnel."

Yes, engineers excel at finding new swamps to drain. The management periodically has to declare victory and move on.
 
Old 10-13-2006, 01:21 PM   #11
neptune_
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by haertig
Here's what I'm currently using of these major filesystems:
Code:
/boot   8Mb used,  25Mb allocated
/     150Mb used, 300Mb allocated
/usr    3Gb used, 3.3Gb allocated
/var    1Gb used, 1.5Gb allocated
/opt  550Mb used, 650Mb allocated
/tmp    5Mb used, 100Mb allocated
/home 150Mb used, 200Mb allocated
I also have other LVM filesystems specific to my installation. These include /srv/video/mythtv, /srv/photography, /srv/music, /srv/data, and /backup. /backup is not normally mounted (only during backups or restores).
I would be doing something similar with a /srv partition for storing music, movies, etc. and cd/dvd authoring, as well as shared storage for wife's files off her computer.

Quote:
Originally Posted by haertig
Multiple filesystems (on hard partitions or LVM logical volumes) allow you to chose different filesystem types as needed. In my case, I use ext3 across the board except for /srv/video/mythtv, which is XFS. When chosing a filesystem type to use with LVM, keep in mind that all the Linux filesystem types allow you to grow them, but not all of them allow you to reduce them. I know XFS and JFS cannot be shrunk ... there may be others as well. Keep this in mind when chosing types. The lvreduce command supplied by LVM is useless if you cannot shrink the filesystem installed on that logical volume.
Ah... I didn't know about the no-shrink limitation of XFS. Glad you pointed it out. I understand your 'start small and grow' approach now.

Quote:
Originally Posted by haertig
Multiple filesystems will encapsulate filesystem corruption should you be unlucky enough to run into that. For example, if my /opt became corrupted I would expect to be able to boot my system (errors would occur when trying to mount /opt, but the system would still boot). I could then recreate the /opt filesystem ("reformat") and restore from my /opt backup. That /opt backup is much smaller than a backup from a different system with everything under one big / filesystem. If you experienced filesystem corruption in your one and only big / filesystem, you might find yourself in a non-bootable situation. Of course if I corrupted my / filesystem, I'd be just as screwed as everybody else (non-bootable possibly). However, booting Knoppix and restoring / from my / backup (only 150Mb) would be quick and easy. (Although, I do have a /backup filesystem, that is not the ONLY place I store my backups. They are stored there for quick access if possible, but they are also stored offline for the BIG disaster situations!)
Disaster recovery is something I know nothing about in Linux and am very afraid of venturing into. Your setup is quite good and I'd love to find out how to perform backups and restores and even create an automated backup procedure. Do you have any ready links or documents that I can use to these functions?

Installing Windows on this machine is a non-issue. I have an existing Windows desktop and there are no plans to install it on this computer. Strictly Linux.

BTW, have you written any helps/guides/how-to documentation? If not, you should. Your writing is excellent: detailed, simple to understand, extremely helpful, and very easy to approach.
 
Old 10-13-2006, 02:05 PM   #12
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by neptune_
Your setup is quite good and I'd love to find out how to perform backups and restores and even create an automated backup procedure. Do you have any ready links or documents that I can use to these functions?
I wouldn't jump right to "good" when describing my setup. "Complex", "Flexible", and "A good learning experience" come to mind as more accurate descriptions. Maybe even "Idiotic", depending on the reviewer!

As far as backups, I posted this example a while back:

http://www.linuxquestions.org/questi...d.php?t=484104

Although I presented the strategy as one backup script run from a live system (for simplicity), in reality I usually do some of the steps from a Knoppix boot. The "tar" steps to be exact. That way the filesystems I'm backing up are not in use by the operating system. There are a few extra manual LVM and mount commands that I need to do when doing the tar'ing from Knoppix. The tar'ing can certainly be done from a live system, and I'd trust the results ... I just trust them more when done from Knoppix. It's called "paranoia"! Also, I didn't mention backups of my seperate photography, music, etc., filesystems in that example script. Those backups are just more of the same, and I didn't want to clutter the example with things that many people's systems wouldn't have.

Many things "backed up" in that script are not really "backups". Rather, they are information that I would like handy when trying to recover a system. From a disaster, a hack attempt or system compromise, etc.

Last edited by haertig; 10-13-2006 at 02:11 PM.
 
Old 10-13-2006, 03:13 PM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Must admit I am not a LVM fan. I know Grub can't read it for a start and so there must be a /boot partition somewhere to start with.

I favour a single partition because it is much easier to maintain and boot.

What I can't understand is that a Linux User can always "tar" the entire partition say hda7 and dumps it on a temp area, increases the hda7 size to whatever he/she fancies, and then restores the Linux back. The task cannot take more than 20 minutes.

We all know Linux can be migrated from partition to partition, so if hda7 isn't big enough why not create a bigger hdc3 in another disk and move the distro across. Including altering the partition reference in the boot loader file and /etc/fstab it is again a job no more than 0.5 hour.

I typically house a Linux in a 5Gb partition. Bigger distros get 10 Gb. All my data is in a Fat32 partition accessible by all systems. I prefer to keep my personal data separated from the operating system so that it won't go down with it. I never backup an operating system and so my data is a lot easier to back up because it is small.

Last edited by saikee; 10-13-2006 at 03:16 PM.
 
Old 10-13-2006, 04:17 PM   #14
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,146

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
What I can't understand is that a Linux User can always "tar" the entire partition say hda7 and dumps it on a temp area, increases the hda7 size to whatever he/she fancies, and then restores the Linux back.
How do you do that (easily) if hda7 is tightly snuggled in between hda6 and hda8?
Quote:
We all know Linux can be migrated from partition to partition, so if hda7 isn't big enough why not create a bigger hdc3 in another disk and move the distro across.
If hda7 is full at, say 200Gb and you want to increase it's resident filesystem up to 210Gb, that's a lot of data to be moving. Not to mention that you have to have both of those spaces available at the same time (the 200Gb original and the 210Gb new location). The 200Gb would eventually be freed after the move, but the point is you've got to have all that extra space available on a temporary basis during the move.
Quote:
Including altering the partition reference in the boot loader file and /etc/fstab it is again a job no more than 0.5 hour.
That same job takes only one or two minutes with LVM. No fstab modifications required. No thrashing your disks slinging 200Gb of data from one to the other. Many filesystems (Reiser, XFS, JFS - but not EXT3) can be resized while they are mounted. So you don't even disturb other users while you're resizing. And if for some reason you need a filesystem that is bigger than any of your physical disks, LVM is your best option. An alternate - using symlinks to mimic a bigger filesystem - is mostly a kludge IMHO. Although I do admit to having /usr/local->/opt. But that wasn't to mimic a bigger /usr ... it was because I never really understood the intended differences between these two. They both seem to hold the same type of things.
Quote:
I never backup an operating system
While you can recreate an OS install without backups (without technically "losing" anything), the process would not be quick. All that configuration and customization... Even remembering what all the configuration you did was... Downloading, compiling and installing all those applications... There certainly could be circumstances where you might choose to reinstall from scratch. Fine - ignore your backups and don't use them. Or only use parts of them. But without backups in the first place, you don't have any choice in the matter. Back in the days when I used Windows, I didn't backup the OS either. But that was because Windows gets itself so screwed up over time that the last thing you want is to restore it to it's previous last-hosed-up state. But Linux is different. My entire OS backup (including /home, but not photography, videos, or music) is currently taking 2.1Gb (compressed). Easily fitting onto a DVD.

Personally, I would endorse a decision to go with one large partition for the majority of the system. Or I would endorse a system with lots of seperate mountpoints implemented using LVM. Either of these scenerios can easily be justified. It pretty much boils down to user preferences. What I can't understand would be a system using lots of seperate mountpoints and only hard partitioning (no LVM). I can't figure any benefit to that hybrid, although I'm sure a justification exists for certain system configurations that I'm not familiar with. The only thinking that comes to mind is that multiple mountpoints with hard partitioning might be slightly less complex than LVM. Right up until the point where you realise that you didn't guess your partition sizes correctly, and need to adjust...
 
Old 10-13-2006, 05:53 PM   #15
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Since I keep personal data off the operating system its partition hardy grows in size. Thus I do not have 200Gb partition for a Linux. It is more like 5Gb or 10Gb.

Also the so called mounting points are just subdirectories to the root "/". They are all self expanding or self compacting within one single partition. We never have to worry any of them running out of space as long as there is still space within the single partition housing the distro. An average size of an installed Linux is only about 2.5Gb to 3.5Gb.

It is true that every user has his/her own preference and I am sure LVM works for many others. To keep things simple there is nothing to stop us using a single partition.

I don't want to say single partition is the best but it is a decent alternative. I manage single partition for everyone of my 100+ systems installed in the PC and they include Dos, Win9x, Win2k, XP, Vista, Linux, BSD, Soloaris and Darwin.

Thus to someone who cannot decide the sizes of varions partitions the answer is just assign a single partition for "/" and the installer will put everything as subdirectories to it.
 
  


Reply

Tags
partitioning


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help partitioning my disk yellowbus Linux - Software 3 02-03-2006 10:53 PM
disk partitioning zapcojake Linux - Hardware 2 01-15-2006 11:46 PM
help me decide on disk readers north49er Slackware 2 01-07-2004 03:27 PM
disk partitioning gamenutt Linux - General 1 03-11-2002 04:28 AM
Disk Partitioning hank@$3800 Linux - General 2 12-31-2001 08:54 AM


All times are GMT -5. The time now is 01:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration