My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 20: Creation of LVM through GUI
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  rohitvas...@gmail.com
Closed:  Jan 2009


 
Project Member Reported by imreckless@gmail.com, Dec 24, 2008
Hi,

We need to create LVM with users request.
So we need to write scripts for that.

Sneha will give you the device list from GUI that user has requested
and you have
to take these parameters and create LVM over these devices.

@RV
Your job is to write the shell script, for creating LVM,
Just make sure that you verify that the devices that user has specified exists.
and just notify to the user LVM has been created successfully.

@SH
create a new window for this and accept the devices from user and
create a scripts as specified by RV and run it.

Dec 24, 2008
Project Member #1 imreckless@gmail.com
This is what SS said earlier regarding this issue.

"Just provide me the names of PV and VG ..
I have a shell script  to create the LV from that.

So, What I need is that when someone clicks on "Create LV", it should
invoke a script internally or it can call a function, to which you
will pass a list of PV's and the VG name."


So, with above context we need to write a shell script to specify devices
and create LVM on these devices with ext2 fs over the LVM

We need to specify the tiers also that can be used to create the 
ohsm mapping table we require.

VA now you can specify in what format you require the above tier information
to create the ohsm mapping table.

RA was telling about using XML, am i right.

So RA just explain once more you views.



Dec 25, 2008
Project Member #2 rohitvas...@gmail.com
I am facing problem in validating the device name in the shell script,if any
suggestions then kindly suggest.


Dec 25, 2008
Project Member #3 rohitvas...@gmail.com
The issuse has been resolved
Cc: rohitvashist2kk3
Dec 26, 2008
#4 postri...@gmail.com
I think you can do it using test command

man test for more information
Status: In-progress
Dec 26, 2008
Project Member #5 rohitvas...@gmail.com
It has been done using test command only.
Dec 26, 2008
Project Member #6 rohitvas...@gmail.com
@SH
I have attached 2 files lvc.c and lvscript.sh.
In lvscript.sh following issues have been handled:-
  
1. Whether the device exits or not ,if not notify then notify the user else create
the logical volume.
2.Creation of a single LV over the entire range of disk

lvc.c is a C file .In this file dev variable accepts the device name for eg:-
/dev/sda1 /dev/sda2 /dev/sda3 and so on.

Just link this file to your GUI and do the test run once so that we can finalize
things and proceed further.    
lvc.c
262 bytes   View   Download
lvscript.sh
415 bytes   Download
Dec 26, 2008
Project Member #7 rohitvas...@gmail.com
Issues suggested by SS:-

1.Check whether the system is mounted or not

2.If in case pvcreate succeeds and lvcreate fails then we need to do pvremove before
exiting the code

3.For validation fdisk command should be used instead of test -b


Dec 27, 2008
Project Member #8 rohitvas...@gmail.com
The final script has been attached its is working fine but requires review.Issues
have been dealt.Though it uses test -b for testing block devices it works fine for
all cases.The script is open for testing through GUI.
lvscript.sh
772 bytes   Download
Status: Review-Req
Jan 2, 2009
Project Member #9 imreckless@gmail.com
RV update the issue or close it if this is resolved.
Jan 3, 2009
Project Member #10 sneha.hendre@gmail.com
I have created LVM through GUI
And is sucessfully done.

Jan 3, 2009
Project Member #11 checkout...@gmail.com
well Rohit Iam facing problem in running the script. it is showing some error 
Jan 3, 2009
Project Member #12 rohitvas...@gmail.com
Ok. I am looking into the matter.
Jan 3, 2009
Project Member #13 checkout...@gmail.com
Moreover, I think "df" that is used in script gives disk usage of mounted file
system.In your case there is no mounted file system and you cannot create LVM on
mounted devices

File system is to formed after LVM is created. 

so use something else apart from df.

that is why the Logical Volume created is not of Full extent.
Jan 4, 2009
Project Member #14 rohitvas...@gmail.com
Problems have been resolved.An assumption has been made whie calculating the size for
the logical volume.
The point is that Physical volume and Volume group is being created over the entire
device(what ever the user gives).While doing this less space remains for logical
volume metadata.So, lvcreate fails in some cases.And it may happen over large storage
devices.So the point needs to be reviewed.
Everything else is working fine.
fs_lvm
781 bytes   Download
Jan 6, 2009
Project Member #15 sandeepksinha
RV Can you mention what exactly the problem was ??
Remember... to cleanly explain the problem once you identify it, so that everyone can
understand it.
Jan 9, 2009
Project Member #16 rohitvas...@gmail.com
Suppose i need to create a logical volume over three devices each of size 1GB.Though
size of the logical volume should be around 3GB,its not getting that much space.Its
reserving around 0.15% of the space for some metadata.And logical volume is created
over rest of the remaining space. 
Jan 14, 2009
Project Member #17 sandeepksinha
(No comment was entered for this change.)
Cc: -fscops -sandeepksinha -sneha.hendre -checkout.vineet -postrishi -bharati.alatgi -imreckless -rohitvashist2kk3
Jan 28, 2009
Project Member #18 rohitvas...@gmail.com
I am not able to link my script with the C file dm_ioctl.c .This file takes the input
the logical volume name eg. /dev/vg/lvol0 . Please have a look.
Labels: -Priority-Medium Priority-Critical
Jan 28, 2009
Project Member #19 sandeepksinha
but where is the file dude.
If I can get what you are saying,
try using the system("       "); in your c program.
Labels: he
Jan 30, 2009
Project Member #20 sandeepksinha
This work has been done recently by RV.
The GUI will simply require to use the new files to proceed. 
Jan 31, 2009
Project Member #21 sandeepksinha
This work is complete.
Hence marking it as DONE.
Labels: -he
Jan 31, 2009
Project Member #22 sandeepksinha
(No comment was entered for this change.)
Status: Done
Feb 1, 2009
Project Member #23 rohitvas...@gmail.com
For any further usage refer the two scripts only

1.fs_lvm creates a LVM
2.a.sh displays the list of devices under the lvm.

Issues closed. 
a.sh
343 bytes   Download
fs_lvm
1.4 KB   Download
Feb 1, 2009
Project Member #24 sandeepksinha
Well, Rohit verify with all the other module owners and you can just close the issue
if you wish so.
I hope every module owner is happy with this ?

Powered by Google Project Hosting