Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » Tips, Tricks & Tutorials

Post new topic   This topic is locked: you cannot edit posts or make replies.
LVM Setup on SMS
View previous topic :: View next topic  
Author Message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Sat Oct 16, 2010 8:31 pm    Post subject: LVM Setup on SMS Reply with quote

All the info about this how to is documented already by slackware team at
http://sms.it-ccs.com/isos/SMS-Current/README_LVM.TXT
but let's make it as simpler as we can, since some users were having problems with lvm setup.

Once you boot with SMS.Native.CD-Install-1.x.x.iso before you run setup
you need to partition your disk.
On this example I used
Code:
/dev/sda1   *           1          12       96358+  83  Linux
/dev/sda2              13        1957    15623212+  83  Linux
/dev/sda3            1958        2088     1052257+  82  Linux swap

where sda2 used for lvm setup.

1. Create physical volume
Code:
pvcreate /dev/sda2

2. Create Volume Group with name sms
Code:
vgcreate sms /dev/sda2

3. Create Logical Volume for root partition
Code:
lvcreate -L 8G -n root sms

4. Create Logical Volume for home partition with remaining space
Code:
lvcreate -l 100%FREE -n home sms

5. Scan disks for Logical Volume Groups
Code:
vgscan --mknodes

6. Activate Logical Volume Groups
Code:
vgchange -ay


Start setup and choose your swap partition as usual, and choose as root partition /dev/sms/root, for home /dev/sms/home and finally choose as boot partition /dev/sda1.
Ignore partition /dev/sda2 and continue with setup.
When it's time to choose a kernel choose a generic one, since huge kernels complains with initrd images, although they may work just fine.

When setup finish don't reboot your server, as lilo is not installed

You need to chroot to your newly system
Code:
chroot /mnt

And edit /etc/lilo.conf to something like
Code:
LBA32
boot = /dev/sda
prompt
timeout = 30
compact
change-rules
reset
vga = 791
image = /boot/vmlinuz
  root = /dev/sms/root
  label = SMS
 initrd = /boot/initrd.gz
  read-only


The most important is to create the initrd image with
Code:
mkinitrd -c -k 2.6.35.7-smp -m ext4 -f ext4 -r /dev/sms/root -L

Where
-k your kernel
-m your modules (-m ext3,ext4,reiserfs)
-f root filesystem
-r root partition
-L add support for LVM in initrd.

SMS generic kernels have built in support for ext2 ext3 ext4 and jfs.

run lilo and ignore the warnings.
exit and reboot your server.

- Video Tutorial -
______________________



You can download the video in .mkv format.
lvmsetup.mkv 4.5MB

- Virtual Appliance -

You can download SMS-1.5.4pre virtual appliance with whole disk as a Volume Group and 6 logical volumes to play with at
http://sms.it-ccs.com/isos/index.php?dir=Testing%2FVirtualbox%2FSMS-1.5.4pre+Virtualbox+3.2.10%2F

Code:
/dev/sms/swap    swap             swap        defaults         0   0
/dev/sms/root    /                ext4        defaults         1   1
/dev/sms/boot    /boot            ext2        defaults         1   2
/dev/sms/home    /home            jfs         defaults         1   2
/dev/sms/var     /var             ext4        defaults         1   2
/dev/sms/usr     /usr             ext4        defaults         1   2



gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    SMS Forum Index » Tips, Tricks & Tutorials All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional