Discussion:
how to run fsck for a crashed domU?
Rudi Ahlers
2008-08-01 11:51:41 UTC
Permalink
Hi all

I have a CentOS Xen domU, on a CentOS server, which crashed and
doesn't boot up. The domU uses a disk image, /home/vm/vm01.img

I get the following in the console:

----snip----

Scanning logical volumes
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
Activating logical volumes
2 logical volume(s) in volume group "VolGroup00" now active
Creating root device.
Mounting root filesystem.
kjournald starting. Commit interval 5 second

-----snip-----

So, it's using an LVM file system, on top of the Xen image.
But, then I get this:

----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in volume
group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).

/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.


----snip-----


So, how can I run fsck on that file system?

I have tried to mount /home/vm/vm01.img - but it fails:

# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
--
Kind Regards
Rudi Ahlers
SoftDux CEO

Website: http://www.SoftDux.com
Support: http://Support.SoftDux.com
Cellphone: 082 554 7532
MS
2008-08-01 12:07:02 UTC
Permalink
Do this:

fsck.ext2 -y -f /home/vm/vm01.img
or
fsck.ext2 -y -f /home/vm/vm01.img
or
xfs_check -f /home/vm/vm01.img

... the case for your filesystem type.
Post by Rudi Ahlers
Hi all
I have a CentOS Xen domU, on a CentOS server, which crashed and
doesn't boot up. The domU uses a disk image, /home/vm/vm01.img
----snip----
Scanning logical volumes
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
Activating logical volumes
2 logical volume(s) in volume group "VolGroup00" now active
Creating root device.
Mounting root filesystem.
kjournald starting. Commit interval 5 second
-----snip-----
So, it's using an LVM file system, on top of the Xen image.
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in volume
group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
Andy Burns
2008-08-01 12:12:39 UTC
Permalink
Post by MS
fsck.ext2 -y -f /home/vm/vm01.img
Be careful!

If the domU uses partitions inside the .img file, the OP will need to
use kpartx to see the partitions in dom0, then it can be fsck'ed by dom0
Alexander Hoßdorf
2008-08-01 12:18:03 UTC
Permalink
Post by Andy Burns
Post by MS
fsck.ext2 -y -f /home/vm/vm01.img
Be careful!
If the domU uses partitions inside the .img file, the OP will need to
use kpartx to see the partitions in dom0, then it can be fsck'ed by dom0
You're right I think he uses LVM inside the Image, so fsck.ext2 won't
work for this.
It could destroy the Image!
Post by Andy Burns
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
Rudi Ahlers
2008-08-01 12:30:23 UTC
Permalink
Post by Alexander Hoßdorf
Post by Andy Burns
Post by MS
fsck.ext2 -y -f /home/vm/vm01.img
Be careful!
If the domU uses partitions inside the .img file, the OP will need 
to use kpartx to see the partitions in dom0, then it can be
fsck'ed  by dom0
You're right I think he uses LVM inside the Image, so fsck.ext2 won't
work for this.
It could destroy the Image!
Okso what do you suggest I do then?

--

Kind Regards
Rudi Ahlers
Andy Burns
2008-08-01 12:40:46 UTC
Permalink
Post by Rudi Ahlers
Okso what do you suggest I do then?
kpartx should make the partition(s) from the img to be visible to the dom0

if any of the partitions is an PV then you probably need a pvscan/vgscan
for LVM to pick them up

then you'll probably need to mark the LV active with lvchange -ay

then you can try to mount or fsck it

beware that the /dev/mapper names will usually vary from the device
names you use in the domU

I tend to use LVM in the dom0, but not in the domU, it makes life
complicted like this when you come to expanding filesystems, and
presumably has some sort of (minor) performance hit.
Alexander Hoßdorf
2008-08-01 12:43:15 UTC
Permalink
I wrote this:

Have you tried this?

I'm not sure about, but you could try the following:
losetup loop4 vm01.img
and then try to rescan PVs. You have too add loop 4 to your scan list.
Then you should see the logical volumes and might reapair them.
Hope this helps.

If you need more details, just let me know.

Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Andy Burns
Post by MS
fsck.ext2 -y -f /home/vm/vm01.img
Be careful!
If the domU uses partitions inside the .img file, the OP will need
to use kpartx to see the partitions in dom0, then it can be fsck'ed
by dom0
You're right I think he uses LVM inside the Image, so fsck.ext2 won't
work for this.
It could destroy the Image!
Okso what do you suggest I do then?
--
Kind Regards
Rudi Ahlers
------------------------------------------------------------------------
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3316 (20080731) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
Rudi Ahlers
2008-08-01 13:22:55 UTC
Permalink
Post by Alexander Hoßdorf
Have you tried this?
losetup loop4 vm01.img
and then try to rescan PVs. You have too add loop 4 to your scan list.
Then you should see the logical volumes and might reapair them.
Hope this helps.
If you need more details, just let me know.
Cheers,
Alex
Hi,

I just tried it, but got the following error:

# losetup loop4 /home/vm/vm01.img
loop4: No such file or directory


Am I doing it right?
--
Kind Regards
Rudi Ahlers
Florian Manschwetus
2008-08-01 13:31:05 UTC
Permalink
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Have you tried this?
losetup loop4 vm01.img
and then try to rescan PVs. You have too add loop 4 to your scan list.
Then you should see the logical volumes and might reapair them.
Hope this helps.
If you need more details, just let me know.
Cheers,
Alex
Hi,
# losetup loop4 /home/vm/vm01.img
loop4: No such file or directory
Am I doing it right?
either losetup /home/vm/vm01.img
or losetup /dev/loop4 /home/vm/vm01.img

Florian
Alexander Hoßdorf
2008-08-01 13:30:39 UTC
Permalink
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Have you tried this?
losetup loop4 vm01.img
and then try to rescan PVs. You have too add loop 4 to your scan list.
Then you should see the logical volumes and might reapair them.
Hope this helps.
If you need more details, just let me know.
Cheers,
Alex
Hi,
# losetup loop4 /home/vm/vm01.img
loop4: No such file or directory
Am I doing it right?
Sorry, I meant losetup /dev/loop4 /home/vm/vm01.img

I try this, too and keep you up to date.
JP Viljoen
2008-08-01 12:31:26 UTC
Permalink
Post by Alexander Hoßdorf
You're right I think he uses LVM inside the Image, so fsck.ext2 won't
work for this.
It could destroy the Image!
A recommendation against this, as you're in effect causing a triple-layer for
disk IO to pass through before it actually gets written.
Alexander Hoßdorf
2008-08-01 12:11:15 UTC
Permalink
Hi,

I'm not sure about, but you could try the following:

losetup loop4 vm01.img

and then try to rescan PVs. You have too add loop 4 to your scan list.

Then you should see the logical volumes and might reapair them.

Hope this helps.


Cheers,
Alex
Post by Rudi Ahlers
Hi all
I have a CentOS Xen domU, on a CentOS server, which crashed and
doesn't boot up. The domU uses a disk image, /home/vm/vm01.img
----snip----
Scanning logical volumes
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
Activating logical volumes
2 logical volume(s) in volume group "VolGroup00" now active
Creating root device.
Mounting root filesystem.
kjournald starting. Commit interval 5 second
-----snip-----
So, it's using an LVM file system, on top of the Xen image.
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in volume
group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
Aleix Dorca
2008-08-01 12:57:09 UTC
Permalink
Hi Rudi,

I once found this page about mounting files excluding some information
about partitions and stuff, check it out, maybe it'll help you: http://iscsitarget.sourceforge.net/wiki/index.php/SelfMountingExportedVolumes

I know you're not using iscsi, but maybe it guides you to a solution.

Hope it helps,

Aleix.
Javier Guerra
2008-08-01 13:48:36 UTC
Permalink
Post by Rudi Ahlers
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
it might be easier to use another DomU, and add your problem image as
an extra HD.
--
Javier
Alexander Hoßdorf
2008-08-01 14:11:31 UTC
Permalink
okay, I got it now...

step by step...

1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4

2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper

3. vgscan
# This should discover your lvm VGs from Image.

4. lvscan
# Should list the ACTIVE volumes.

5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using lvm
in Dom0, too.

Please give feedback if this worked for you.


Cheers,
Alex
Post by Javier Guerra
Post by Rudi Ahlers
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
it might be easier to use another DomU, and add your problem image as
an extra HD.
Venefax
2008-08-01 14:24:03 UTC
Permalink
I have 8 network interfaces, but only eth3 is connected to the network. The other interfaces have a cable attached but terminate in other computers, point-to-point. This setup is driving XEN crazy, and I cannot disable the interfaces or remove them from the bridge. When I open the yast-network in the node, it says that since a xen bridge was detected, I cannot change any configuration. How do I remove all the other cards except eth3?
One of the effects is that I type arping followed by the IP address of one of my local VM's, and the response is:
ARPING xx.xx.xx.xx from 192.168.22.251 eth0, but the IP address is local, belongs to a VM. Also all the VM's that have this family of IP addresses cannot ping each other. If I try, the originator stops talking to the network.




Federico
Rudi Ahlers
2008-08-01 15:08:34 UTC
Permalink
Post by Alexander Hoßdorf
okay, I got it now...
step by step...
1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4
2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper
3. vgscan
# This should discover your lvm VGs from Image.
4. lvscan
# Should list the ACTIVE volumes.
5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using lvm
in Dom0, too.
Please give feedback if this worked for you.
Cheers,
Alex
______________________________________________
Awesome, thanx!!!

I got as far as seeing the partitions, but can only run e2fsck on one of
them:

lvscan
ACTIVE '/dev/backup/pluto' [20.00 GB] inherit
ACTIVE '/dev/backup/bck' [40.00 GB] inherit
ACTIVE '/dev/backup/anya_zanet' [7.00 GB] inherit
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [544.00 MB] inherit
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
ACTIVE '/dev/sysvg/usr' [8.00 GB] inherit
ACTIVE '/dev/sysvg/var' [8.00 GB] inherit
ACTIVE '/dev/sysvg/home' [53.38 GB] inherit
ACTIVE '/dev/sysvg/tmp' [1.00 GB] inherit

There's no VolGroup00 in /dev/ - but I do see /dev/mapper/loop4p1 &
/dev/mapper/loop4p2

Running e2fsck on it seems ok,

# e2fsck /dev/mapper/loop4p1
e2fsck 1.39 (29-May-2006)
/boot: clean, 45/26104 files, 22630/104388 blocks



Yet, when booting up, I still get the error :(

[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).

/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 15:53:28 UTC
Permalink
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit

I guess this is your root lvm partition from the Image?

try: e2fsck /dev/sysvg/root

Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay, I got it now...
step by step...
1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4
2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper
3. vgscan
# This should discover your lvm VGs from Image.
4. lvscan
# Should list the ACTIVE volumes.
5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using
lvm in Dom0, too.
Please give feedback if this worked for you.
Cheers,
Alex
______________________________________________
Awesome, thanx!!!
I got as far as seeing the partitions, but can only run e2fsck on one
lvscan
ACTIVE '/dev/backup/pluto' [20.00 GB] inherit
ACTIVE '/dev/backup/bck' [40.00 GB] inherit
ACTIVE '/dev/backup/anya_zanet' [7.00 GB] inherit
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [544.00 MB] inherit
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
ACTIVE '/dev/sysvg/usr' [8.00 GB] inherit
ACTIVE '/dev/sysvg/var' [8.00 GB] inherit
ACTIVE '/dev/sysvg/home' [53.38 GB] inherit
ACTIVE '/dev/sysvg/tmp' [1.00 GB] inherit
There's no VolGroup00 in /dev/ - but I do see /dev/mapper/loop4p1 &
/dev/mapper/loop4p2
Running e2fsck on it seems ok,
# e2fsck /dev/mapper/loop4p1
e2fsck 1.39 (29-May-2006)
/boot: clean, 45/26104 files, 22630/104388 blocks
Yet, when booting up, I still get the error :(
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Rudi Ahlers
2008-08-01 15:55:24 UTC
Permalink
Post by Rudi Ahlers
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
I guess this is your root lvm partition from the Image?
try: e2fsck /dev/sysvg/root
Cheers,
Alex
No, that's the root for the server. All the partitions in sysvg is the
server's.

These are the 2 new ones:

inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [544.00 MB] inherit
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 15:58:21 UTC
Permalink
Sorry, I read to fast ;-)

/dev/sysvg/root is your real root partition?!



inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit

This seems to be your root lvm partition from the Image, am I right?

have you tried:

e2fsck /dev/VolGroup00/LogVol00

?

Cheers,
Alex
Post by Rudi Ahlers
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
I guess this is your root lvm partition from the Image?
try: e2fsck /dev/sysvg/root
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay, I got it now...
step by step...
1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4
2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper
3. vgscan
# This should discover your lvm VGs from Image.
4. lvscan
# Should list the ACTIVE volumes.
5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using
lvm in Dom0, too.
Please give feedback if this worked for you.
Cheers,
Alex ______________________________________________
Awesome, thanx!!!
I got as far as seeing the partitions, but can only run e2fsck on one
lvscan
ACTIVE '/dev/backup/pluto' [20.00 GB] inherit
ACTIVE '/dev/backup/bck' [40.00 GB] inherit
ACTIVE '/dev/backup/anya_zanet' [7.00 GB] inherit
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [544.00 MB] inherit
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
ACTIVE '/dev/sysvg/usr' [8.00 GB] inherit
ACTIVE '/dev/sysvg/var' [8.00 GB] inherit
ACTIVE '/dev/sysvg/home' [53.38 GB] inherit
ACTIVE '/dev/sysvg/tmp' [1.00 GB] inherit
There's no VolGroup00 in /dev/ - but I do see /dev/mapper/loop4p1 &
/dev/mapper/loop4p2
Running e2fsck on it seems ok,
# e2fsck /dev/mapper/loop4p1
e2fsck 1.39 (29-May-2006)
/boot: clean, 45/26104 files, 22630/104388 blocks
Yet, when booting up, I still get the error :(
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version
3317 (20080801) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
Rudi Ahlers
2008-08-01 16:00:04 UTC
Permalink
Post by Alexander Hoßdorf
Sorry, I read to fast ;-)
/dev/sysvg/root is your real root partition?!
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
This seems to be your root lvm partition from the Image, am I right?
e2fsck /dev/VolGroup00/LogVol00
?
Cheers,
Alex
Post by Rudi Ahlers
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
I guess this is your root lvm partition from the Image?
try: e2fsck /dev/sysvg/root
Cheers,
Alex
Yes, but there is no /dev/VolGroup00 - so I'm not sure how to e2fsck on it
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 16:03:50 UTC
Permalink
okay, then you have to activate them first.

vgchange -ay

After this you should be able to see them in /dev
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Sorry, I read to fast ;-)
/dev/sysvg/root is your real root partition?!
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
This seems to be your root lvm partition from the Image, am I right?
e2fsck /dev/VolGroup00/LogVol00
?
Cheers,
Alex
Post by Rudi Ahlers
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
I guess this is your root lvm partition from the Image?
try: e2fsck /dev/sysvg/root
Cheers,
Alex
Yes, but there is no /dev/VolGroup00 - so I'm not sure how to e2fsck on it
Alexander Hoßdorf
2008-08-01 16:29:35 UTC
Permalink
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?

Cheers,
Alex
Post by Alexander Hoßdorf
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Sorry, I read to fast ;-)
/dev/sysvg/root is your real root partition?!
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
This seems to be your root lvm partition from the Image, am I right?
e2fsck /dev/VolGroup00/LogVol00
?
Cheers,
Alex
Post by Rudi Ahlers
ACTIVE '/dev/sysvg/root' [2.00 GB] inherit
I guess this is your root lvm partition from the Image?
try: e2fsck /dev/sysvg/root
Cheers,
Alex
Yes, but there is no /dev/VolGroup00 - so I'm not sure how to e2fsck on it
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version
3317 (20080801) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
Rudi Ahlers
2008-08-01 16:36:18 UTC
Permalink
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)

Thank you, you're a star. There was a LOT of corrupt files to fix,which
was fixed, and the VPS is up again. I need to restore some backups, but
at least most of it is up again.

Thank you very much
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 16:41:51 UTC
Permalink
okay :-)
You're welcome!

you have already started your domU?!

You should return things the normal way before starting domU:

1. vgchange -an VolGroup00

2. kpartx -d /dev/loop4

3. losetup -d /dev/loop4

4. Start your domU

Of course you can simply pass this things, by restarting dom0.

Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore some
backups, but at least most of it is up again.
Thank you very much
Rudi Ahlers
2008-08-01 17:12:29 UTC
Permalink
Post by Alexander Hoßdorf
okay :-)
You're welcome!
you have already started your domU?!
1. vgchange -an VolGroup00
2. kpartx -d /dev/loop4
3. losetup -d /dev/loop4
4. Start your domU
Of course you can simply pass this things, by restarting dom0.
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore some
backups, but at least most of it is up again.
Thank you very much
Sadly though, I can't login to the VPS, the root password doesn't work,
and there's many errors all the way long. So, it seems like this
attempted fix was a loss after all.
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Rudi Ahlers
2008-08-01 17:27:12 UTC
Permalink
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay :-)
You're welcome!
you have already started your domU?!
1. vgchange -an VolGroup00
2. kpartx -d /dev/loop4
3. losetup -d /dev/loop4
4. Start your domU
Of course you can simply pass this things, by restarting dom0.
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore some
backups, but at least most of it is up again.
Thank you very much
Sadly though, I can't login to the VPS, the root password doesn't
work, and there's many errors all the way long. So, it seems like this
attempted fix was a loss after all.
But, I got it working now. The /etc/passwd file was corrupt, so I just
replaced it with a backup, and could login.

Thank you again for all your help
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 17:31:15 UTC
Permalink
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay :-)
You're welcome!
you have already started your domU?!
1. vgchange -an VolGroup00
2. kpartx -d /dev/loop4
3. losetup -d /dev/loop4
4. Start your domU
Of course you can simply pass this things, by restarting dom0.
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore some
backups, but at least most of it is up again.
Thank you very much
Sadly though, I can't login to the VPS, the root password doesn't
work, and there's many errors all the way long. So, it seems like this
attempted fix was a loss after all.
Hmm it seems that something destroyed your Filesystem so bad, that
e2fsck couldn't fix this.
Just for interest...
What was the reason that your Filesystem was destroyed?
Was there anything strange?

Cheers,
Alex
Rudi Ahlers
2008-08-01 17:40:28 UTC
Permalink
Post by Alexander Hoßdorf
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay :-)
You're welcome!
you have already started your domU?!
1. vgchange -an VolGroup00
2. kpartx -d /dev/loop4
3. losetup -d /dev/loop4
4. Start your domU
Of course you can simply pass this things, by restarting dom0.
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore
some backups, but at least most of it is up again.
Thank you very much
Sadly though, I can't login to the VPS, the root password doesn't
work, and there's many errors all the way long. So, it seems like
this attempted fix was a loss after all.
Hmm it seems that something destroyed your Filesystem so bad, that
e2fsck couldn't fix this.
Just for interest...
What was the reason that your Filesystem was destroyed?
Was there anything strange?
Cheers,
Alex
Power failure. The UPS power strip that the server was one, burnt out.
And I only have one PSU on it, so the sudden loss of power corrupted the
HDD, and the VM's partition as well.

But it's working now again. I had to update some software, and fix a few
user's home folders, but now it's working :)
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 17:48:03 UTC
Permalink
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Rudi Ahlers
Post by Alexander Hoßdorf
okay :-)
You're welcome!
you have already started your domU?!
1. vgchange -an VolGroup00
2. kpartx -d /dev/loop4
3. losetup -d /dev/loop4
4. Start your domU
Of course you can simply pass this things, by restarting dom0.
Cheers,
Alex
Post by Rudi Ahlers
Post by Alexander Hoßdorf
Post by Alexander Hoßdorf
okay, then you have to activate them first.
vgchange -ay
After this you should be able to see them in /dev
Does this work for you?
Cheers,
Alex
YES!!! :)
Thank you, you're a star. There was a LOT of corrupt files to
fix,which was fixed, and the VPS is up again. I need to restore
some backups, but at least most of it is up again.
Thank you very much
Sadly though, I can't login to the VPS, the root password doesn't
work, and there's many errors all the way long. So, it seems like
this attempted fix was a loss after all.
Hmm it seems that something destroyed your Filesystem so bad, that
e2fsck couldn't fix this.
Just for interest...
What was the reason that your Filesystem was destroyed?
Was there anything strange?
Cheers,
Alex
Power failure. The UPS power strip that the server was one, burnt out.
And I only have one PSU on it, so the sudden loss of power corrupted
the HDD, and the VM's partition as well.
But it's working now again. I had to update some software, and fix a
few user's home folders, but now it's working :)
okay, so you got your own little worst case recovery trip ;-)
if you have SATA disks you should also lookout for a headcrash and have
an eye on S.M.A.R.T Status.
I always backup my VM's for private use on an usb disk, thats cheap and
reliable.

Andy Burns
2008-08-01 16:51:33 UTC
Permalink
Post by Rudi Ahlers
I got as far as seeing the partitions,
lvscan
inactive '/dev/VolGroup00/LogVol00' [9.34 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [544.00 MB] inherit
There's no VolGroup00 in /dev/
if run "lvchange -ay vgname/lvname" it will create devices
Post by Rudi Ahlers
Running e2fsck on it seems ok,
# e2fsck /dev/mapper/loop4p1
e2fsck 1.39 (29-May-2006)
/boot: clean, 45/26104 files, 22630/104388 blocks
sounds like you fsck'ed the /boot partition not the root partition
Rudi Ahlers
2008-08-01 14:21:54 UTC
Permalink
What do I use if I don't have X / KDE installed? Can I run kpart without X?

Kind regards
Rudi Ahlers
CEO, SoftDux
Office: 087 805 9573
Cell: 082 554 7532
www.SoftDux.com

- original message -
Subject: Re: [Xen-users] how to run fsck for a crashed domU?
From: Alexander Hoßdorf <xen-***@hossdorf.eu>
Date: 01/08/2008 14:11

okay, I got it now...

step by step...

1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4

2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper

3. vgscan
# This should discover your lvm VGs from Image.

4. lvscan
# Should list the ACTIVE volumes.

5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using lvm
in Dom0, too.

Please give feedback if this worked for you.


Cheers,
Alex
Post by Javier Guerra
Post by Rudi Ahlers
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
it might be easier to use another DomU, and add your problem image as
an extra HD.
Alexander Hoßdorf
2008-08-01 14:26:34 UTC
Permalink
yes, you can. I don't have X, too.
The name kpartx confuses... it's a tool for console.
Post by Rudi Ahlers
What do I use if I don't have X / KDE installed? Can I run kpart without X?
Kind regards
Rudi Ahlers
CEO, SoftDux
Office: 087 805 9573
Cell: 082 554 7532
www.SoftDux.com
- original message -
Subject: Re: [Xen-users] how to run fsck for a crashed domU?
Date: 01/08/2008 14:11
okay, I got it now...
step by step...
1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4
2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper
3. vgscan
# This should discover your lvm VGs from Image.
4. lvscan
# Should list the ACTIVE volumes.
5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using lvm
in Dom0, too.
Please give feedback if this worked for you.
Cheers,
Alex
Post by Javier Guerra
Post by Rudi Ahlers
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
it might be easier to use another DomU, and add your problem image as
an extra HD.
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3317 (20080801) __________
E-Mail wurde gepr�ft mit ESET NOD32 Antivirus.
http://www.eset.com
Alexander Hoßdorf
2008-08-01 14:34:57 UTC
Permalink
Post by Alexander Hoßdorf
yes, you can. I don't have X, too.
The name kpartx confuses... it's a tool for console.
Post by Rudi Ahlers
What do I use if I don't have X / KDE installed? Can I run kpart without X?
And only for Information:
There is another way... Ther is a patch aviable for "loop" module,
so that it can use partitions directly.
Post by Alexander Hoßdorf
Post by Rudi Ahlers
Kind regards
Rudi Ahlers
CEO, SoftDux
Office: 087 805 9573
Cell: 082 554 7532
www.SoftDux.com
- original message -
Subject: Re: [Xen-users] how to run fsck for a crashed domU?
Date: 01/08/2008 14:11
okay, I got it now...
step by step...
1. losetup /dev/loop4 /home/vm/vm01.img
# This mounts the image file as imaginary physical to /dev/loop4
2. kpartx -va /dev/loop4
# This creates a device map with partitions in vm01.img in /dev/mapper
3. vgscan
# This should discover your lvm VGs from Image.
4. lvscan
# Should list the ACTIVE volumes.
5. Now you can do e2fsck to the volumes listet by lvscan.
But be sure to e2fsck only the LVs from yout Image if you're using
lvm in Dom0, too.
Please give feedback if this worked for you.
Cheers,
Alex
Post by Javier Guerra
Post by Rudi Ahlers
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
it might be easier to use another DomU, and add your problem image as
an extra HD.
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus,
Signaturdatenbank-Version 3317 (20080801) __________
E-Mail wurde gepr�ft mit ESET NOD32 Antivirus.
http://www.eset.com
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version
3317 (20080801) __________
E-Mail wurde gepr�ft mit ESET NOD32 Antivirus.
http://www.eset.com
Andy Burns
2008-08-01 16:47:47 UTC
Permalink
Post by Rudi Ahlers
What do I use if I don't have X / KDE installed? Can I run kpart without X?
Err, yes, kpartx is nothing to do with X windows!
Grant McWilliams
2008-08-01 16:09:49 UTC
Permalink
Post by Rudi Ahlers
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in volume group
"VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
--
Kind Regards
Rudi Ahlers
SoftDux CEO
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
Am I missing something? It seems like people like making things more
complicated than they are. What's stopping you from doing an fsck from the
console within the DomU just like if it were a real machine? It dropped you
to a shell so just run fsck on it manually.

Grant McWilliams
Rudi Ahlers
2008-08-01 16:13:46 UTC
Permalink
Post by Rudi Ahlers
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in
volume group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
--
Kind Regards
Rudi Ahlers
SoftDux CEO
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
Am I missing something? It seems like people like making things more
complicated than they are. What's stopping you from doing an fsck from
the console within the DomU just like if it were a real machine? It
dropped you to a shell so just run fsck on it manually.
Grant McWilliams
It doesn't allow you to access the shell. The moment it bumps into the
error, the domU shuts down.
--
Kind Regards
Rudi Ahlers

Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff
Alexander Hoßdorf
2008-08-01 16:16:00 UTC
Permalink
You're right ;-)

But it won't kill him, to know how to mount LVM Partitions from DomU in
Dom0.
Post by Rudi Ahlers
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in
volume group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
--
Kind Regards
Rudi Ahlers
SoftDux CEO
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
Am I missing something? It seems like people like making things more
complicated than they are. What's stopping you from doing an fsck from
the console within the DomU just like if it were a real machine? It
dropped you to a shell so just run fsck on it manually.
Grant McWilliams
------------------------------------------------------------------------
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3317 (20080801) __________
E-Mail wurde geprüft mit ESET NOD32 Antivirus.
http://www.eset.com
Grant McWilliams
2008-08-01 16:18:41 UTC
Permalink
Post by Alexander Hoßdorf
You're right ;-)
But it won't kill him, to know how to mount LVM Partitions from DomU in
Dom0.
Post by Rudi Ahlers
----snip-----
Setting up Logical Volume Management: 2 logical volume(s) in
volume group "VolGroup00" now active
[ OK ]
Checking filesystems
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inode 67830 has illegal block(s).
/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
----snip-----
So, how can I run fsck on that file system?
# mount -o loop /home/vm/vm01.img /mnt/vm01/
mount: you must specify the filesystem type
--
Kind Regards
Rudi Ahlers
SoftDux CEO
_______________________________________________
Xen-users mailing list
http://lists.xensource.com/xen-users
Am I missing something? It seems like people like making things more
complicated than they are. What's stopping you from doing an fsck from the
console within the DomU just like if it were a real machine? It dropped you
to a shell so just run fsck on it manually.
Grant McWilliams
------------------------------------------------------------------------
It's definitely better to learn something new but I also live by the idea
that the simplest solution is the best.

It's quite strange that the DomU dies after throwing the error. Where does
that fault lie? It seems like Xen should keep it running as if it were a
real machine.

Grant McWilliams
Loading...