[RAS] Nebka disk

Christian Zimmermann christian.zimmermann at uconn.edu
Thu Mar 13 12:08:56 EDT 2008


OK. I worked on it. No success so far:

it went all fine until rsync. There I first needed to mount the volume, 
which I did (uncommenting its fstab line).

Once the volume was about 4% full, rsync stopped with the message:

sent 26876823 bytes received 36660 bytes 68569.38 bytes/sec
total size is 55688285389 speedup is 2069.16
rsync error: some files could not be transferred (code 23) at main.c(977) 
[sendr=2.6.9]

along with many readonly errors (on the new volume!)

umount, mount -o rw rsync repeatedly, same errors

umount, mount -o rw cp -u -a /home/* /vol/home/. gets me to 5%, then 
readonly errors

Capturing the error messages to see the first ones, I see the following:

attempt to access beyond end of device
sdb1: rw=0 want=281018384, limit 273442302
EXT3-fs eror (device sdb1): read_inode_bitmap: Cannot read inode bitmap - 
blockgroup=1072, inode_bitmap=35127297
Aborting journal on device sdb1.
...
Remounting filesystem read-only

Great... output from df:

/dev/sdb1 141106132 5751332 128187004 5% /vol

from fstab:

/dev/sdb1 /vol ext3 defaults 0 1

from e2fsck -c -y /dev/sdb1

/dev/sdb1: recovering journal
The filesystem size (according to the superblock) is 35838999 blocks
The physical size of the device is 34180287
Either the superblock or the partition table is likely to be corrupt!
Abort? yes

I am back in my office to get some warmth. I can be reached at 
xx1-860-486-3272 until I head back to the machine rom with suggestions. 
Machine was left in single user mode.

By the way, it boots by default into kernel 2.4, but I worked with 2.6.

Christian Zimmermann                                     FIGUGEGL!
Department of Economics
University of Connecticut
341 Mansfield Road, Unit 1063
Storrs, CT 06269-1063
http://ideas.repec.org/zimm/   christian.zimmermann at uconn.edu
http://ideas.repec.org/e/pzi1.html

On Thu, 13 Mar 2008, Thomas Krichel wrote:

>
>  Christian Zimmermann writes
>
>> reboot
>> # into 2.4 or 2.6?
>
>  into 2.6, SECOND entry,
>
>> #at reboot in grub: single user mode (select kernel, press "e", select kernel line, press "e", append "single" at the end of the line, "enter", press "b", root password)
>>
>
>  use the second entry, no editing required, I think.
>
>
>> 		   mount -o ro,remount /dev/sda1
>
>  Mount root disk read-only. Important.
>
>>
>> e2fsck -c -y /dev/sda1
>>
>> #according to the man page:
>> #   Note  that  in general it is not safe to run e2fsck on mounted filesys-
>> #   tems.  The only exception is if the -n option is specified, and -c, -l,
>> #   or  -L  options  are not specified.   However, even if it is safe to do
>> #   so, the results printed by e2fsck are not valid if  the  filesystem  is
>> #   mounted.    If e2fsck asks whether or not you should check a filesystem
>> #   which is mounted, the only correct answer is "no".  Only experts  who
>> #   really know what they are doing should consider answering this question
>> #   in any other way.
>> #I am no expert, in fact, I hardly understand what I am supposed to do here,
>> #are you sure you want to do this?
>>
>
>  A read only mounted disk can be savely checked. Otherwise
>  how would you check the file system
>
>> # this takes a few hours.
>> # what if something is wrong?
>
>  The -y option will automatically take corrective action
>  required
>
>>
>> reboot
>>
>> #single user again
>>
>> rsync -va --exclude /vol --exclude /proc --exclude /sys / /vol
>>
>> grub-install --directory /vol/boot/grub /dev/sdb1
>>
>> # do you mean
>> #grub-install --root-directory=/vol/boot/grub /dev/sdb1
>
>  Yes, sorry!
>
>> # this is how I would understand it from the man page on nebka.
>> # and why not use update-grub?
>
>  That does a different thing, it updates the list of
>  kernels that are available.
>
>> #sdb1, not sdb, right?
>
>  I think, but if it gripes try /dev/sdb instead.
>
>>
>> #edit /vol/etc/fstab putting the right device for the swap, but how?
>
>  I am not sure. Actually, there is a step missing, you need
>  to format the disk. I will do this right now.
>
>  Inspect and change partition table:
>
> nebka:~# cfdisk /dev/sdb
> nebka:~#
> nebka:~#
> nebka:~#
> nebka:~# mke2fs -j /dev/sdb1
> mke2fs 1.40-WIP (14-Nov-2006)
> /dev/sdb1 is mounted; will not make a filesystem here!
> nebka:~# mount /dev/sdb1
> mount: /dev/sdb1 already mounted or /vol busy
> mount: according to mtab, /dev/sdb1 is already mounted on /vol
> nebka:~# cd /vol
> nebka:/vol# ls
> lost+found  opt
> nebka:/vol# cd
>
>  I should have done this to start with:
>
> nebka:~# umount /vol
>
>  but it works like this too...
>
>
> nebka:~# mke2fs -j /dev/sdb1
> mke2fs 1.40-WIP (14-Nov-2006)
> Filesystem label=
> OS type: Linux
> Block size=4096 (log=2)
> Fragment size=4096 (log=2)
> 17924096 inodes, 35838999 blocks
> 1791949 blocks (5.00%) reserved for the super user
> First data block=0
> Maximum filesystem blocks=0
> 1094 block groups
> 32768 blocks per group, 32768 fragments per group
> 16384 inodes per group
> Superblock backups stored on blocks:
>        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
>        4096000, 7962624, 11239424, 20480000, 23887872
>
> Writing inode tables: done
> Creating journal (32768 blocks): done
> Writing superblocks and filesystem accounting information: done
>
> This filesystem will be automatically checked every 29 mounts or
> 180 days, whichever comes first.  Use tune2fs -c or -i to override.
>
>
> nebka:~# mkswap /dev/sdb2
> /dev/sdb2: No such device or address
>
>  It does not like to do the swap, but the /dev/sdb2 is
>  now earmarked for swap.
>
>  It should be ok for you to let the partition table
>  be as is, just comment out the part that mounts /dev/sdb
>  Actually I did it for you.
>
> nebka:~# cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> /dev/sda5       none            swap    sw              0       0
> /dev/sda1       /               ext3    defaults,errors=remount-ro 0       1
> /dev/hda        /media/cdrom    iso9660 ro,user,noauto  0       0
> /dev/fd0        /media/floppy   auto    rw,user,noauto  0       0
> /dev/hda        /cdrom          iso9660 ro,user,noauto  0       0
> #/dev/sdb1      /vol            ext3    defaults        0       1
>
>
>> And I suppose that file will be rsynched from /etc/fstab, right?
>
>  Correct. If you switch the two disks, as you must do before the
>  final boot, it will say that what now is /dev/sdb
>  is what gets called /dev/sda, and the current configuration,
>  which places the swap at the end should be just fine.
>
>  I will go to town now, later to the opera. I expert to
>  be back by 23:00 local time, your 13:00. If you start
>  doing it then you can call me any time during the night,
>  leave me a number and I'll call you right back to discuss
>  the situation with you.
>
>  Good luck!
>
>  Cheers,
>
>  Thomas Krichel                    http://openlib.org/home/krichel
>                                RePEc:per:1965-06-05:thomas_krichel
>  phone: +7 383 330 6813                       skype: thomaskrichel
>



More information about the RAS-run mailing list