LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Block size of partition (https://www.linuxquestions.org/questions/red-hat-31/block-size-of-partition-540984/)

salmanucit 03-27-2007 05:56 AM

Block size of partition
 
Hi,
I have red hat enterprise advance server 4 installed will default configurations. File system is ext3
1) How could i find than what is block size of my each partition.
2) How much big file i could sotore in on my faile system

Regards

fourchannel 03-28-2007 03:11 PM

Hi first off you need to know what block device the partition resides on.

For my system, to get a listing of the active partitions, I can run the command "df -h":

Code:

@lith.ath.cx 15:02 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3            8.9G  4.9G  3.6G  58% /
tmpfs                  62M    0  62M  0% /dev/shm
/dev/hda1            183M  27M  147M  16% /boot
/dev/hdb1              36G  27G  6.7G  81% /home/limewire/Shared

My root partition, which is ext3, is the top level / , listed as "/dev/hda3"

Now that I know where my partition is, I can run "tune2fs -l" to give me some info about that ext2/3 partition. I will use "tune2fs -l | grep -i 'block size'" specifically, to give me just the block size.

On my system, and probably yours too, you will need to become root to run this.

Code:

root@lith.ath.cx 15:05 ~]# tune2fs -l /dev/hda3 | grep -i 'block size'
Block size:              4096

For the file size:

Wikipedia (ext3) -- "Max file size 16GiB – 2TiB"

Hope that helps!

raamana 04-09-2007 01:42 PM

Problem accessing info on Block Size
 
While trying to find the block size, I simply used command as shown below, as root:
Code:

reddylap:/home/raamana # tune2fs -l /dev/hda1
tune2fs 1.39 (29-May-2006)
tune2fs: Bad magic number in super-block while trying to open /dev/hda1
Couldn't find valid filesystem superblock.


It gives this strange mesg. Is something wrong? How do I find my block size?

Thanks in advance,
Pradeep

fourchannel 04-09-2007 09:58 PM

looks like your /dev/hda1 is not an ext2/3 partition.

Try running this command (probably have to as root), and post what the output says; the command lists the partition table.

Code:

fdisk -l /dev/hda

raamana 04-10-2007 05:17 AM

Code:

reddylap:/home/raamana # fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1        1307    10490445    7  HPFS/NTFS
/dev/hda2            1308        4441    25173855    c  W95 FAT32 (LBA)
/dev/hda3            4442        4685    1959930  82  Linux swap / Solaris
/dev/hda4  *        4686        7296    20972857+  83  Linux

You are right!

And it works, if I use
Code:

tune2fs -l /dev/hda4
Thanks for the reply... keep it up.


All times are GMT -5. The time now is 08:00 PM.