* [linux-lvm] naive questions
@ 2008-01-24 22:14 François Patte
2008-01-26 9:23 ` Thomas Krichel
0 siblings, 1 reply; 2+ messages in thread
From: François Patte @ 2008-01-24 22:14 UTC (permalink / raw)
To: LVM general discussion and development
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bonsoir,
I would like to change my linux install and I need to modify /home which
is now like this:
__________________________|__________
sdc1 sdb2 = 4126 extends
If I reduce /home by 4127 extends may I be sure that /home will now stay
on sdc1 only?
I have another question question related to this one: when I created
this /home volume, I could not master the fact that it will be on two
different physical disks.
Was it possible to be aware of this before discoring it after install?
What happens if sdb disk crashes? Shall I loose all my data in /home?
Thanks for attention.
- --
Fran�ois Patte
UFR de math�matiques et informatique
Universit� Paris Descartes
45, rue des Saints P�res
F-75270 Paris Cedex 06
T�l. +33 (0)1 44 55 35 61
http://www.math-info.univ-paris5.fr/~patte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHmQ3RdE6C2dhV2JURAsSpAJ9YO7+RpmQ3o41t0NKqBPNHjVV+YACdFoR7
eFdOuOgABlGTa0pxSOFXOic=
=sDyH
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] naive questions
2008-01-24 22:14 [linux-lvm] naive questions François Patte
@ 2008-01-26 9:23 ` Thomas Krichel
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Krichel @ 2008-01-26 9:23 UTC (permalink / raw)
To: LVM general discussion and development
Fran�ois Patte writes
> I would like to change my linux install and I need to modify /home which
> is now like this:
>
> __________________________|__________
> sdc1 sdb2 = 4126 extends
>
> If I reduce /home by 4127 extends may I be sure that /home will now stay
> on sdc1 only?
>
I am not an expert.
Here is a set of instructions how to do it, step-by-step.
I have used them in the past. The aim, I understand is
to set up a logical volume for /home, that contains
no other disk than sdc1. Let /dev/sdc1 be 100
gibabytes large, for illustration
1. check your volume. Say, it's called vg1-lv1, and
say it's ext2 or ext3
e2fsck -f -y /dev/mapper/vg1-lv1
2. resize the file system
resize2fs -pf /dev/mapper/vg1-lv1 100G
where 100 is the size of home, assumed here.
That resizes the file system with ext, of course,
if you use another file system type there will be
another command.
3. reduce the logical volume
lvreduce -L 100G /dev/vg1/lv1
4. Now look at
pvdisplay
5. If sdb2 is 0% used, go to step 6, else run
pvmove /dev/sdb2
6 you can now reduce the disk from the volume.
vgreduce vg1 /dev/sdb2
> Was it possible to be aware of this before discoring it after
> install?
I guess this is an issue of the O/S you are using.
> What happens if sdb disk crashes? Shall I loose all my data in
> /home?
Not necessarily. If you find that /dev/sdb2 is getting
bad, you get read/write errors, or you perform a
badblock check on it, say, you can recover by
reducing as described about. I have done this
several times with good results.
The big problem occurs of the first disk /dev/sdc1
is in a bad shape such that you can not get to
the filesystem anymore. This is what happened
to me. I still have not fixed my problem, compounded
by the fact that this accident occured shortly
after I erased my backup by mistake.
Unless you are a real disk expert, and you know lvm
very well, I would only use lvm for building
large disks to hold backup, and only when you
are sure you are having two backups.
Bonne chance!
Thomas Krichel http://openlib.org/home/krichel
RePEc:per:1965-06-05:thomas_krichel
phone: +7 383 330 6813 skype: thomaskrichel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-26 9:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-24 22:14 [linux-lvm] naive questions François Patte
2008-01-26 9:23 ` Thomas Krichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).