| Issue 20: | Creation of LVM through GUI | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
Dec 25, 2008
I am facing problem in validating the device name in the shell script,if any suggestions then kindly suggest.
Dec 25, 2008
The issuse has been resolved
Cc:
rohitvashist2kk3
Dec 26, 2008
I think you can do it using test command man test for more information
Status:
In-progress
Dec 26, 2008
It has been done using test command only.
Dec 26, 2008
@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.
Dec 26, 2008
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
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.
Status:
Review-Req
Jan 2, 2009
RV update the issue or close it if this is resolved.
Jan 3, 2009
I have created LVM through GUI And is sucessfully done.
Jan 3, 2009
well Rohit Iam facing problem in running the script. it is showing some error
Jan 3, 2009
Ok. I am looking into the matter.
Jan 3, 2009
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
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.
Jan 6, 2009
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
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
(No comment was entered for this change.)
Cc:
-fscops -sandeepksinha -sneha.hendre -checkout.vineet -postrishi -bharati.alatgi -imreckless -rohitvashist2kk3
Jan 28, 2009
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
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
This work has been done recently by RV. The GUI will simply require to use the new files to proceed.
Jan 31, 2009
This work is complete. Hence marking it as DONE.
Labels:
-he
Jan 31, 2009
(No comment was entered for this change.)
Status:
Done
Feb 1, 2009
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.
Feb 1, 2009
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 ? |