Unix Technical Forum

LVM install

This is a discussion on LVM install within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> i've got a box that i want to use LVM on. i've searched around and can't find anything helpful ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 09:09 AM
dfj
 
Posts: n/a
Default LVM install

i've got a box that i want to use LVM on. i've searched around and
can't find anything helpful for doing a fresh install onto LVM. i want
to have my /boot partition on a regular Linux (83) partition, but i
want / , /usr, and /var to be on LVM. any suggestions??

Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 09:09 AM
Ioannis A. bouhras
 
Posts: n/a
Default Re: LVM install

dfj wrote:

>
> i've got a box that i want to use LVM on. i've searched around and
> can't find anything helpful for doing a fresh install onto LVM. i want
> to have my /boot partition on a regular Linux (83) partition, but i
> want / , /usr, and /var to be on LVM. any suggestions??
>
> Thanks


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

wwwww
g( o o )g
----------------------------------------------o00--(_)--00o---
+ Ioannis A. Bouhras, Athens Greece +
+ Unix Systems Engineer +
+ Phone: +302108641789 Fax: +302108641789 .oooO Oooo. +
+ E-Mail: ioannis_bouhras@zeuslinux.gr ( ) ( ) +
------------------------------------------------\ (---) /-----
ZEUS-LINUX LVM-1 INSTALLATION INSTRUCTIONS

1. Boot your zeus CDROM
2. Make a /boot partition 200M
3. Make a swap partition RAMx2
4. Make a partition of 2G
5. Format them with reiserfs (or ext2 ,ext3) TIP. if you choose xfs or jfs
you can't reduse it .

/dev/hda1 /boot
/dev/hda2 swap
/dev/hda3 /
LEAVE REST OF FREE SPACE UNFORMATED

5. Leave the rest of the disk free
6. Run setup and make a minimum installation without KDE GNOME etc.
7. Boot your new Zeus system
8. Patch the rc.S startup script with the patch in [Unix scripting forum]
9. Reboot as single user mode [boot: linux -s ]
10. Run cfdisc and create the rest of the disk one new partition with type
LVM 8E. it must be now with name /dev/hda4
11. Create the physical volume with the command [pvcreate /dev/hda4]
12. Create a volume group [vgcreate vg /dev/hda4]
13. Create a logical volume to hold the new root.
[lvcreate -L [REST-OF-DISK SIZE-HERE] [ex. -L20000G] -n root vg] for 20G
so it will be [ lvcreate -L20000G -n root vg ]
14. Create filesystem on your logical volume root
# mkfs.reiserfs /dev/vg/root
15. Make a new directory to hold the new root [ mkdir /mnt/newroot/ ]
16 Mount /dev/vg/root /mnt/newroot

17. Copy your system to the logical volume
[ find / -xdev | cpio -pvmd /mnt/newroot ]
18. Update your newroot fstab [ vi /mnt/newroot/etc/fstab ]

change only: the / partition record

so, the

/dev/hda3 / reiserfs defaults 1 1
becomes:
/dev/vg/root / reiserfs defaults 1 1

We changed the root partition to the logical volume

19. Create an LVM 1 initial RAM disk
[ lvmcreate_initrd ]

It will create the new initrd image under /boot called initrd-lvm-2.4.22.gz

20. Modify your lilo.conf vi /etc/lilo.conf

add a new entry at the end of it

image = /boot/vmlinuz
label = lvm
root = /dev/vg/root
initrd = /boot/initrd-lvm-2.4.22.gz
ramdisk = 8192

21. cp /etc/lilo.conf /mnt/newroot/etc/lilo.conf
22. Run lilo -v to update your boot sector

23. Now you are ready to boot your new LVM-1 system [ Reboot ]
24. If all goes well edit again /etc/lilo.conf of your new lvm system and
change the entry [default = lvm] to boot by default and run lilo -v again

25. Add remainder of disk to the new lvm system. Run cfdisk and change the
type of /dev/hda3 partition in LVM [ 8E]

WARNING: ALL DATA WILL BE LOST

26. Reformat the new partition [ mkfs.reiserfs /dev/hda3 ]

27. Create a new physical volume [ pvcreate /dev/hda3 ]
28. Add the new physical volume to our volume group vg
[ vgextend vg /dev/hda3 ]

29. Create a new boot disk with the new LVM initrd because, if you lose
your /boot/initrd-lvm-2.4.22.gz your system will be unusable.

INFO: We left /dev/hda1 /boot out of LVM because we can't boot from an LVM
partition.

30. And you are ready !!!!!!



Have Fun with your new Zeus-Linux server and the POWER of LVM-1

Now RTFM of the comands below: (man pages are very good)

vgcfgbackup vgck vgexport vgmerge vgremove vgsplit
vgcfgrestore vgcreate vgextend vgmknodes vgrename
vgchange vgdisplay vgimport vgreduce vgscan

lvchange lvextend lvmdiskscan lvreduce lvscan
lvcreate lvmchange lvmsadc lvremove
lvdisplay lvmcreate_initrd lvmsar lvrename

pvchange pvcreate pvdata pvdisplay pvmove pvscan

For more information about LVM refer to
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

PS. If you get in trouble , mail zeus support.


Ioannis A. Bouhras
_________________
Πολλοί ψάχνουν την υδονή, οι εκλεκτοί την δόξα, οι δέ επίλεκτοι την αρετή.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 09:09 AM
Ioannis A. bouhras
 
Posts: n/a
Default Re: LVM install

Ioannis A. bouhras wrote:

>
> dfj wrote:
>
>>
>> i've got a box that i want to use LVM on. i've searched around and
>> can't find anything helpful for doing a fresh install onto LVM. i want
>> to have my /boot partition on a regular Linux (83) partition, but i
>> want / , /usr, and /var to be on LVM. any suggestions??
>>
>> Thanks

>


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Zeus-Linux is a clone of Slack!!!
wwwww
g( o o )g
----------------------------------------------o00--(_)--00o---
+ Ioannis A. Bouhras, Athens Greece +
+ Unix Systems Engineer +
+ Phone: +302108641789 Fax: +302108641789 .oooO Oooo. +
+ E-Mail: ioannis_bouhras@zeuslinux.gr ( ) ( ) +
------------------------------------------------\ (---) /-----
\_) (_/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 09:10 AM
dfj
 
Posts: n/a
Default Re: LVM install

might there be an english translation of zeuslinux.gr ???

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 09:11 AM
Ioannis A. bouhras
 
Posts: n/a
Default Re: LVM install

dfj wrote:

>
> might there be an english translation of zeuslinux.gr ???


Coming soon...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com