All of lore.kernel.org
 help / color / mirror / Atom feed
* question about btrfsck/mount behavior on corrupted fs
@ 2012-11-08 17:06 Ondrej Kozina
  0 siblings, 0 replies; only message in thread
From: Ondrej Kozina @ 2012-11-08 17:06 UTC (permalink / raw)
  To: linux-btrfs; +Cc: lczerner

Hi all,

I've been playing with btrfs resize recently and run into strange 
looking behavior to me. One of my simple test scenario was following:

- partition some block device (lets say sda sectors 2-2000 are sda1)
- try to create btrfs on top of it (just mkfs.btrfs /dev/sda1)
- fill the fs with data
- unmount the device
- let's simulate usual mistake here: downsize the partition with btrfs 
filesystem w/o proper btrfs resize command. In fact I moved the 
beginning of the sda2 partition into middle of former sda1. so now it 
looks like: 2-1000 sda1, 1001-2000 sda2.
- remount the fs

I was surprised both commands btrfsck and mount were successful w/o any 
error report even in syslog. Does it work as intended? Do you plan to 
support some sort of checks during mount/btrfsck? Possibly a new feature 
in btrfsck utility to warn the user something ugly happened to his fs? 
Is there any way to fix broken fs like this (supposing the cut off area 
didn't contain allocated blocks)?

Kind regards
Ondrej

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-08 17:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 17:06 question about btrfsck/mount behavior on corrupted fs Ondrej Kozina

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.