MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /usr/share/system-config-lvm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/system-config-lvm/CommandHandler.pyo
mς
˜Dc@szdkZdkZdklZdklZlZlZlZlZl	Z	dk
TdkZeiZdfd„ƒYZ
dS(N(sCommandError(sexecWithCapturesexecWithCaptureErrorStatussexecWithCaptureStatussexecWithCaptureProgresss"execWithCaptureErrorStatusProgresssexecWithCaptureStatusProgress(t*tCommandHandlercBsυtZd„Zgd„Zed„Zed„Zd„Zd„Zgd„Z	d„Z
d	„Zd
„Zd„Z
ed„Zd
„Zd„Zd„Zd„Zd„Zd„Zed„Zed„Zd„Zd„Zd„Zd„ZRS(NcCsdS(N((tself((t./usr/share/system-config-lvm/CommandHandler.pyt__init__scCsRtƒ}|itƒ|idƒ|t}|i|ƒ|ttjo(|idƒ|it	|t
ƒƒnž|idƒ|ttjo|it	|t
ƒdƒna|ttjo|it	|t
ƒdƒn1|tt
jo|it	|t
ƒdƒn|to"|idƒ|i|tƒn‘|to|idƒn|ttjoL|id	ƒ|it	|tƒƒ|id
ƒ|it	|tƒƒn|t}|i|ƒx!|D]}|i|iƒƒqΤWdi|ƒ}tt|tdƒƒ\}
}	}|d
jo t!dt"d||	fƒ‚ndS(Ns-ns-ls-Ltktmtgs-ss-m1s-is-It sCreating Logical VolumeitFATALtlvcreate(#tlisttarglisttappendtLVCREATE_BIN_PATHt
cmd_args_dicttNEW_LV_NAME_ARGtlvnametNEW_LV_UNIT_ARGt
EXTENT_IDXtstrtNEW_LV_SIZE_ARGtKILOBYTE_IDXtMEGABYTE_IDXtGIGABYTE_IDXtNEW_LV_SNAPSHOTtNEW_LV_SNAPSHOT_ORIGINtNEW_LV_MIRRORINGtNEW_LV_IS_STRIPED_ARGtTruetNEW_LV_NUM_STRIPES_ARGtNEW_LV_STRIPE_SIZE_ARGtNEW_LV_VGNAME_ARGtvgnametpvlisttpvtget_pathtjointcmd_strt"execWithCaptureErrorStatusProgresst_t
result_stringterrtrestCommandErrortCOMMAND_FAILURE(RRR"RR!R#R+RR&R*R)((Rtnew_lvsF	










	
c	Csφtƒ}|itƒ|o|idƒn|idƒ|idƒ|it|ƒƒ|i|ƒdi|ƒ}|o&t
t|ƒ\}}}|djSntt|tdƒƒ\}}}|djo tdtd||fƒ‚ndS(	Ns--tests-fs-lRisResizing Logical VolumeR	tlvresize(Rtcmd_argsR
tLVREDUCE_BIN_PATHttestRtnew_size_extentstlvpathR%tcmdstrtexecWithCaptureErrorStatustoutR*R+R'R(R,R-(	RR4R3R2R*R5R+R0R7((Rt	reduce_lv;s 	



	
c	Csιtƒ}|itƒ|o|idƒn|idƒ|it|ƒƒ|i|ƒdi|ƒ}|o&t
t|ƒ\}}}|djSntt|tdƒƒ\}}}|djo tdtd||fƒ‚ndS(Ns--tests-lRisResizing Logical VolumeR	R/(RR0R
tLVEXTEND_BIN_PATHR2RR3R4R%R5R6R7R*R+R'R(R,R-(	RR4R3R2R*R5R+R0R7((Rt	extend_lvNs	


	
cCsˆtƒ}|itƒ|idƒ|i|ƒdi|ƒ}tt|ƒ\}}}|djo tdtd||fƒ‚ndS(Ns-ayRiR	tlvchange(
RR0R
tLVCHANGE_BIN_PATHR4R%R5R6R7R*R+R,R-(RR4R*R5R+R7R0((Rtactivate_lv_s	



cCsˆtƒ}|itƒ|idƒ|i|ƒdi|ƒ}tt|ƒ\}}}|djo tdtd||fƒ‚ndS(Ns-anRiR	R;(
RR0R
R<R4R%R5R6R7R*R+R,R-(RR4R*R5R+R7R0((Rt
deactivate_lvis	



c	Cs΅tƒ}|itƒ|idƒ|i|ƒx!|D]}|i|iƒƒq7Wdi|ƒ}t
t|tdƒƒ\}}}|djo tdtd||fƒ‚ndS(Ns-m1RsAdding Mirror to Logical VolumeiR	t	lvconvert(RR0R
tLVCONVERT_BIN_PATHR4R"R#R$R%R5R'R(R7R*R+R,R-(	RR4R"R5R#R*R+R0R7((Rt
add_mirroringss	


	
cCs‘tƒ}|itƒ|idƒ|i|ƒdi|ƒ}tt|tdƒƒ\}}}|djo tdt
d||fƒ‚ndS(Ns-m0Rs#Removing Mirror from Logical VolumeiR	R?(RR0R
R@R4R%R5R'R(R7R*R+R,R-(RR4R5R*R+R0R7((Rtremove_mirroring€s	


	
c	Cs’tƒ}|idƒ|idƒ|i|ƒ|i|ƒ|i|ƒdi|ƒ}td|ƒ\}}}|djo tdt
d||fƒ‚ndS(Ns
/bin/mounts-tRiR	tmount(RR0R
tfstypetdev_patht	mnt_pointR%R5R6R7R*R+R,R-(	RRERFRDR*R+R5R0R7((RRC‹s	





cCsͺ|iƒ}tƒ}|itƒ|idƒ|idƒ|i|ƒdi|ƒ}t	t|t
dƒƒ\}}}|djo tdtd||fƒ‚ndS(Ns-Mt2RsInitializing Physical VolumeiR	tpvcreate(tenttstriptentityRtcommand_argsR
tPVCREATE_BIN_PATHR%t
commandstringR'R(R7R*R+R,R-(RRIR*R+RLRKRNR7((Rtinitialize_entity—s	



	
cCstƒ}|itƒ|i|iƒƒ|i|iƒƒdi|ƒ}t	t|t
dƒƒ\}}}|djo tdtd||fƒ‚ndS(NRs&Adding Physical Volume to Volume GroupiR	tvgextend(RtargsR
tVGEXTEND_BIN_PATHtvgRJR#R%R5R'R(R7R*R+R,R-(RR#RSR5R*R+RQR7((Rtadd_unalloc_to_vg€s	
	
cCsK|o
d}
nd}
||
}tƒ}|itƒ|idƒ|idƒ|i|ƒ|idƒ|i|ƒ|idƒ|i|ƒ|idƒ|o|idƒn|id	ƒ|i|iƒƒ|i|iƒƒd
i|ƒ}
tt|tdƒƒ\}}	}|djo td
td|
|	fƒ‚ndS(NRRs-M2s-ls-ps-ss-ctytnRsCreating Volume GroupiR	tvgcreate(tis_unit_megst	units_argtextent_sizetsize_argRRQR
tVGCREATE_BIN_PATHtmax_logtmax_physt	clusteredtnameRJR#R%R5R'R(R7R*R+R,R-(RR`R^R]RZRXR#R_R[R*R5R+RQRYR7((Rt
create_new_vg―s0

	









	
c
Cs-tƒ}|itƒ|idƒ|idƒ|i|iƒƒdi|ƒ}tt|ƒ\}}}|djo$tdt
d||fƒ‚dSntd|}tƒ}|itƒ|i|ƒdi|ƒ}tt|tdƒƒ\}	}
}|djo tdt
d||
fƒ‚ndS(	Ns-aRVRiR	tvgchangesRemoving Volume Grouptvgremove(RRQR
tVGCHANGE_BIN_PATHR!RJR%R5R6R7R*R+R,R-tVGREMOVE_BIN_PATHRNt	args_listt	cmdstringR'R(toutsterrstresult(
RR!RjRQR*R+R5RgRNRhRiRfR7((Rt	remove_vgΟs&	



	

	
cCsŠtƒ}|itƒ|i|iƒƒdi|ƒ}tt|t	dƒƒ\}}}|djo t
dtd||fƒ‚ndS(NRsRemoving Physical VolumeiR	tpvremove(RRQR
tPVREMOVE_BIN_PATHtpvnameRJR%R5R'R(R7R*R+R,R-(RRnR5R*R+RQR7((Rt	remove_pvεs	
	
cCs—tƒ}|itƒ|idƒ|i|iƒƒdi|ƒ}tt|t	dƒƒ\}}}|djo t
dtd||fƒ‚ndS(Ns--forceRsRemoving Logical VolumeiR	tlvremove(RRQR
tLVREMOVE_BIN_PATHRRJR%R5R'R(R7R*R+R,R-(RRR5R*R+RQR7((Rt	remove_lvοs	

	
c	Csžtƒ}|itƒ|i|ƒ|i|ƒ|i|ƒdi|ƒ}t	t|t
dƒƒ\}}}|djo tdtd||fƒ‚ndS(NRsRenaming Logical VolumeiR	tlvrename(RRQR
tLVRENAME_BIN_PATHR!t
lvname_oldt
lvname_newR%R5R'R(R7R*R+R,R-(	RR!RuRvR5R*R+RQR7((Rt	rename_lvϊs	



	
cCs›dg}|i|ƒdi|ƒ}td|ƒ\}}}|djo t	dt
d||fƒ‚nx*|djotd|ƒ\}}}qmWdS(Ns/bin/umountRiR	tumount(RQR
t
mountpointR%R5R6R7R*R+R,R-(RRyR5R*R+RQR7((Rtunmounts	

 
cCstƒ}|itƒ|i|iƒƒ|i|iƒƒdi|ƒ}t	t|t
dƒƒ\}}}|djo tdtd||fƒ‚ndS(NRs*Removing Physical Volume from Volume GroupiR	tvgreduce(RRQR
tVGREDUCE_BIN_PATHRSRJR#R%R5R'R(R7R*R+R,R-(RRSR#R5R*R+RQR7((Rt	reduce_vgs	
	
c
Csξtƒ}	|	itƒ|ddjoŒ|ddjo|	idƒq³|ddjo|	idƒq³|ddjo|	idƒq³|ddjo|	idƒq³n|ddjo|	id	|dƒn|iƒ}x>|D]6\}}|d
t|ƒdt||dƒ}qπW|	i|ƒ|ddjo|	i|dƒn|o)|	idƒtt|	ƒ\}}}n"tt|	td
ƒƒ\}}}|djo/di|	ƒ}
tdtd|
|fƒ‚ndS(Niis--alloc inherits--alloc normalis--alloc contiguousis--alloc anywheres--name t:t-s--backgroundsMigrating ExtentsRR	tpvmove(RRQR
tPVMOVE_BIN_PATHtdatatNoneR#RJtpv_fromtextents_fromtstarttsizeRt
backgroundR6R7R*R+R'R(R%R5R,R-(
RR#R…R‚RˆR7R+R†R‡RQR5R*R„((Rtmove_pvs8	
.

	
cCsštg}|o)|idƒtt|ƒ\}}}n"tt|t	dƒƒ\}}}|djo/di
|ƒ}tdt
d||fƒ‚ndS(Ns--backgroundsCompleting Extent MigrationiRR	R€(RRQRˆR
R6R7R*R+R'R(R%R5R,R-(RRˆR5R*R+RQR7((Rtcomplete_pvmove@s	
	
cCs„tƒ}|idƒ|idƒtd|ƒ}|iƒ}x?|D]7}|iƒ}|di
ƒ}|djotSqEqEWt
S(Ns
/sbin/dmsetupttargetsitmirror(RRR
texecWithCaptureRjt
splitlinest	textlinesttextlinetsplitt
text_wordsRJtpossible_targetRtFalse(RR’RR“RRjR((Rtis_dm_mirror_loadedLs	


cCs„tƒ}|idƒ|idƒtd|ƒ}|iƒ}x?|D]7}|iƒ}|di
ƒ}|djotSqEqEWt
S(Ns
/sbin/dmsetupR‹iRŒ(RRR
RRjRŽRRR‘R’RJR“RR”(RR’RR“RRjR((RR•Zs	


cCs„tƒ}|idƒ|idƒtd|ƒ}|iƒ}x?|D]7}|iƒ}|di
ƒ}|djotSqEqEWt
S(Ns
/sbin/dmsetupR‹itsnapshot(RRR
RRjRŽRRR‘R’RJR“RR”(RR’RR“RRjR((Rtis_dm_snapshot_loadedgs	


cCsbd}|d|g}t||ƒ\}}}|djotSntdddgt	dƒƒt
S(Ns/sbin/blockdevs
--rereadptitsleept1sRereading partition table(tBLOCKDEV_BINtdevpathRQR6R7R*tstatusR”texecWithCaptureProgressR(R(RR›RœR*RQRšR7((Rtreread_partition_tablets
(t__name__t
__module__RR.R”R8R:R=R>RARBRCRORTRaRkRoRrRwRzR}R‰RŠR•R—Rž(((RRs0	*	
	

			
	 		
				
"		
	
(toststringR,texecuteRR6texecWithCaptureStatusRR'texecWithCaptureStatusProgresstlvmui_constantstgettextR(R(RR’R6R‘R'RR€R§R₯R,RR(((Rt?s		
+		

Anon7 - 2021