Operating System - Linux
1748180 Members
3966 Online
108759 Solutions
New Discussion юеВ

Linux New creation & extension of FS

 
SOLVED
Go to solution
S.S.
Super Advisor

Linux New creation & extension of FS

Dear Experts,

Please assist me in the following.

1. Creation of new FS.
2. online extension of FS.

1. Creation of new FS:
As i know, following are the steps to be performed and correct me if i am wrong.
- pvcreate
- vgcreate -s 32M
- lvcreate -L -n
- mkfs -t ext3
- Add the entry in fstab file.
- mkdir
- mount -t ext3
Help me how can i set this new FS in the multipath.

2. Online extension of FS by adding a new disk because there are no free extents in VG.
May i know, for ext3 filesystems online extension is possible without unmounting the filesystem?
steps:
- pvcreate
- vgextend
- lvextend -L +
please help me the command to do for online extension.
Also, help me do i need to update this in multipath.

Thank you!

3 REPLIES 3
Tim Nelson
Honored Contributor
Solution

Re: Linux New creation & extension of FS

first off.. multipath is device related not filesystem related.

present storage
re-scan fc
run multipath to identify the uuid of the new storage
edit /etc/multipath.conf to create a alias name (if you wish)
run multipath again to create alias namedfile in /dev/mapper/

if you do not use alias then /dev/mapper will have a mpath entry.

use that mpath reference as device name when extending the volume group. Using the /dev/sd entries bypasses multipathing.

then continue expanding creating or expanding with vgcreate or vgextend and lvcreate or lvextend and eventually mkfs or "fsadm resize /path/to/filesystem/mount-point"


Alzhy
Honored Contributor

Re: Linux New creation & extension of FS

1.) Creation process is perfectly correct

As to multipath -- if disk is a SAN disk, it will mean getting yourself familiar with "multipath -ll". A newly added disk will have a multipathed entry in /dev/mapper named /dev/mapper/mpathNN. You fdisk that disk and carve a p1 partition to fully cover the whole disk (Never pvcreate the unpartitioned whole disk!). so:

pvcreate /dev/mapper/mpathNNN

You will soon be aware of the relatioship between "multipath -ll" AND /dev/mapper devices and you can even give your SAN disks friendlier names via /etc/multipath.conf so you can have multipathed disks named like:

/dev/mapper/EVA09_vdisk01


2.) How to extend FS online / sans unmouting:

Your steps are correct - but the final step would be:

resize2fs /dev/vgname/lvolname


Cheers!
Hakuna Matata.
ManojK_1
Valued Contributor

Re: Linux New creation & extension of FS

Which version of linux you are using?

On older systems you can use "ext2online" for extending the filesystem online.


Manoj K

Thanks and Regards,
Manoj K