Skip to contentSkip to conversation

LVM and resize

linux-lvm Reidar Westvik 2 participants 4 messages Oct 7, 2003 – Oct 10, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I don't know if my question in something that Sistina supports, but i need some pointers to make this work.

We're running a Slackware 9.0 server with kernel 2.5.64 (gcc ver. 2.95.3 20010315) also on this server we have a LVM volume of 1TB spread over 120GB IDE disks. Now, it seems like one of the harddrives has failed in some way. Filesystem on the volume is EXT3.

When i mount the volume syslog says: "kernel: EXT3-fs warning: mounting fs with errors, running e3fschk is recommended" So i've unmounted the volume and run e2fschk on the LVM volume. After a long wait (2 days in fact) the server hangs, when its checking the part of the volume that is on hdf. The box just dies, and only a powercycle will bring it back up again. The syslogs displays the following info:
"kernel: hdf: dma_timer_expiry: dma status == 0x61"
"kernel: hdf: (__ide_dma_test_irq) called while not waiting""

These are the last events of syslog before it's starts to reboot.

Now, after what i've read the way to deal with this issue without loss of data is to shrink the volume with aprox. 120gb (there is enough free space) and then exclude the defective drive from the logical volume and its physical groups, and then add a healthy disk for so to increase the volume back to its original size.

However LVM resize tools will not allow resizing of a volume that has a filsystem marked with errors. And if i try to force the resize the server hangs. I have tryed to resize with both "e2fsadm" and "resize2fs" but they both have problem resizing since it has errors.

So this kinda puts me back to basics, is there a way for me to remove this disk without loosing data on the volume ?

All awnsers are very much apriciated! :)

Best Regards
Reidar

#1 lore raw

Looks like you are caught IRT to shrinking, because of the fsck errors.

If you're still able to mount the filesystem, you definitely want to take a backup first in order to preserve as much of your files as possible.

Aftwards (presumably you can add another >=120g drive to your VG with vgextend) you want to try moving the data off to that other disk using "pvmove -i ...", then removing the failing one (vgreduce).

Using device-mapper/LVM2, which enables you to remove the drive in question (removing LVs allocated to that drive as well), doesn't help you here, presumably you just have that one huge Logical Volume.

Regards,
Heinz -- The LVM Guy --

Quoted 14 lines · Reidar Westvik

Hi,

I don't know if my question in something that Sistina supports, but i need some pointers to make this work.

We're running a Slackware 9.0 server with kernel 2.5.64 (gcc ver. 2.95.3 20010315) also on this server we have a LVM volume of 1TB spread over 120GB IDE disks. Now, it seems like one of the harddrives has failed in some way. Filesystem on the volume is EXT3.

When i mount the volume syslog says: "kernel: EXT3-fs warning: mounting fs with errors, running e3fschk is recommended" So i've unmounted the volume and run e2fschk on the LVM volume. After a long wait (2 days in fact) the server hangs, when its checking the part of the volume that is on hdf. The box just dies, and only a powercycle will bring it back up again. The syslogs displays the following info:
"kernel: hdf: dma_timer_expiry: dma status == 0x61"
"kernel: hdf: (__ide_dma_test_irq) called while not waiting""

These are the last events of syslog before it's starts to reboot.

Now, after what i've read the way to deal with this issue without loss of data is to shrink the volume with aprox. 120gb (there is enough free space) and then exclude the defective drive from the logical volume and its physical groups, and then add a healthy disk for so to increase the volume back to its original size.

Quoted 8 lines

However LVM resize tools will not allow resizing of a volume that has a filsystem marked with errors. And if i try to force the resize the server hangs. I have tryed to resize with both "e2fsadm" and "resize2fs" but they both have problem resizing since it has errors.

So this kinda puts me back to basics, is there a way for me to remove this disk without loosing data on the volume ?

All awnsers are very much apriciated! :)

Best Regards
Reidar

*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200

                                                       FAX 924446

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Heinz,

Thanks for your quick reply! :)

I am still able to mount the filesystem, but after a while it goes into read-only mode, witch is fine. However I cannot take backup of the volume cause it's to big, but it's not "the end of the world" if the data gets lost, but we would like to keep data.

I've read about using pvmove -i and when i try to run it i get "command not implemented yet". Is there a way around this ?

Reidar
----- Original Message -----
From: "Heinz J . Mauelshagen" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 07, 2003 3:53 PM
Subject: Re: [linux-lvm] LVM and resize

Quoted 4 lines

Looks like you are caught IRT to shrinking, because of the fsck errors.

If you're still able to mount the filesystem, you definitely want to take

a backup

Quoted 3 lines

first in order to preserve as much of your files as possible.

Aftwards (presumably you can add another >=120g drive to your VG with

vgextend) you

Quoted 1 line

want to try moving the data off to that other disk using "pvmove -i ...",

then

Quoted 3 lines

removing the failing one (vgreduce).

Using device-mapper/LVM2, which enables you to remove the drive in

question

Quoted 1 line

(removing LVs allocated to that drive as well), doesn't help you here,

presumably

Quoted 9 lines

you just have that one huge Logical Volume.

Regards,
Heinz -- The LVM Guy --

Quoted 3 lines · Reidar Westvik

Hi,

I don't know if my question in something that Sistina supports, but i

need some pointers to make this work.

Quoted 2 lines
Quoted 2 lines

We're running a Slackware 9.0 server with kernel 2.5.64 (gcc ver. 2.95.3

20010315) also on this server we have a LVM volume of 1TB spread over 120GB IDE disks. Now, it seems like one of the harddrives has failed in some way. Filesystem on the volume is EXT3.

Quoted 2 lines
Quoted 2 lines

When i mount the volume syslog says: "kernel: EXT3-fs warning: mounting

fs with errors, running e3fschk is recommended" So i've unmounted the volume and run e2fschk on the LVM volume. After a long wait (2 days in fact) the server hangs, when its checking the part of the volume that is on hdf. The box just dies, and only a powercycle will bring it back up again. The syslogs displays the following info:

Quoted 6 lines
Quoted 6 lines

"kernel: hdf: dma_timer_expiry: dma status == 0x61" "kernel: hdf: (__ide_dma_test_irq) called while not waiting""

These are the last events of syslog before it's starts to reboot.

Now, after what i've read the way to deal with this issue without loss

of data is to shrink the volume with aprox. 120gb (there is enough free space) and then exclude the defective drive from the logical volume and its physical groups, and then add a healthy disk for so to increase the volume back to its original size.

Quoted 2 lines
Quoted 2 lines

However LVM resize tools will not allow resizing of a volume that has a

filsystem marked with errors. And if i try to force the resize the server hangs. I have tryed to resize with both "e2fsadm" and "resize2fs" but they both have problem resizing since it has errors.

Quoted 2 lines
Quoted 2 lines

So this kinda puts me back to basics, is there a way for me to remove

this disk without loosing data on the volume ?

Quoted 10 lines
Quoted 5 lines

All awnsers are very much apriciated! :)

Best Regards
Reidar

*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-

Quoted 8 lines

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200

                                                       FAX 924446

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-

Quoted 9 lines

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#3 lore raw
Quoted 11 lines · Reidar Westvik

Hi Heinz,

Thanks for your quick reply! :)

I am still able to mount the filesystem, but after a while it goes into read-only mode, witch is fine. However I cannot take backup of the volume cause it's to big, but it's not "the end of the world" if the data gets lost, but we would like to keep data.

I've read about using pvmove -i and when i try to run it i get "command not implemented yet". Is there a way around this ?

You mean with LVM2 ? Not yet.
Will probably be in 2.2.

Regards,
Heinz -- The LVM Guy --

Quoted 82 lines

Reidar
----- Original Message -----
From: "Heinz J . Mauelshagen" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 07, 2003 3:53 PM
Subject: Re: [linux-lvm] LVM and resize

Quoted 4 lines

Looks like you are caught IRT to shrinking, because of the fsck errors.

If you're still able to mount the filesystem, you definitely want to take

a backup

Quoted 3 lines

first in order to preserve as much of your files as possible.

Aftwards (presumably you can add another >=120g drive to your VG with

vgextend) you

Quoted 1 line

want to try moving the data off to that other disk using "pvmove -i ...",

then

Quoted 3 lines

removing the failing one (vgreduce).

Using device-mapper/LVM2, which enables you to remove the drive in

question

Quoted 1 line

(removing LVs allocated to that drive as well), doesn't help you here,

presumably

Quoted 9 lines

you just have that one huge Logical Volume.

Regards,
Heinz -- The LVM Guy --

Quoted 3 lines · Reidar Westvik

Hi,

I don't know if my question in something that Sistina supports, but i

need some pointers to make this work.

Quoted 2 lines
Quoted 2 lines

We're running a Slackware 9.0 server with kernel 2.5.64 (gcc ver. 2.95.3

20010315) also on this server we have a LVM volume of 1TB spread over 120GB IDE disks. Now, it seems like one of the harddrives has failed in some way. Filesystem on the volume is EXT3.

Quoted 2 lines
Quoted 2 lines

When i mount the volume syslog says: "kernel: EXT3-fs warning: mounting

fs with errors, running e3fschk is recommended" So i've unmounted the volume and run e2fschk on the LVM volume. After a long wait (2 days in fact) the server hangs, when its checking the part of the volume that is on hdf. The box just dies, and only a powercycle will bring it back up again. The syslogs displays the following info:

Quoted 6 lines
Quoted 6 lines

"kernel: hdf: dma_timer_expiry: dma status == 0x61" "kernel: hdf: (__ide_dma_test_irq) called while not waiting""

These are the last events of syslog before it's starts to reboot.

Now, after what i've read the way to deal with this issue without loss

of data is to shrink the volume with aprox. 120gb (there is enough free space) and then exclude the defective drive from the logical volume and its physical groups, and then add a healthy disk for so to increase the volume back to its original size.

Quoted 2 lines
Quoted 2 lines

However LVM resize tools will not allow resizing of a volume that has a

filsystem marked with errors. And if i try to force the resize the server hangs. I have tryed to resize with both "e2fsadm" and "resize2fs" but they both have problem resizing since it has errors.

Quoted 2 lines
Quoted 2 lines

So this kinda puts me back to basics, is there a way for me to remove

this disk without loosing data on the volume ?

Quoted 13 lines
Quoted 5 lines

All awnsers are very much apriciated! :)

Best Regards
Reidar

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Quoted 5 lines

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200

                                                       FAX 924446

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-