LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-23-2012, 02:36 AM   #1
paldebojyoti
Member
 
Registered: Aug 2009
Posts: 32

Rep: Reputation: 15
Minimum Partition Size


Hello,

I need to know the minimum partition size one can create using Ext4 and minimum partition size one can create using Btrfs.

Consider the minimum block size in Ext4 is 1024 Bytes and Btrfs is 4096 Bytes.

Regards,
Deb
 
Old 05-23-2012, 04:28 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106
Why ?
 
Old 05-23-2012, 05:14 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by jv2112 View Post
Why ?
Homework, perhaps?

Deb;

It is usually a good idea to tell us why you want to answer a question like this---look at you last question back in Feb.

As for the specific question---why not try it?
 
Old 05-24-2012, 03:30 AM   #4
paldebojyoti
Member
 
Registered: Aug 2009
Posts: 32

Original Poster
Rep: Reputation: 15
I want to know this, as in many websites I found only Max. filesystem size, but not minimum size. I have to choose between Ext4 and Btrfs for some system, and this is one of the parameters.
I also created filesystem of various sizes, but couldn't come to any conclusion.
Hope I have answered your question "why"
 
Old 05-24-2012, 03:33 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by paldebojyoti View Post
Hope I have answered your question "why"
Not really because the minimum sizes are smaller than to be of practicable use.
 
Old 05-24-2012, 04:47 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
So--take EXT4 for example. If the minimum block size is 1024 bytes---I assume that means the space available to store data. There is then some overhead required---if the EXT4 spec. does not describe this, then you have a minimum of 2 options:
1. Dig thru a working partition and see how much space is being used for overhead.
2. Try smaller and smaller sizes until you find the limit. This will be tedious---at least using fdisk, I can't create a new partition and install a file system without rebooting
Quote:
I have to choose between Ext4 and Btrfs for some system, and this is one of the parameters.
Let's take a wild guess that EXT4 requires 20 blocks of overhead---add one block for data, and you have a minimum partition size of 21 blocks, but you can only store 1Kbyte. Is this useful? Probably not-----but tell us exactly what the system is supposed to be doing, and maybe there will be a better answer.
 
Old 05-24-2012, 04:58 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by paldebojyoti View Post
I need to know the minimum partition size one can create using Ext4 and minimum partition size one can create using Btrfs.
*shrug* you don't need us to test that: just 'dd bs=1 count=1024' (or less) some /dev/random to a file, loop-mount it, create your file system, check and if it is accessible create smaller ones.
 
Old 05-24-2012, 05:05 AM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
By invoking "mkfs.btrfs" I get message that 256MB is required at least. For ext4 you can use "resize2fs -P /dev/sd??" to get approximated minimum size (it depends on journal, inode size, etc., with 1MB nad 1kB blocks it prints 2353 blocks in my system).
 
Old 05-24-2012, 05:12 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by pixellany View Post
2. Try smaller and smaller sizes until you find the limit. This will be tedious---at least using fdisk, I can't create a new partition and install a file system without rebooting
It would be quick to create a virtual filesystem in a file, e.g.
Code:
 $ dd if=/dev/zero of=disk-image count=4096
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB) copied, 0.0406892 s, 51.5 MB/s
$ ls -l disk-image
-rw-r--r--. 1 colucix users 2097152 May 24 12:04 disk-image
$ /sbin/mkfs -t ext4 -q disk-image
disk-image is not a block special device.
Proceed anyway? (y,n) y
$ file disk-image 
disk-image: Linux rev 1.0 ext4 filesystem data (extents) (huge files)
The limit of an ext4 filesystem should be 4096 blocks of 512 bytes, that is about 2 Mb. It depends on the minimum size to store the filesystem journal, other than inode and superblock sizes that are smaller. This is from a theoretical point of view, since - as already pointed out - a physically minimum filesystem is not usable.

Edit: beaten by unSpawn!

Last edited by colucix; 05-24-2012 at 05:16 AM.
 
Old 05-25-2012, 08:24 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
It would make sense that mkfs.btrfs demanded a minimum size other than a theoretical minimum.

It is a modern file system that doesn't have to conform to any legacy rules. Ext4 has legacy issues.

Shrinking volumes could render tools useless too.

The idea of using such a modern file system with advanced features and making it as small as possible is a contradiction.

Last edited by jefro; 05-25-2012 at 08:27 PM.
 
Old 05-26-2012, 01:18 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
So, nothing to do with partitions per se at all ...
 
Old 05-26-2012, 10:43 AM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Maybe a partition issue. I didn't ponder on that at all.

Red Hat docs say that / needs to be 250M but that doesn't mean that you can't create a partition with less space. Indeed I have has some old systems that only had a 4M hard drive and multiple partitions.

Last edited by jefro; 05-26-2012 at 10:48 AM.
 
Old 05-24-2022, 09:00 AM   #13
jandoomster
LQ Newbie
 
Registered: Apr 2017
Posts: 3

Rep: Reputation: Disabled
Maybe if you don't trust encrypted flash drives and you don't want to monthly force yourself to remember a 20 digis /#*numbers_capital_etters_small_letters_numbers password, you can think to a micro encrypted volume for a backup on unsafe google or ms drive...
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimum file size to report a size in vsftpd log anon091 Linux - Server 1 10-12-2011 06:24 PM
[SOLVED] Minimum Partition Size Required in Redhat Linux Server for DNS Server Configuration vamshi_krishv Linux - Server 3 05-06-2011 01:08 AM
what is the minimum partition size drkstr Linux - General 7 08-27-2006 01:04 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
minimum partition size Ashraf Linux - General 4 10-16-2002 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:23 PM.

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
Open Source Consulting | Domain Registration