All of lore.kernel.org
 help / color / mirror / Atom feed
* first block in ext3 filesystem
@ 2012-08-06 18:04 Prashant Shah
  2012-08-06 18:19 ` Manish Katiyar
  2012-08-07  6:03 ` Mulyadi Santosa
  0 siblings, 2 replies; 5+ messages in thread
From: Prashant Shah @ 2012-08-06 18:04 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I came across this

$sudo dumpe2fs /dev/sda1

4KB Block Size
Group 0: (Blocks 0-32767)
  Primary superblock at 0, Group descriptors at 1-1

1KB Block Size
Group 0: (Blocks 1-8192)
  Primary superblock at 1, Group descriptors at 2-2

Why does first block start from 0 in the 4KB block size partition and
1 in 1KB block size partition ?

Regards.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* first block in ext3 filesystem
  2012-08-06 18:04 first block in ext3 filesystem Prashant Shah
@ 2012-08-06 18:19 ` Manish Katiyar
  2012-08-06 18:27   ` Prashant Shah
  2012-08-08 10:28   ` Yang Chengwei
  2012-08-07  6:03 ` Mulyadi Santosa
  1 sibling, 2 replies; 5+ messages in thread
From: Manish Katiyar @ 2012-08-06 18:19 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Aug 6, 2012 at 11:04 AM, Prashant Shah <pshah.mumbai@gmail.com>wrote:

> Hi,
>
> I came across this
>
> $sudo dumpe2fs /dev/sda1
>
> 4KB Block Size
> Group 0: (Blocks 0-32767)
>   Primary superblock at 0, Group descriptors at 1-1
>
> 1KB Block Size
> Group 0: (Blocks 1-8192)
>   Primary superblock at 1, Group descriptors at 2-2
>
> Why does first block start from 0 in the 4KB block size partition and
> 1 in 1KB block size partition ?
>

Let's say superblock is always written at a fixed offset of 1024 (they have
to because e2fsck has to find it) in the filesystem. What would be the
block numbers with block sizes 1k and 4k ?



>
> Regards.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Thanks -
Manish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120806/15f59800/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* first block in ext3 filesystem
  2012-08-06 18:19 ` Manish Katiyar
@ 2012-08-06 18:27   ` Prashant Shah
  2012-08-08 10:28   ` Yang Chengwei
  1 sibling, 0 replies; 5+ messages in thread
From: Prashant Shah @ 2012-08-06 18:27 UTC (permalink / raw)
  To: kernelnewbies

Hi,

On Mon, Aug 6, 2012 at 11:49 PM, Manish Katiyar <mkatiyar@gmail.com> wrote:
> Let's say superblock is always written at a fixed offset of 1024 (they have
> to because e2fsck has to find it) in the filesystem. What would be the block
> numbers with block sizes 1k and 4k ?

I was confused about

Group 0: (Blocks 0-32767)
Group 0: (Blocks 1-8192)

One of them ends in even and other in odd number.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* first block in ext3 filesystem
  2012-08-06 18:04 first block in ext3 filesystem Prashant Shah
  2012-08-06 18:19 ` Manish Katiyar
@ 2012-08-07  6:03 ` Mulyadi Santosa
  1 sibling, 0 replies; 5+ messages in thread
From: Mulyadi Santosa @ 2012-08-07  6:03 UTC (permalink / raw)
  To: kernelnewbies

Hi...

On Tue, Aug 7, 2012 at 1:04 AM, Prashant Shah <pshah.mumbai@gmail.com> wrote:
> Hi,
>
> I came across this
>
> $sudo dumpe2fs /dev/sda1
>
> 4KB Block Size
> Group 0: (Blocks 0-32767)
>   Primary superblock at 0, Group descriptors at 1-1
>
> 1KB Block Size
> Group 0: (Blocks 1-8192)
>   Primary superblock at 1, Group descriptors at 2-2

I think it has something to do with the alignment. At the first case,
your 4K block size formatted partition align perfectly, so it is
usable right from block 0.

OTOH, on 1K block size, block 0 must be skipped and starting from
block 1, it align perfectly.

Not sure which alignment size your disk use. Maybe it's 4K, since
nowadays 4K disk is becoming common ones

CMIIW people...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* first block in ext3 filesystem
  2012-08-06 18:19 ` Manish Katiyar
  2012-08-06 18:27   ` Prashant Shah
@ 2012-08-08 10:28   ` Yang Chengwei
  1 sibling, 0 replies; 5+ messages in thread
From: Yang Chengwei @ 2012-08-08 10:28 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Aug 06, 2012 at 11:19:57AM -0700, Manish Katiyar wrote:
> 
> On Mon, Aug 6, 2012 at 11:04 AM, Prashant Shah <pshah.mumbai@gmail.com> wrote:
> 
>     Hi,
> 
>     I came across this
> 
>     $sudo dumpe2fs /dev/sda1
> 
>     4KB Block Size
>     Group 0: (Blocks 0-32767)
>       Primary superblock at 0, Group descriptors at 1-1
> 
>     1KB Block Size
>     Group 0: (Blocks 1-8192)
>       Primary superblock at 1, Group descriptors at 2-2
> 
>     Why does first block start from 0 in the 4KB block size partition and
>     1 in 1KB block size partition ?
> 
> 
> Let's say superblock is always written at a fixed offset of 1024 (they have to
As Shah said, the superblock is always written at a offset 1024. When
the block size is 4096, offset 1024 is in the first block (block 0),
while the block size is 1024, offset 1024 is in the second block (block
1).

Since group descriptor locates after superblock, so Group 0 starts from
1 when the block size is 1024 byte.

Please correct me if I'm wrong.

--
Thanks,
Chengwei

> because e2fsck has to find it) in the filesystem. What would be the block
> numbers with block sizes 1k and 4k ?
> 
>  
> 
> 
>     Regards.
> 
>     _______________________________________________
>     Kernelnewbies mailing list
>     Kernelnewbies at kernelnewbies.org
>     http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 
> 
> 
> 
> --
> Thanks -
> Manish
> 

> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120808/c3c39766/attachment.bin 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-08 10:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 18:04 first block in ext3 filesystem Prashant Shah
2012-08-06 18:19 ` Manish Katiyar
2012-08-06 18:27   ` Prashant Shah
2012-08-08 10:28   ` Yang Chengwei
2012-08-07  6:03 ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.