Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] replace bad hard disc
@ 2001-10-15 14:30 Stefan Onken
  2001-10-16  8:55 ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Onken @ 2001-10-15 14:30 UTC (permalink / raw)
  To: linux-lvm

Hello,

 I already looked in the How-to and FAQ, but I do not find any
 step by step tutorial to change a bad hard disc in a LVM System.

 I have two hard discs, 100 Gig + 60 Gig with reiserfs. The 60gig
 hard drive has some bad blocks, so I would like to replace it
 with a new hard disc. May anyone please be so kind and give me a
 helping hand for this problem....
 
linux:~ # lvscan
lvscan -- ACTIVE            "/dev/Stonki2/LV_Stonki2" [150.59 GB]
lvscan -- 1 logical volumes with 150.59 GB total in 1 volume group
lvscan -- 1 active logical volumes



linux:~ # lvdisplay /dev/Stonki2/LV_Stonki2
--- Logical volume ---
LV Name                /dev/Stonki2/LV_Stonki2
VG Name                Stonki2
LV Write Access        read/write
LV Status              available
LV #                   1
# open                 1
LV Size                150.59 GB
Current LE             38550
Allocated LE           38550
Allocation             next free
Read ahead sectors     120
Block device           58:0


thanks anyway...

cu

stonki


-- 
The More I See, The More I Know. The More I Know, The Less I Understand

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-15 14:30 [linux-lvm] replace bad hard disc Stefan Onken
@ 2001-10-16  8:55 ` Heinz J . Mauelshagen
  2001-10-16 10:16   ` Ulrich Wiederhold
  2001-10-18  9:39   ` Stefan Onken
  0 siblings, 2 replies; 8+ messages in thread
From: Heinz J . Mauelshagen @ 2001-10-16  8:55 UTC (permalink / raw)
  To: linux-lvm

Stefan,

add a new hard drive to your system and create (at least) an LVM partition
(Type 0x8E) on it. Let's call the new one /dev/sde1 and your flaky one
/dev/sdd1 just for the purpose of this example.

Then:

pvcreate /dev/sde1
vgextend Stonki2 /dev/sde1
pvmove /dev/sdd1 /dev/sde1
vgreduce Stonki2 /dev/sdd1

After this went ok you can uninstall the flaky drive from your system
and start to disassemble it in order to create some nice wallclocks ;-)

In case pvmove complains about read errors and stops before moving all
data over, please come back to me for further help.

Regards,
Heinz    -- The LVM Guy --

On Mon, Oct 15, 2001 at 04:30:39PM +0200, Stefan Onken wrote:
> Hello,
> 
>  I already looked in the How-to and FAQ, but I do not find any
>  step by step tutorial to change a bad hard disc in a LVM System.
> 
>  I have two hard discs, 100 Gig + 60 Gig with reiserfs. The 60gig
>  hard drive has some bad blocks, so I would like to replace it
>  with a new hard disc. May anyone please be so kind and give me a
>  helping hand for this problem....
>  
> linux:~ # lvscan
> lvscan -- ACTIVE            "/dev/Stonki2/LV_Stonki2" [150.59 GB]
> lvscan -- 1 logical volumes with 150.59 GB total in 1 volume group
> lvscan -- 1 active logical volumes
> 
> 
> 
> linux:~ # lvdisplay /dev/Stonki2/LV_Stonki2
> --- Logical volume ---
> LV Name                /dev/Stonki2/LV_Stonki2
> VG Name                Stonki2
> LV Write Access        read/write
> LV Status              available
> LV #                   1
> # open                 1
> LV Size                150.59 GB
> Current LE             38550
> Allocated LE           38550
> Allocation             next free
> Read ahead sectors     120
> Block device           58:0
> 
> 
> thanks anyway...
> 
> cu
> 
> stonki
> 
> 
> -- 
> The More I See, The More I Know. The More I Know, The Less I Understand
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

*** 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
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-16  8:55 ` Heinz J . Mauelshagen
@ 2001-10-16 10:16   ` Ulrich Wiederhold
  2001-10-16 12:34     ` Heinz J . Mauelshagen
  2001-10-18  9:39   ` Stefan Onken
  1 sibling, 1 reply; 8+ messages in thread
From: Ulrich Wiederhold @ 2001-10-16 10:16 UTC (permalink / raw)
  To: linux-lvm

* Heinz J . Mauelshagen <mauelshagen@sistina.com> [011016 10:55]:
> 
> Stefan,
> 
> add a new hard drive to your system and create (at least) an LVM partition
> (Type 0x8E) on it. Let's call the new one /dev/sde1 and your flaky one
> /dev/sdd1 just for the purpose of this example.
> 
> Then:
> 
> pvcreate /dev/sde1
> vgextend Stonki2 /dev/sde1
> pvmove /dev/sdd1 /dev/sde1
> vgreduce Stonki2 /dev/sdd1
> 

Hello,
will pvmove work if /dev/sde1 is already added to Stonki2 if there is
enough space available on /dev/sde1 ?

Reason: I have a vg containing 5 HDs that includes a small 4GB one. I
would like to remove this one without adding another HD. Enough space is
available.

Regards
Uli

-- 
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-16 10:16   ` Ulrich Wiederhold
@ 2001-10-16 12:34     ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 8+ messages in thread
From: Heinz J . Mauelshagen @ 2001-10-16 12:34 UTC (permalink / raw)
  To: linux-lvm

On Tue, Oct 16, 2001 at 12:16:34PM +0200, Ulrich Wiederhold wrote:
> * Heinz J . Mauelshagen <mauelshagen@sistina.com> [011016 10:55]:
> > 
> > Stefan,
> > 
> > add a new hard drive to your system and create (at least) an LVM partition
> > (Type 0x8E) on it. Let's call the new one /dev/sde1 and your flaky one
> > /dev/sdd1 just for the purpose of this example.
> > 
> > Then:
> > 
> > pvcreate /dev/sde1
> > vgextend Stonki2 /dev/sde1
> > pvmove /dev/sdd1 /dev/sde1
> > vgreduce Stonki2 /dev/sdd1
> > 
> 
> Hello,
> will pvmove work if /dev/sde1 is already added to Stonki2 if there is
> enough space available on /dev/sde1 ?
> 
> Reason: I have a vg containing 5 HDs that includes a small 4GB one. I
> would like to remove this one without adding another HD. Enough space is
> available.

Uli,

yes pvmove will work. Say your 4G PV is accessed via /dev/sdc1 then
you just run "pvmove /dev/sdc1" and it'll search for free space on the other
PVs to relocate data to. If your LV(s) with data allocated on /dev/sdc1 are
striped, you need to have enough space for the particular stripes on /dev/sdc1
on another PV in the VG, which doesn't have other stripes of the very same LV(s)
allocated.

> 
> Regards
> Uli
> 
> -- 
> 'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** 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
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-16  8:55 ` Heinz J . Mauelshagen
  2001-10-16 10:16   ` Ulrich Wiederhold
@ 2001-10-18  9:39   ` Stefan Onken
  2001-10-18  9:53     ` Markus Dobel
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Onken @ 2001-10-18  9:39 UTC (permalink / raw)
  To: Heinz J . Mauelshagen

Hallo Heinz J . Mauelshagen,

Am Dienstag, 16. Oktober 2001 um 10:55 schriebst Du:

> pvcreate /dev/sde1
> vgextend Stonki2 /dev/sde1
> pvmove /dev/sdd1 /dev/sde1
> vgreduce Stonki2 /dev/sdd1

stupid question: what about resizing the reiserfs file system ?
Is it not necessary ?

cu
stonki


-- 
The More I See, The More I Know. The More I Know, The Less I Understand

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-18  9:39   ` Stefan Onken
@ 2001-10-18  9:53     ` Markus Dobel
  2001-10-18 20:23       ` Ulrich Wiederhold
  0 siblings, 1 reply; 8+ messages in thread
From: Markus Dobel @ 2001-10-18  9:53 UTC (permalink / raw)
  To: linux-lvm

On Thu, Oct 18, 2001 at 11:39:54AM +0200, Stefan Onken wrote:
> 
> > pvcreate /dev/sde1
> > vgextend Stonki2 /dev/sde1
> > pvmove /dev/sdd1 /dev/sde1
> > vgreduce Stonki2 /dev/sdd1
> 
> stupid question: what about resizing the reiserfs file system ?
> Is it not necessary ?

Not for moving things around. These steps do not resize any logical
volume, they just move the data from one pv to another. So you don't
need to resize the file system here either.

Regards, Markus

-- 
Spiegel-Leser wissen mehr. Fuer ein Semester-Abo!
http://www.kawo2.rwth-aachen.de/~mdobel/semesterabo.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-18  9:53     ` Markus Dobel
@ 2001-10-18 20:23       ` Ulrich Wiederhold
  2001-10-19  4:59         ` Heinz J . Mauelshagen
  0 siblings, 1 reply; 8+ messages in thread
From: Ulrich Wiederhold @ 2001-10-18 20:23 UTC (permalink / raw)
  To: linux-lvm

* Markus Dobel <mdobel@kawo2.rwth-aachen.de> [011018 11:53]:
> On Thu, Oct 18, 2001 at 11:39:54AM +0200, Stefan Onken wrote:
> > 
> > > pvcreate /dev/sde1
> > > vgextend Stonki2 /dev/sde1
> > > pvmove /dev/sdd1 /dev/sde1
> > > vgreduce Stonki2 /dev/sdd1
> > 
> > stupid question: what about resizing the reiserfs file system ?
> > Is it not necessary ?

Oh, but this means in my example I will have to lower the filesystem
(xfs), because I will remove a hd and added all my scace to the vg and
lv´s, right?
Is it possible to lower an xfs.filesystem to remove a HD or is it
possible to remove a HD without resizing (no mount now), add a new
bigger HD, grow the filesystem, mount it?

Uli
-- 
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-lvm] replace bad hard disc
  2001-10-18 20:23       ` Ulrich Wiederhold
@ 2001-10-19  4:59         ` Heinz J . Mauelshagen
  0 siblings, 0 replies; 8+ messages in thread
From: Heinz J . Mauelshagen @ 2001-10-19  4:59 UTC (permalink / raw)
  To: linux-lvm

Ulrich,

you can't shrink an XFS.

A hHD contained in a VG can only be removed when it has no LVs on it.

On Thu, Oct 18, 2001 at 10:23:17PM +0200, Ulrich Wiederhold wrote:
> * Markus Dobel <mdobel@kawo2.rwth-aachen.de> [011018 11:53]:
> > On Thu, Oct 18, 2001 at 11:39:54AM +0200, Stefan Onken wrote:
> > > 
> > > > pvcreate /dev/sde1
> > > > vgextend Stonki2 /dev/sde1
> > > > pvmove /dev/sdd1 /dev/sde1
> > > > vgreduce Stonki2 /dev/sdd1
> > > 
> > > stupid question: what about resizing the reiserfs file system ?
> > > Is it not necessary ?
> 
> Oh, but this means in my example I will have to lower the filesystem
> (xfs), because I will remove a hd and added all my scace to the vg and
> lv´s, right?
> Is it possible to lower an xfs.filesystem to remove a HD or is it
> possible to remove a HD without resizing (no mount now), add a new
> bigger HD, grow the filesystem, mount it?
> 
> Uli
> -- 
> 'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

-- 

Regards,
Heinz    -- The LVM Guy --

*** 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
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-10-19  4:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-15 14:30 [linux-lvm] replace bad hard disc Stefan Onken
2001-10-16  8:55 ` Heinz J . Mauelshagen
2001-10-16 10:16   ` Ulrich Wiederhold
2001-10-16 12:34     ` Heinz J . Mauelshagen
2001-10-18  9:39   ` Stefan Onken
2001-10-18  9:53     ` Markus Dobel
2001-10-18 20:23       ` Ulrich Wiederhold
2001-10-19  4:59         ` Heinz J . Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox