replace bad hard disc
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
Signature · 1 line
The More I See, The More I Know. The More I Know, The Less I Understand
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 --
Quoted 33 lines · Stefan Onken
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 volumeslinux:~ # 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
Quoted 16 lines
thanks anyway...
cu
stonki
Signature · 8 lines
The More I See, The More I Know. The More I Know, The Less I Understand _______________________________________________ linux-lvm mailing list [email protected] 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
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Quoted 7 lines · Heinz J . Mauelshagen
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/sde1and your flaky one/dev/sdd1just for the purpose of this example.
Quoted 7 lines
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
Signature · 1 line
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
Quoted 16 lines · Ulrich Wiederhold
Quoted 7 lines · Heinz J . Mauelshagen
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/sde1and your flaky one/dev/sdd1just for the purpose of this example.Quoted 7 lines
Then:
pvcreate
/dev/sde1
vgextend Stonki2/dev/sde1
pvmove/dev/sdd1/dev/sde1
vgreduce Stonki2/dev/sdd1
Quoted 7 lines
Hello,
will pvmove work if/dev/sde1is 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.
Quoted 12 lines
Regards
UliSignature · 7 lines
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5 _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
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
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Hallo Heinz J . Mauelshagen,
Am Dienstag, 16. Oktober 2001 um 10:55 schriebst Du:
Quoted 4 lines
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
Signature · 1 line
The More I See, The More I Know. The More I Know, The Less I Understand
Quoted 8 lines · Stefan Onken
Quoted 5 lines
pvcreate
/dev/sde1
vgextend Stonki2/dev/sde1
pvmove/dev/sdd1/dev/sde1
vgreduce Stonki2/dev/sdd1stupid 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
Signature · 2 lines
Spiegel-Leser wissen mehr. Fuer ein Semester-Abo! http://www.kawo2.rwth-aachen.de/~mdobel/semesterabo.html
Quoted 9 lines · Markus Dobel
Quoted 8 lines · Stefan Onken
Quoted 5 lines
pvcreate
/dev/sde1
vgextend Stonki2/dev/sde1
pvmove/dev/sdd1/dev/sde1
vgreduce Stonki2/dev/sdd1stupid 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
Signature · 1 line
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
Ulrich,
you can't shrink an XFS.
A hHD contained in a VG can only be removed when it has no LVs on it.
Quoted 27 lines · Ulrich Wiederhold
Quoted 9 lines · Markus Dobel
Quoted 8 lines · Stefan Onken
Quoted 5 lines
pvcreate
/dev/sde1
vgextend Stonki2/dev/sde1
pvmove/dev/sdd1/dev/sde1
vgreduce Stonki2/dev/sdd1stupid 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
Signature · 7 lines
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5 _______________________________________________ linux-lvm mailing list [email protected] http://lists.sistina.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
Signature · 15 lines
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
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-