From: "Eric M. Hopper" <hopper@omnifarious.org>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] 2 LVM questions
Date: Fri, 20 Jul 2001 09:28:28 -0500 [thread overview]
Message-ID: <20010720092828.A11098@omnifarious.org> (raw)
In-Reply-To: <200107201334.QAA26563@easymail.hol.gr>; from moka@hol.gr on Fri, Jul 20, 2001 at 04:34:15PM +0300
[-- Attachment #1: Type: text/plain, Size: 2373 bytes --]
On Fri, Jul 20, 2001 at 04:34:15PM +0300, moka@hol.gr wrote:
>
> Hi there, new to LVM, so I would appreciate if you can
> point me to answers to these questions:
>
> 1) I have a system with 3 hard disks, and only one of
> them is presently used. This contains boot, root and
> swap plus a logical partition(not LVM) containing
> /var and /home.
>
> I have big database tables, so I would like
> to create one volume group consisting of the 2
> unused disks plus the /var. Is this possible
> without losing what is in /var?
> 2) The reason I need a lot of space is that mysql
> which I am using stores the database tables in /var.
> Can I somehow "name" the volume group /var
> so that mysql will not be confused?
I would use pvcreate on your two disks, then vgcreate to bind
them together in a volume group. A volume group is like a virtual disk
drive. You have to 'partition' it. This is what creating a 'logical'
volume us. lvcreate is used for tihs. You can create a logical volume
named whatever you want, but that name has nothing to do with where it's
mounted.
Now, supposing you created a volume group called 'MyOnlyVG' and
created a logical volume on it called 'LVMvar', you now need to do a
mkfs on that logical volume.
mkfs /dev/MyOnlyVG/LVMvar
After you do this, you should move the contents of /var to your
new filesystem.
mount /dev/MyOnlyVG/LVMvar /mnt/tmp
cp -ax /var /mnt/tmp
Now, you can try using your new logical volume as '/var'. I
think you can do this by going to single user mode then doing:
unmount /var
mount /dev/MyOnlyVG/LVMvar /var
init 3 # Goes back to multi-user mode. init 5 for graphical login
If everything seems to work fine, your new var should be OK.
Now you can run pvcreate on your old /var device, run vgextend
to add it to the MyOnlyVG volume group, lvextend to resize the
/dev/MyOnlyVG/LVMvar logical volume/virtual partition, and a file system
resize utility to modifiy the size of the /var filesystem.
Have fun (if at all possible),
--
"It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg." --- Thomas Jefferson
"Go to Heaven for the climate, Hell for the company." -- Mark Twain
-- Eric Hopper (hopper@omnifarious.org http://www.omnifarious.org/~hopper) --
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2001-07-20 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-20 13:34 [linux-lvm] 2 LVM questions moka
2001-07-20 14:20 ` lembark
2001-07-20 14:28 ` Eric M. Hopper [this message]
2001-07-20 14:38 ` Patrick Boutilier
2001-07-20 15:34 ` Joe Thornber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010720092828.A11098@omnifarious.org \
--to=hopper@omnifarious.org \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox