[Novalug] For discussion: better to partition or not partition?

Peter Larsen plarsen@famlarsen.homelinux.com
Thu May 28 16:07:40 EDT 2009


On Thu, 2009-05-28 at 14:44 -0400, Megan Larko wrote:
> Richard Ertel wrote:
> 
> Hello Again,
> 
> I agree with separating / from /home and even /boot, but I am wondering about performance issues on 
> a single physical device for example /data or /photos?   Is there any reason to partition the 
> physical drive prior to formatting or just format the entire device and go for it?

As others have already mentioned, this is a matter of personal
preferences to a degree. You need to think about that file-system errors
will effect everything on that filesystem. Also, you may need different
settings on your filesystems - if you have a database with
redo-transactions there's no need to have the filesystem doing
journaling too for instance, so having /data for the database in it's
own "partition" makes sense.

Now I don't like partitions in the traditional sense of the word. I'll
use LVM/volumes. This way I can resize, copy etc. much easier - add new
disks without having to redo my partition design etc. etc - but you're
faced with the same dilemma - how to "partition" your volumes.

So data you want to treat separate from the OS I would separate from / -
if your system has multiple disks/luns to choose, put areas with rapid
changes on higher-speed destinations. You may want raid covering only
parts of the system etc.

In short, it's not a generic answer - from all the advise I see here
you'll see we all do things a bit different. But keep in mind what your
use of the system is - if there's no real division of use and need for
maintain, you can plug everything on the same filesystem and not have
any penalties.

I usually have /var on it's own partition/volume too since it's pretty
much the only area that is r/w in normal operations. You can the R/O
protect root, etc etc.  Databases and large websites I would mount on
their own filesystems, so if/when there's a filesystem error there's no
chance it'll reach the OS and take the whole system down. Also, I never
use ext3 for database data-files/logfiles (I don't have experience with
ext4 - so I don't know if it matters there).

> I am running a test of formatting the same hw RAID device both ext3 /dev/sdb and ext3 /dev/sdb1 and 
> see which gives me any performance benefit.   Are  there any other potential benefits of not 
> partitioning a physical device?  Is it any easier to manage (I know that it is harder to recover; 
> some tools only work on known partitions.)?

Several. By partitioning (again use logical volumes - not physical) to
smaller pieces your block size can be reduced and you won't die from
inode overflow. Larger volumes are good for larger files, smaller
volumes for smaller files. To test your raid speed - for instance raid0
vs. raid1, I would be a little careful doing that by creating two MDs on
the same physical disks. I would do one MD at a time, individually so
you don't have overlap of backend stuff.

If you meant testing the difference between ext2 and ext3 (or are you
trying ext4?? - please update the forum with your results when you have
them), I would still not format two partitions on the same device while
testing. Do one at a time. Between ext2 and ext3 you'll find a write
penalty on ext3. I'm told that ext4 is faster than ext3 on writes and
does operations like delete more efficient. If it's the filesystem you
want to test - and not the disk IO speed - remember to test all
file-system operations. 

-- 
Peter Larsen <plarsen@famlarsen.homelinux.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20090528/9975e50d/attachment.asc>


More information about the Novalug mailing list