System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

 
SOLVED
Go to solution
Alzhy
Honored Contributor

Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

With the exception of /boot of course - is there any operational advantage to having my OS partitions using LVM if the underlying disk is already HW protected?

This:
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg00-root
20314748 3136312 16129860 17% /
/dev/mapper/vg00-var 40342864 440852 37819608 2% /var
/dev/mapper/vg00-opt 10157368 185576 9447504 2% /opt
/dev/mapper/vg00-tmp 2031440 247312 1679272 13% /tmp
/dev/sda1 256666 24941 218473 11% /boot
tmpfs 66050764 0 66050764 0% /dev/shm


Or This:

# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 20315844 9302180 9965024 49% /
/dev/sda5 10153988 566296 9063576 6% /opt
/dev/sda6 41611472 17303484 22160100 44% /var
/dev/sda1 1019208 46788 919812 5% /boot
tmpfs 123610636 0 123610636 0% /dev/shm
Hakuna Matata.
8 REPLIES
Matti_Kurkela
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

Logical volumes can be resized on-line.

Resizing traditional partitions always requires that all filesystems on that disk must be unmounted, so that the system can start using the new partition table.

Because root filesystem cannot be unmounted, resizing the partitions on a system disk always requires a reboot.

MK
MK
Alzhy
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

Matti..
Since these are OS/SYstem partitions -- the likelihood of ever resizing them will be pretty remote as 'cept for /var and /tmp most filesystems are or will be static anyway -- So I question whether it is worth it.

Besides -- during a SystemRescue Boot -- would I be easily able to mount my System Partition that are on LVM? I have not tried - but I am just guessing one would go throught he VM gyrations - right? But if the paritions were simple slices -- it would just be a simple mount.

Hakuna Matata.
Michal Kapalka (mikap)
Honored Contributor
Solution

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

hi,

i don't see any reason to use LVM, on HW raid,

as you mentioned, if you need to use recovery cd, for me is simple to mount typycal FS instead of LVM.

mikap



Ivan Ferreira
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

I agree that resizing is a good reaons, and you do can resize / online, I did it as you don't have to modify the partions, just extend the logical volumes.


>>> Besides -- during a SystemRescue Boot -- would I be easily able to mount my System Partition that are on LVM? I have not tried - but I am just guessing one would go throught he VM gyrations - right? But if the paritions were simple slices -- it would just be a simple mount.

When you enter in rescue mode, you just need to run:

lvm vgchange -ay

And then, use lvm command before any "known" volume management command, like:

lvm vgdisplay
lvm lvdisplay

You can also take snapshots, to obtain a consistent backups.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

Shalom,

Yes LVM

LVM everything but /boot which can not be on LVM.

Why? Because if you add disk, you can dynamically extend any partiton with the same commands you know and love from HP-UX.

Without LVM, you need to make a new partition and use dd to copy the data and then remount. Possible. Far from fun.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matti_Kurkela
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

> Since these are OS/SYstem partitions -- the likelihood of ever resizing them will be pretty remote as 'cept for /var and /tmp most filesystems are or will be static anyway -- So I question whether it is worth it.

You know the use and configuration of your systems: you decide.

If you use traditional partitioning, remember to make your /var and /tmp roomy enough. My current standard is that there must be enough free space to download a full DVD image to either /var/tmp or /tmp; some application updates are sometimes delivered as ISO images, and there must be a place to put the image for mounting it.

(We operate most of our systems remotely, so the use of a local DVD drive would be inconvenient.)

> Besides -- during a SystemRescue Boot -- would I be easily able to mount my System Partition that are on LVM?

Yes. For example, the rescue mode of RHEL 4 and 5 does this automatically.

If you need to do it manually, it's simple enough:

vgscan -vv (to explicitly detect the VG configuration, and the -vv option so that you can see the name of the system VG)

vgchange -a y

mount /dev// /
or
mount /dev/mapper/- /

In some situations, a system with root filesystem on LVM can be even *more* robust than a traditionally-partitioned system: if you need to move the system disk to a different type of storage controller (IDE to SATA, from one SCSI/SAS controller to another, etc.) you'll only need to make sure that the initrd contains the driver for the new storage controller and that it is loaded by the system (e.g. in RHEL, the /etc/modprobe.conf lists both the old and the new storage controller before re-creating the initrd).

With a traditional system, you must get the /dev/sd* name of the root partition exactly right or your system won't boot, which may be challenging when changing storage controllers. With a LVM system, the initrd will automatically detect all VGs on all storage devices it has drivers for; if the system VG can be accessed with those drivers, the system will automatically find it and use it.

In effect, you can easily achieve a configuration which can boot at least to single-user mode with either old and new controller using the exact same configuration for both cases - very convenient if the new controller turns out to be DOA/incompatible and you'll have to resume using the old controller.

Been there, done that.

Of course, the LVM is different and requires some new skills. Pick the one you're most comfortable with.

MK
MK
Alzhy
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

Gracias Amigos!

'Been a UNIX Shop at work and we're on our way to moving from RISC to Linux. And it's been kool so far - am not just convinced this is the right move for our uber-large systems - but hey...

We're finding out and I am proving to my team that the transition for UNIX Admins(specially HP-UX admins) is rather easy...

At home and smaller NGOs I've been using flavours of Linux (mostly Debian/Ubuntu though) on vMware but in the last 18 months switched to KVM with excellent results.

I will continue to inquire and validate our steps in this forum and will also share my experiences.

Thank you sirs.
Hakuna Matata.
dirk dierickx
Honored Contributor

Re: Linux OS Partitions - on HW RAID Disk -- to LVM oor Not?

LVM, a volume manager, as on any unix is highly advisable.

it makes working with disks easier (although it might seem more complex at start). you can resize filesystems easily. another great advantage is that a filesystem can span multiple disks. filesystem don't have to be continous blocks on disks. cluster operations are easier too i find. etc.

main purpose of raid is protection, main purpose of lvm is disk management.