View previous topic :: View next topic |
Author |
Message |
kargig n00b
Joined: 21 Sep 2004 Posts: 27
|
Posted: Tue Sep 21, 2004 3:25 pm Post subject: LVM2 recovery conditions |
|
|
Hello all,
I want to run a fileserver and I was testing LVM2. I wanted to have easy resize capabilities so I chose reiserfs. My config is as follows:
1 80gb boot disk
3 200gb disks (on promise tx2 controllers) for the LVM2 purposes.
Before making the service available to public I wanted to test what would happen when a disk might crash. I "created" a crash by shutting down ...removing one of the 3 200gb disks (the one that I have added at the end of the VG) and rebooting. I had just one LV covering all of the 600Gb formated with reiserfs.
When I booted without the last disk ... gentoo LVM2 ver 2.00.15 could not activate the LV even with -P option. I updated device mapper and LVM2 to the latest available (compiling them by myself):
Code: |
# lvm version
version LVM version: 2.00.24 (2004-09-16)
version Library version: 1.00.19-ioctl (2004-07-03)
version Driver version: 4.1.0
|
Now the LV get's activated:
Code: |
# lvdisplay -P
lvdisplay Partial mode. Incomplete volume groups will be activated read-only.
lvdisplay Couldn't find device with uuid 'xasgTM-H8XZ-55zR-pkZ4-T0o0-NU2G-P4qEIe'.
lvdisplay Couldn't find device with uuid 'xasgTM-H8XZ-55zR-pkZ4-T0o0-NU2G-P4qEIe'.
lvdisplay --- Logical volume ---
lvdisplay LV Name /dev/test/test
lvdisplay VG Name test
lvdisplay LV UUID jlwec5-KwZe-I6Fr-aCiT-DPWB-br0H-SgUAQn
lvdisplay LV Write Access read/write
lvdisplay LV Status available
lvdisplay # open 0
lvdisplay LV Size 558.00 GB
lvdisplay Current LE 142848
lvdisplay Segments 3
lvdisplay Allocation inherit
lvdisplay Read ahead sectors 0
lvdisplay Block device 253:0
lvdisplay
|
Since it is available I tried mounting it...but...
Code: | # mount /dev/test/test
mount: wrong fs type, bad option, bad superblock on /dev/test/test,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
|
I tried reiserfsck (both the one on the ports tree and the latest version compiled by myself) without any luck.
Code: |
# reiserfsck --rebuild-sb /dev/test/test
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
bread: Cannot read the block (2): (Invalid argument).
reiserfs_open: bread failed reading block 2
bread: Cannot read the block (16): (Invalid argument).
reiserfs_open: bread failed reading block 16
reiserfs_open: the reiserfs superblock cannot be found on /dev/test/test.
what the version of ReiserFS do you use[1-4]
(1) 3.6.x
(2) >=3.5.9 (introduced in the middle of 1999) (if you use linux 2.2, choose this one)
(3) < 3.5.9 converted to new format (don't choose if unsure)
(4) < 3.5.9 (this is very old format, don't choose if unsure)
(X) exit
1
Enter block size [4096]:
32768
super.c 356 rebuild_sb
rebuild_sb: wrong block size specified, only divisible by 1024 are supported currently
|
Trying the same with block size 4096 gives:
Code: |
Enter block size [4096]:
4096
reiserfs_create: can not create that small (0 blocks) filesystem
|
My question is whether it is possible to salvage the remaining data contents on the good disks when 1 disk fails over lvm2...
Would I be able to save the data if I was using ext2/ext3/xfs/whatever ?
What are the conditions under which a part of the filesystem is saved when one disk crashes and is replaced by a new one?
Thanks in advance,
George
P.S. I don't want to go to a raid1/5 solution...I was hoping that with LVM2 when 1 disk crashed the rest of the system remained intact and you only lose what was on the "faulty disk". |
|
Back to top |
|
|
Regor Guru
Joined: 06 Aug 2002 Posts: 545 Location: 39° 2' 48" N, 120° 59' 2" W
|
Posted: Wed Sep 22, 2004 9:32 am Post subject: |
|
|
I know you said you don't want to do RAID, but that's what it takes. LVM can't do what you want on its own. _________________ Sometimes the appropriate response to reality is to go insane.
-Philip K. Dick, Valis |
|
Back to top |
|
|
elvelind n00b
Joined: 13 Dec 2003 Posts: 34
|
Posted: Wed Sep 22, 2004 9:00 pm Post subject: |
|
|
hm..
I dont think you can do what you want to do with lvm2.
if you have one big lv spanning over three discs, ie have on filesystem, then if one disc break on third of the fs will be lost. its possible that you can use some recovery program to get the data from the two working discs. But I dont think it could be done by lvm2 or in this case by reiserfs. |
|
Back to top |
|
|
kargig n00b
Joined: 21 Sep 2004 Posts: 27
|
Posted: Thu Sep 23, 2004 12:47 am Post subject: |
|
|
There are tools if u have ext2/3 that can read raw data and write them to another disk. But not for reiserfs
LVM2 is superior to LVM1 for being able to read the metadata stored inside the disks even after a crash, right ? What's the point in that though, when you can not do anything more but use 3rd party tools (for ext2/ext3 only) to copy all the "good" data that's left, to some other disks ?
These 3rd party tools I've found are for ext2/3 as I've said. So what can you do to have 1)resize capabilities on your partitions and 2)be able to salvage data when one disk crashes ?
Anyone ever worked with resize2fs ? Any experiences in combination with LVM2 ?
I am kinda confused on this...Fortunately I am only testing and I don't have anything I want to save from those disks...
|
|
Back to top |
|
|
elvelind n00b
Joined: 13 Dec 2003 Posts: 34
|
Posted: Thu Sep 23, 2004 9:50 am Post subject: |
|
|
well. I'm only guessing here but.
when you talk about lvm being able to read crashed discs etc. I suppose that means crashed lvm partitions. in your case its the fs thats broken (1/3 missing) that means that is up to fs progs to recover the data.
I dont know if any there are any progs for reiser that could do this. perhaps the resize tool? |
|
Back to top |
|
|
|