Moving filesystems into LVM - query.

Hi Guys,

Looking for advice really this time, I have just completed building a server. As it was a fresh build and was just a standard RHEL 6.6 server which would run TSM I just went for partitioning up the disks as I built it.

The disks are 3 500Gb disks in a RAID5 configuration giving just under 1Tb of useable space. The build went smoothly and I built the filesystems as per the provided specification, but my european colleagues forgot to mention the fact that they wanted the disks under the control of LVM - I've found a lot of stuff about LVM and converting to it.

here is the output of a df;

[root@ekbtsmprod01 ~]# df -k
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda7       32896880 1965224  29253936   7% /
tmpfs            4027048       0   4027048   0% /dev/shm
/dev/sda1         245679   35769    196803  16% /boot
/dev/sda8       32896880   49080  31170080   1% /home
/dev/sda9       32896880   49088  31170072   1% /opt
/dev/sda12       8125880   18420   7688032   1% /opt/tivoli
/dev/sda14       3997376    8220   3779444   1% /tmp
/dev/sda5       65924860   53064  62516356   1% /tsm/activelogs
/dev/sda6       65924860   53064  62516356   1% /tsm/archivelogs
/dev/sda2      264092676   60504 250610400   1% /tsm/bdd
/dev/sda3      264092676   60504 250610400   1% /tsm/cache
/dev/sda15       3997376    8184   3779480   1% /tsm/tsminst3
/dev/sda13       8125880   18548   7687904   1% /usr/local
/dev/sda10      32896880  119184  31099976   1% /var
[root@ekbtsmprod01 ~]# cat /etc/vfstab
cat: /etc/vfstab: No such file or directory
[root@ekbtsmprod01 ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Nov 13 11:09:54 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=07ea50a6-db68-4254-b006-0189d2061d1d /                       ext4    defaults        1 1
UUID=b896b0a9-1307-4c34-b96a-63cd2e6a1748 /boot                   ext4    defaults        1 2
UUID=4f672fc5-4480-4146-b6ce-5adc6bfd7dc3 /home                   ext4    defaults        1 2
UUID=f6dc1b22-3f2c-4efa-ae48-fb1e20e4603b /opt                    ext4    defaults        1 2
UUID=025a94dd-b539-420f-ad5b-e3c4f51316dc /opt/tivoli             ext4    defaults        1 2
UUID=39c2c9e7-d51f-4058-9327-66d307d7c675 /tmp                    ext4    defaults        1 2
UUID=ff9a49a8-fe66-4f2d-98ee-c8b86d7a1d30 /tsm/activelogs         ext4    defaults        1 2
UUID=b912c52f-a406-477f-8bf3-7b11ea2dc929 /tsm/archivelogs        ext4    defaults        1 2
UUID=5024bc07-b902-4e9b-bc9d-948a93c2c9bc /tsm/bdd                ext4    defaults        1 2
UUID=40f6c377-4b88-4d0b-92d7-bd97ef4e7a18 /tsm/cache              ext4    defaults        1 2
UUID=09ccecf1-cb9b-4c52-b650-dcd3c833eaa8 /tsm/tsminst3           ext4    defaults        1 2
UUID=72a5e0a3-5b7f-4a14-a040-cc4481cf7df6 /usr/local              ext4    defaults        1 2
UUID=650846db-c9d0-4ac4-85cd-3f3f69e97122 /var                    ext4    defaults        1 2
UUID=88dbb4ef-864b-4f62-9073-610411c9da00 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
[root@ekbtsmprod01 ~]# 

Does anyone have any thoughts on the best way forward with this - I have about 130Gb unalloacted on the RAD5 set.

Regards

Dave

Is /dev/sda hardware RAID-5? What would you gain by going to LVM other than another layer of software to go through?

Easiest way to convert to LVM is to reinstall. You might be able to copy some software and/or data off and just copy it back after the reinstall.

On the whole, though, I don't think it's worth it unless there's some significant reason.

1 Like

Hi achenle,

I'm in complete agreement with you, the RAID-5 is at the hardware level. However my keen eager beaver colleageus have requested that I rebuild the server using LVM, having waited until the delivery build was complete and in alignment with the original specification provided.

I tarred up the full system last night and will reinstall the system this morning and restore over the new LVM based install. That is if my colleages ever get back to me with the required volume groups.

Anyway, thank you for your input.

Regards

Dave

LVM is an ok request as long the protection is not also on software level (lvm mirrors)

It will give you a possiblity to migrate it later without interupting the service (if you avalible disks on the machine) using lvmirror or pvmove.

If you do not have disks inside or FC presented, the downtime will only be to plug / or present those disks unlike if you have no LVM you will have to copy the data which requires much more downtime depending on the size of course.

Regards
Peasant.

Hi Peasant,

I understand where you are comming from on this, but for relocating/moving/virtualising systems there are much more appropriate ways of doing it! On this job I've personally relocated more than 100 servers, the previous job it was almost 1000 as part of a team. The only outage suffered was on the legacy equipment that had to move data centres (lift and shift).

My preferred tools are TDMF and DRBD, both of which allow move/relocate function without any significant outages. Using LVM mirroring does make things easier in this context, but trying to mirror a multi Tb Oracle DB accross a WAN is problematic and in my experience custom tools do a better job.

Regards

Dave

I have recently moved a 2 TB database on HPUX with pvmove from one storage to another.

This was being done lun per lun.

It was done during the day (night is peak in this enviroment), everything went fine with no issues whatsoever.

This is probably due to everything being done on 8G FC network and high end storage with alot of cache.