Hi,

On Mon, Jan 16, 2006 at 11:42:31AM -0200, Jakson Aquino wrote:
> I used cfdisk to delete the partition hdb5 (~50 GB) and,
> then, create two new partitions (4 and 45 GB). Finally, I
> moved all directories from /var/chroot/ia32 to the new
> smaller partition. When I run "fdisk -l" and "df", I get
> inconsistent results:

> /dev/hdb5            1703        2188     3903763+  83  Linux
> /dev/hdb6            2189        7538    42973843+  83  Linux

> /dev/hdb5             46141380   1303000  42494500   3% /mnt/ia32
> tmpfs                   511380         0    511380   0% /dev/shm
> /dev/hdb6             42299280    131228  40019360   1% /mnt/sda

> When I go to /mnt/ia32 and do "du -sh", I get the following
> errors:
> 
> root@:~# cd /mnt/ia32/
> root@:ia32# du -sh
> du: cannot access `./boot': Input/output error
[...]

> root@:~# dmesg | tail
> EXT3-fs error (device hdb5): ext3_get_inode_loc: unable to read inode block - 
> inode=3145729, block=6291458
> attempt to access beyond end of device
[...]

did you "reformat" the new partition(s) hdb5 (and hdb6) with something like
(as root):

# mkfs -t ext3 /dev/hdb5
(or # mke2fs -j /dev/hdb5)

or invoked resize2fs? Just changing the partition table isn't enough it just
tells the kernel at which blocks/sectors at the hard drive a "logical disk"
(aka. partition) starts and ends. The kernel then maps these "logical disks"
to block devices like /dev/hdb5. The filesystem kernel driver then accesses
these block devices and try to interpret the information found there. If it
finds something like "this fs is 46 GB big" the fs driver might try to
access blocks beyond the end of the partition, but these are "just not
there".

You have probably lost all your data at your former hdb5. (The fs might
"see" the filenames but the content is probably erroneous and/or
inaccessible.)

You can try to revert your changes to hdb6 and hdb5 at the partition table
(re-merge hdb5, hdb6, ... to the former ~50GB partition) and do not invoke
mkfs or something. Cross your fingers and invoke fsck /dev/hdb5. Maybe not
all your data is lost. (It would be good if you had md5sums of your data
before you manipulated the partitions.) This will probably only succeed, if
you didn't initialize a fs on hdb6. (But then I wonder how Linux let it
mount you.)

Always back up your data if you are manipulation partitions. Then read the
man pages of mkfs, mk2efs and resize2fs.

Good luck,
 Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to