<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thinkway</title>
	<atom:link href="http://www.thinkway.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkway.info</link>
	<description>NetApp, Linux Experience Shares</description>
	<lastBuildDate>Mon, 19 Dec 2011 06:36:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>awk print output to 1 line</title>
		<link>http://www.thinkway.info/2011/12/awk-print-output-to-1-line/</link>
		<comments>http://www.thinkway.info/2011/12/awk-print-output-to-1-line/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 06:36:41 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=103</guid>
		<description><![CDATA[awk '{printf("%s ",$1) }' &#60;file name&#62;]]></description>
			<content:encoded><![CDATA[<p><code>awk '{printf("%s ",$1) }' &lt;file name&gt;</code></p>
<div id="-chrome-auto-translate-plugin-dialog" style="opacity: 1 !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; position: absolute !important; top: 0px; left: 0px; overflow-x: visible !important; overflow-y: visible !important; z-index: 999999 !important; text-align: left !important; display: none; background-position: initial initial !important; background-repeat: initial initial !important; padding: 0px !important; margin: 0px !important;">
<p><img style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" alt="" /></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/12/awk-print-output-to-1-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designsync dword</title>
		<link>http://www.thinkway.info/2011/12/designsync-dword/</link>
		<comments>http://www.thinkway.info/2011/12/designsync-dword/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 00:27:12 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[A-la-carte]]></category>
		<category><![CDATA[designsync]]></category>
		<category><![CDATA[dword]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=100</guid>
		<description><![CDATA[I have no result found from Google regarding Designsync dword and i think i should share it out after getting the info from Designsync support. Command: grep -H ServerMaintenanceMode=dword:1 /&#60;path&#62;/&#60;port_number&#62;/PortRegistry.reg dword:1 = Normal operation dword:2 = Set server to read-only mode dword:3 = block all read and write access to server]]></description>
			<content:encoded><![CDATA[<p>I have no result found from Google regarding Designsync dword and i think i should share it out after getting the info from Designsync support.</p>
<p>Command:</p>
<p>grep -H ServerMaintenanceMode=dword:1 /&lt;path&gt;/&lt;port_number&gt;/PortRegistry.reg</p>
<p>dword:1 = Normal operation</p>
<p>dword:2 = Set server to read-only mode</p>
<p>dword:3 = block all read and write access to server</p>
<div id="-chrome-auto-translate-plugin-dialog" style="opacity: 1 !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; position: absolute !important; top: 0px; left: 0px; overflow-x: visible !important; overflow-y: visible !important; z-index: 999999 !important; text-align: left !important; display: none; background-position: initial initial !important; background-repeat: initial initial !important; padding: 0px !important; margin: 0px !important;">
<div style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left  !important;"></div>
<p><img style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/12/designsync-dword/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple Home NAS solution</title>
		<link>http://www.thinkway.info/2011/11/simple-home-nas-solution/</link>
		<comments>http://www.thinkway.info/2011/11/simple-home-nas-solution/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 03:30:50 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cheap nas]]></category>
		<category><![CDATA[fedora nas]]></category>
		<category><![CDATA[Home nas]]></category>
		<category><![CDATA[simple nas]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=94</guid>
		<description><![CDATA[I have been thinking on having my home NAS and i did survey for a few market product like QSNAP or SYNOLOGY will cost me near to 1000USD , if i were to get a RAID-5 + hot swap features. I struggled for a while and decided to use the simplest + cheap solution for home NAS to host my photo + movie + mp3. Step 1 &#8211; Identify OS: 1. Freenas &#8211; FreeBSD based , i like FreeBSD because &#8230; <a href="http://www.thinkway.info/2011/11/simple-home-nas-solution/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been thinking on having my home NAS and i did survey for a few market product like QSNAP or SYNOLOGY will cost me near to 1000USD , if i were to get a RAID-5 + hot swap features. I struggled for a while and decided to use the simplest + cheap solution for home NAS to host my photo + movie + mp3.</p>
<p><strong><span style="text-decoration: underline;">Step 1 &#8211; Identify OS:</span></strong></p>
<p>1. Freenas &#8211; FreeBSD based , i like FreeBSD because it was the core for Netapp too.</p>
<p>2. Openfiler &#8211; CentOS based, customized for NAS.</p>
<p>3. Fedora + Samba</p>
<p>I picked number 3 which is Fedora + Samba , as i still need my NAS OS to be a multi purpose server and i love YUM~</p>
<p><strong><span style="text-decoration: underline;"> Step2 &#8211; Hardware</span></strong></p>
<p>1. 2 years old HP 110 Netbook</p>
<p>2. 2TB Seagate External Harddisk</p>
<p>Finally&#8230;. the combination!</p>
<p><strong><span style="text-decoration: underline;"></p>
<div id="attachment_95" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.thinkway.info/log/wp-content/uploads/2011/11/hp110.jpg"><img class="size-thumbnail wp-image-95" title="hp110" src="http://www.thinkway.info/log/wp-content/uploads/2011/11/hp110-150x150.jpg" alt="" width="150" height="150" /></a><p class="wp-caption-text">HP 2 years old 110</p></div>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.thinkway.info/log/wp-content/uploads/2011/11/seagate2tb.jpg"><img class="size-thumbnail wp-image-96" title="seagate2tb" src="http://www.thinkway.info/log/wp-content/uploads/2011/11/seagate2tb-150x150.jpg" alt="" width="150" height="150" /></a><p class="wp-caption-text">2TB Seagate External Disk</p></div>
<div id="attachment_98" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.thinkway.info/log/wp-content/uploads/2011/11/fedora-logo.png"><img class="size-thumbnail wp-image-98" title="fedora-logo" src="http://www.thinkway.info/log/wp-content/uploads/2011/11/fedora-logo-150x150.png" alt="" width="150" height="150" /></a><p class="wp-caption-text">Fedora 15</p></div>
<p></span></strong></p>
<div id="-chrome-auto-translate-plugin-dialog" style="opacity: 1 !important; background-image: initial !important; background-attachment: initial !important; background-origin: initial !important; background-clip: initial !important; background-color: transparent !important; position: absolute !important; top: 0px; left: 0px; overflow-x: visible !important; overflow-y: visible !important; z-index: 999999 !important; text-align: left !important; display: none; background-position: initial initial !important; background-repeat: initial initial !important; padding: 0px !important; margin: 0px !important;">
<div style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left  !important;"></div>
<p><img style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/11/simple-home-nas-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check if there is packet drop in Netapp filer</title>
		<link>http://www.thinkway.info/2011/10/how-to-check-if-there-is-packet-drop-in-netapp-filer/</link>
		<comments>http://www.thinkway.info/2011/10/how-to-check-if-there-is-packet-drop-in-netapp-filer/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 08:00:54 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[NetApp]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=91</guid>
		<description><![CDATA[Command: netstat -I e4a -d Output: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Collis Drop e4a 9000 none none 2007724074 1 2991841358 0 0 0 &#160; 0 is the one you are looking for.]]></description>
			<content:encoded><![CDATA[<p>Command: netstat -I e4a -d</p>
<p>Output:<br />
Name   Mtu   Network             Address             Ipkts  Ierrs  Opkts  Oerrs  Collis   <span style="color: #ff0000;">Drop</span><br />
e4a     9000 none                none         2007724074      1  2991841358      0       0     <span style="color: #ff0000;">0</span></p>
<p>&nbsp;</p>
<p><span style="color: #000000;">0 is the one you are looking for.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/10/how-to-check-if-there-is-packet-drop-in-netapp-filer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proper way to delete snapvault relationship</title>
		<link>http://www.thinkway.info/2011/08/proper-way-to-delete-snapvault-relationship/</link>
		<comments>http://www.thinkway.info/2011/08/proper-way-to-delete-snapvault-relationship/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 09:13:42 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[NetApp]]></category>
		<category><![CDATA[relationship]]></category>
		<category><![CDATA[snapvault]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=83</guid>
		<description><![CDATA[I have problem with my backup in Netapp Protection Manager, the backup using snapvault technology just hang and unable to run any backup at all. This is a bug according to them and will be fixed in 8.0.2(hopefully). I always wanted to know the proper way to remove snapvault relation shop and i am doing this today. Note: create case in Netapp to assist you in case you are uncertain of anything, this guideline is just for information sharing and &#8230; <a href="http://www.thinkway.info/2011/08/proper-way-to-delete-snapvault-relationship/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have problem with my backup in Netapp Protection Manager, the backup using snapvault technology just hang and unable to run any backup at all. This is a bug according to them and will be fixed in 8.0.2(hopefully). I always wanted to know the proper way to remove snapvault relation shop and i am doing this today.<br />
Note: create case in Netapp to assist you in case you are uncertain of anything, this guideline is just for information sharing and my own references.<br />
<br />
<code><br />
########################################################<br />
To list out the dfpm data set for job id(check from source snapshot)<br />
########################################################<br />
C:\Documents and Settings\admin1>dfpm dataset list -m 23953<br />
Id         Node Name            Dataset Id Dataset Name         Type            Name<br />
---------- -------------------- ---------- -------------------- --------------- -------------------------------------------------------<br />
     20538 filerSource               23953 VOL A Dataset new volume          filerSource:/volumeA<br />
     23955 filerDest                23953 VOL A Dataset new volume          filerDest:/volume_A_Dataset_new_backup<br />
     24400 filerDest                23953 VOL A Dataset new volume          filerDest:/volume_A_Dataset_new_backup_1</p>
<p>C:\Documents and Settings\admin1>dfpm dataset list -x 23953<br />
Id:                              23953<br />
Name:                            VOL A Dataset new<br />
Policy:                          Backup Policy For PG t28<br />
Description:<br />
Owner:<br />
Contact:<br />
Volume Qtree Name Prefix:<br />
DR Capable:                      No<br />
Requires Non Disruptive Restore: No</p>
<p>Node details:</p>
<p>   Node Name:           filerSource<br />
   Resource Pools:<br />
   Provisioning Policy:<br />
   Time Zone:<br />
   DR Capable:          No<br />
   vFiler:</p>
<p>   Node Name:           filerDest<br />
   Resource Pools:      PG DRNAS BACKUP 02<br />
   Provisioning Policy: No Dedupe Policy for Secondary<br />
   Time Zone:<br />
   DR Capable:          No<br />
   vFiler:</p>
<p>==========================</p>
<p>After</p>
<p>C:\Documents and Settings\admin1>dfpm dataset snapshot list 23953<br />
Id   Name            Unique Id    Volume          Timestamp            Versioned  Dependencies    % of Total Blocks<br />
---- --------------- ------------ --------------- -------------------- ---------- --------------- ----------<br />
75019592 dfpm_base(dataset-id-23953)conn1.3 1306675183   filerSource:/volumeA 29 May 2011 21:19:43 No         SnapVault       33%  (19%)<br />
83770083 dfpm_base(dataset-id-23953)conn1.0 1310908962   filerSource:/volumeA 17 Jul 2011 21:22:42 No         SnapVault,acs   13%  (11%)<br />
86355690 dfpm_base(dataset-id-25559)conn1.1 1311686499   filerSource:/volumeA 26 Jul 2011 21:21:39 No         Busy - SnapVault 3%  (2%)<br />
86355689 dfpm_base(dataset-id-25559)conn1.0 1311772921   filerSource:/volumeA 27 Jul 2011 21:22:01 No         Busy - SnapVault,acs 0%  (0%)<br />
86377105 nightly.0       1311782476   filerSource:/volumeA 28 Jul 2011 00:01:16 No         None            0%  (0%)</p>
<p>########################################################<br />
To delete snapshot in source from OM databse<br />
########################################################<br />
C:\Documents and Settings\admin1>dfpm dataset snapshot delete 23953 "filerSource:/volumeA" 75019592<br />
Dataset dry run results<br />
----------------------------------<br />
Do: Delete snapshots 'dfpm_base(dataset-id-23953)conn1.3' of volume filerSource:/volumeA (20538).<br />
Effect: Selected snapshots will be deleted.<br />
Following snapshots have applications dependent on them:<br />
dfpm_base(dataset-id-23953)conn1.3 - SnapVault</p>
<p>Started job 13340 to delete snapshot(s) of the volume 'filerSource:/volumeA' of the dataset 'VOL A Dataset new' (23953).</p>
<p>C:\Documents and Settings\admin1>dfpm dataset snapshot delete 23953 "filerSource:/volumeA" 83770083<br />
Dataset dry run results<br />
----------------------------------<br />
Do: Delete snapshots 'dfpm_base(dataset-id-23953)conn1.0' of volume filerSource:/volumeA (20538).<br />
Effect: Selected snapshots will be deleted.<br />
Following snapshots have applications dependent on them:<br />
dfpm_base(dataset-id-23953)conn1.0 - SnapVault, acs</p>
<p>Started job 13341 to delete snapshot(s) of the volume 'filerSource:/volumeA' of the dataset 'VOL A Dataset new' (23953).</p>
<p>########################################################<br />
To delete snapshot at destination, take few hours.<br />
########################################################</p>
<p>[root@linux tiwlim]# rsh filerDest snapvault stop filerDest:/vol/volume_A_Dataset_new_backup_1/t28lp_ip<br />
Stopping /vol/volume_A_Dataset_new_backup_1/t28lp_ip is permanent.<br />
The secondary qtree will be deleted.<br />
Further incremental updates will be impossible.<br />
Data already stored in snapshots will not be deleted.<br />
This may take a long time to complete.<br />
Are you sure you want to do this? y<br />
Snapvault configuration for the qtree has been deleted.<br />
</code><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/08/proper-way-to-delete-snapvault-relationship/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>python script for simple write and delete test</title>
		<link>http://www.thinkway.info/2011/06/python-script-for-simple-write-and-delete-test/</link>
		<comments>http://www.thinkway.info/2011/06/python-script-for-simple-write-and-delete-test/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 08:38:06 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[write test]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=72</guid>
		<description><![CDATA[Have been interested for python script and finally i got a chance to play with it. So the mission for today is to create the write and delete test for my environment. Local machine  &#8212;-COPY&#8212;&#62;  Mounted filesystem in NAS Why i am doing so? to get a baseline for my write and delete operation.I will make use of &#8220;time&#8221; command to get total runtime for the script to complete the operation. So here goes the simple script(Feel free to provide &#8230; <a href="http://www.thinkway.info/2011/06/python-script-for-simple-write-and-delete-test/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have been interested for python script and finally i got a chance to play with it.</p>
<p>So the mission for today is to create the write and delete test for my environment.</p>
<p>Local machine  &#8212;-COPY&#8212;&gt;  Mounted filesystem in NAS</p>
<p>Why i am doing so? to get a baseline for my write and delete operation.I will make use of &#8220;time&#8221; command to get total runtime for the script to complete the operation. So here goes the simple script(Feel free to provide your code if you have idea, i am a noob in python:) )<br />
<br />
BTW, Nanako is just an echo.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">shutil</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#set source path &amp; file name</span>
src = <span style="color: #483d8b;">&quot;/usr2/&quot;</span>
file_name = <span style="color: #483d8b;">&quot;testfile.txt&quot;</span>
source_file_path = src + file_name
&nbsp;
<span style="color: #808080; font-style: italic;">#set destination path</span>
dest = <span style="color: #483d8b;">&quot;/data/tingwei/test_copy/&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#set number of copies for the copying progress</span>
copies = <span style="color: #ff4500;">1000</span>
dir_copies = <span style="color: #ff4500;">10</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span>dir_copies<span style="color: black;">&#41;</span>:
    dirname = dest + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">isdir</span><span style="color: black;">&#40;</span>dirname<span style="color: black;">&#41;</span>:
        <span style="color: #dc143c;">os</span>.<span style="color: black;">mkdir</span><span style="color: black;">&#40;</span>dirname<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Nanako: mkdir &quot;</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>dirname<span style="color: black;">&#41;</span>
<span style="color: #808080; font-style: italic;">#start progress</span>
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Nanako: Ready to copy &quot;</span> + <span style="color: #66cc66;">`</span>copies<span style="color: #66cc66;">`</span> + <span style="color: #483d8b;">&quot; files.&quot;</span>
        <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span>copies<span style="color: black;">&#41;</span>:
                new_file_name = file_name + <span style="color: #66cc66;">`</span>i<span style="color: #66cc66;">`</span>
                dest_file_path = dirname + <span style="color: #483d8b;">&quot;/&quot;</span> + new_file_name
                <span style="color: #dc143c;">shutil</span>.<span style="color: black;">copyfile</span> <span style="color: black;">&#40;</span>source_file_path, dest_file_path<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Nanako: Done copying &quot;</span> + <span style="color: #66cc66;">`</span>copies<span style="color: #66cc66;">`</span> + <span style="color: #483d8b;">&quot; files.&quot;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Nanako: Preparing to cleanup &quot;</span> + dest
&nbsp;
<span style="color: #808080; font-style: italic;">#this line is to remove the files &amp; directories created</span>
<span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span>dest<span style="color: black;">&#41;</span>:
   <span style="color: #dc143c;">shutil</span>.<span style="color: black;">rmtree</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>dest,x<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#just in case you want to see is there any left over in the destination</span>
<span style="color: #ff7700;font-weight:bold;">def</span> listdir_fullpath<span style="color: black;">&#40;</span>d<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>d, f<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> f <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">listdir</span><span style="color: black;">&#40;</span>d<span style="color: black;">&#41;</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> listdir_fullpath<span style="color: black;">&#40;</span>dest<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> i</pre></td></tr></table></div>

<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2011/06/python-script-for-simple-write-and-delete-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ndmpcopy duration</title>
		<link>http://www.thinkway.info/2010/12/ndmpcopy-duration/</link>
		<comments>http://www.thinkway.info/2010/12/ndmpcopy-duration/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 10:36:35 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[NetApp]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=69</guid>
		<description><![CDATA[I have to migrate a volume from filerA to filerB , instead of using snapmirror, i will give ndmpcopy a chance. Like snapmirror it is a block level transfer(lot faster than rsync). The benefit for this would be the single file/directory that we are able to move. snapmirror transfer entire volume while ndmpcopy, we can copy a single directory within a volume, and yet still using block level. Below is just the example output i have for references: I am &#8230; <a href="http://www.thinkway.info/2010/12/ndmpcopy-duration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have to migrate a volume from filerA to filerB , instead of using snapmirror, i will give ndmpcopy a chance.<br />
Like snapmirror it is a block level transfer(lot faster than rsync). The benefit for this would be the single file/directory that we are able to move. snapmirror transfer entire volume while ndmpcopy, we can copy a single directory within a volume, and yet still using block level.</p>
<p>Below is just the example output i have for references:<br />
I am copying from a FAS3170 to FAS960<br />
Directory size: 1.5TB<br />
<span style="font-family: mceinline;"> ~45MBps!!!!</span><br />
Time taken: 9 hours 15 minute<br />
Ndmpcopy: filerA: Log: DUMP: dumping (Pass V) [ACLs]<br />
Ndmpcopy: filerA: Log: DUMP: 1563223738 KB<br />
Ndmpcopy: filerB: Log: RESTORE: RESTORE IS DONE<br />
Ndmpcopy: filerB: Log: RESTORE: The destination path is /vol/vol_restore/re                                                                             store/<br />
Ndmpcopy: filerB: Notify: restore successful<br />
Ndmpcopy: filerA: Log: DUMP: DUMP IS DONE<br />
Ndmpcopy: filerA: Log: DUMP: Deleting &#8220;/vol/fc_loan/../snapshot_for_                                                                          backup.195&#8243; snapshot.<br />
Ndmpcopy: filerA: Notify: dump successful<br />
Ndmpcopy: Transfer successful [ 9 hours 15 minutes 47 seconds ]<br />
Ndmpcopy: Done</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2010/12/ndmpcopy-duration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What to do with old small capacity pendrive/thumbdrive &#8211; part 1</title>
		<link>http://www.thinkway.info/2010/05/what-to-do-with-old-small-capacity-pendrivethumbdrive-part-1/</link>
		<comments>http://www.thinkway.info/2010/05/what-to-do-with-old-small-capacity-pendrivethumbdrive-part-1/#comments</comments>
		<pubDate>Wed, 05 May 2010 06:12:03 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[A-la-carte]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[old pendrive]]></category>
		<category><![CDATA[pendrive backup]]></category>
		<category><![CDATA[what to do]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=61</guid>
		<description><![CDATA[Every time when there  is new pendrive/thumbdrive with larger released in the market, you will buy it for your mp3, movie, porn, iso&#8230;..junk files.  It is fun to have small little tiny things with more capacity. End up you will have bunch of pendrive laying around your offices. I love to reuse the old devices for other purposes. I have few suggestion on for the old pendrive: Load Linux into pendrive and apply it as rescue disk. Suggest Backtrack 3 &#8230; <a href="http://www.thinkway.info/2010/05/what-to-do-with-old-small-capacity-pendrivethumbdrive-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_62" class="wp-caption aligncenter" style="width: 397px"><img class="size-full wp-image-62 " title="Pendrive" src="http://www.thinkway.info/log/wp-content/uploads/2010/05/usb.jpg" alt="We are old and small , but still useful!!" width="387" height="259" /><p class="wp-caption-text">We are old and small , but still useful!!</p></div>
<p>Every time when there  is new pendrive/thumbdrive with larger released in the market, you will buy it for your mp3, movie,<span style="text-decoration: line-through;"> porn</span>, iso&#8230;..junk files.  It is fun to have small little tiny things with more capacity. End up you will have bunch of pendrive laying around your offices.</p>
<p>I love to reuse the old devices for other purposes. I have few suggestion on for the old pendrive:</p>
<ol>
<li> Load Linux into pendrive and apply it as rescue disk. Suggest Backtrack 3 on a 1GB pendrive.</li>
<li>Backup device for your Linux and Windows PC</li>
</ol>
<p>For point number 1 , i have my 1GB pendrive loaded with backtrack3 and Fedora. Backtrack3 is very useful when you need to :</p>
<ul>
<li>Reset windows local administrator password</li>
<li>Check volume group data in Live CD mode</li>
<li>Copy data from a dead OS(both windows and Linux)</li>
<li>many more&#8230;&#8230;</li>
</ul>
<p><br />
Point number 2 is my favorite part. I have 512GB mounted to my PC as my permanent backup device for my critical documents. You will need:</p>
<p>1.Cygwin installed with rsync</p>
<p>-Cygwin is a powerful opensource developed to simulate *nix environment. You are able to use *nix command in windows and it is powerful.</p>
<p>-rsync is a simple yet powerful script widely used in *nix for sync process.  Please read http://en.wikipedia.org/wiki/Rsync for more info.</p>
<p>2. Simple script(bak.bat) to trigger for backup with Scheduler.</p>
<p><strong>bak.bat content </strong></p>
<p><strong></strong></p>
<div id="attachment_64" class="wp-caption aligncenter" style="width: 645px"><strong><strong><img class="size-full wp-image-64" title="Scheduled Task" src="http://www.thinkway.info/log/wp-content/uploads/2010/05/screenhunter_01-may-05-1401.gif" alt="Scheduled Task in Windows XP" width="635" height="675" /></strong></strong><p class="wp-caption-text">Scheduled Task in Windows XP</p></div>
<p><strong></strong></p>
<p style="padding-left: 30px;"><em>@ECHO OFF<br />
rsync -avz &#8211;delete /cygdrive/c/&#8217;Documents and Settings&#8217;/tiwlim/&#8217;My Documents&#8217;/NCS /cygdrive/x<br />
touch /cygdrive/x/done.flag</em></p>
<p><span style="text-decoration: underline;">Line 1</span></p>
<p style="padding-left: 30px;"><em>rsync -avz &#8211;delete /cygdrive/c/&#8217;Documents and Settings&#8217;/tiwlim/&#8217;My  Documents&#8217;/NCS /cygdrive/x</em></p>
<p style="padding-left: 30px;">-avz means copy everything from source (including the permission and display the output).</p>
<p style="padding-left: 30px;">&#8211;delete means compare source and destination, the destination must have whatever source is having. EG: if destination has b.txt and source does not has b.txt , b.txt will be deleted in destination.</p>
<p style="padding-left: 30px;">/cygdrive/c/ is the c drive.</p>
<p style="padding-left: 30px;">/cygdrive/x is my pendrive mounted to &#8220;My Computer&#8221; as X drive.</p>
<p><span style="text-decoration: underline;">Line 2</span></p>
<p style="padding-left: 30px;"><em>touch /cygdrive/x/done.flag </em></p>
<p style="padding-left: 30px;">create a done.flag once the rsync is completed.This is to let you know when is the last update.</p>
<p>Most of the time, the document did not consume much space. I have only 512MB pendrive mounted as my backup devices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2010/05/what-to-do-with-old-small-capacity-pendrivethumbdrive-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>fsck in SunOS 5.1 i386 processor</title>
		<link>http://www.thinkway.info/2010/04/fsck-in-sunos-51-i386-processor/</link>
		<comments>http://www.thinkway.info/2010/04/fsck-in-sunos-51-i386-processor/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 01:50:20 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[etc]]></category>
		<category><![CDATA[fsck in sun]]></category>
		<category><![CDATA[i386]]></category>
		<category><![CDATA[sunos]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=56</guid>
		<description><![CDATA[Yesterday was not a good day, gnome-session was dead in my Linux core machine causes some failure to my apps. My perforce proxy server is upside down,  seems like the hardware is dying soon. As usual, unless the server has death certification, else we will continue to squeeze it&#8230;. Trying to google around for SUN OS single mode (without cd) boot up so i can run fsck on root volume. This is the finding i have for SunOS 5.1 i386 &#8230; <a href="http://www.thinkway.info/2010/04/fsck-in-sunos-51-i386-processor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday was not a good day, gnome-session was dead in my Linux core machine causes some failure to my apps. My perforce proxy server is upside down,  seems like the hardware is dying soon. As usual, unless the server has death certification, else we will continue to squeeze it&#8230;.</p>
<p>Trying to google around for SUN OS single mode (without cd) boot up so i can run fsck on root volume. This is the finding i have for SunOS 5.1 i386 after combining all article read.</p>
<p><span style="text-decoration: underline;"><strong>Run fsck in SunOS 5.1</strong></span><br />
<br />
1. Boot into single mode</p>
<blockquote><p>reboot &#8212; -m milestone=&#8221;none&#8221;</p></blockquote>
<p>2. run</p>
<blockquote><p>fsck -F ufs /dev/rdsk/c0t0d0s0</p></blockquote>
<p>Result:</p>
<blockquote><p>** phase 1 – Check Blocks and Sizes<br />
** phase 2 – Check Pathnames<br />
**  phase 3 – Check Connectivity<br />
** phase 4 – Check Reference Counts<br />
** phase  5 – Check Cylinder Groups</p></blockquote>
<p>I am safe, no bad superblock or sector. However, if you are running into trouble like : corrupted super block</p>
<blockquote><p>newfs -Nv /dev/rdsk/c0t0d0s0</p></blockquote>
<p>to obtain the block number of Superblock backup&#8217;s. Then finally</p>
<blockquote><p>fsck -F ufs -o -b=32 /dev/rdsk/c0t0d0s0</p></blockquote>
<p>*When you created new file system, alternate superblock was created as well, we are using this technique to repair bad superblock.</p>
<p>I will need to use smartd to scan the harddisk in SUN. write this on next post later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2010/04/fsck-in-sunos-51-i386-processor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LVM extend in live mode!</title>
		<link>http://www.thinkway.info/2010/04/lvm-extend-in-live-mode/</link>
		<comments>http://www.thinkway.info/2010/04/lvm-extend-in-live-mode/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 10:27:47 +0000</pubDate>
		<dc:creator>TingWei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[extend volume]]></category>
		<category><![CDATA[logical volume]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[readhat]]></category>
		<category><![CDATA[resize2fs]]></category>

		<guid isPermaLink="false">http://www.thinkway.info/?p=52</guid>
		<description><![CDATA[Q: I have a LVM(logical volume) in my Linux, i need to extend the size without offline the logical volume. A: You will need to ensure you have spaces in volume group. Assuming the VG name is : VolGroup00. [root@linux1 data]# vgdisplay &#8212; Volume group &#8212; VG Name               VolGroup00 System ID Format                lvm2 Metadata Areas        1 Metadata Sequence No  10 VG Access             read/write VG Status             resizable MAX LV                0 Cur LV                8 Open LV               8 Max PV                0 Cur PV                &#8230; <a href="http://www.thinkway.info/2010/04/lvm-extend-in-live-mode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Q: I have a LVM(logical volume) in my Linux, i need to extend the size without offline the logical volume.</p>
<p>A:</p>
<p>You will need to ensure you have spaces in volume group. Assuming the VG name is : VolGroup00.</p>
<blockquote><p><span style="color: #ff6600;">[root@linux1 data]# vgdisplay<br />
&#8212; Volume group &#8212;<br />
VG Name               VolGroup00<br />
System ID<br />
Format                lvm2<br />
Metadata Areas        1<br />
Metadata Sequence No  10<br />
VG Access             read/write<br />
VG Status             resizable<br />
MAX LV                0<br />
Cur LV                8<br />
Open LV               8<br />
Max PV                0<br />
Cur PV                1<br />
Act PV                1<br />
VG Size               1.36 TB<br />
PE Size               32.00 MB<br />
Total PE              44703<br />
Alloc PE / Size       28570 / 872.81 GB<br />
Free  PE / Size       16133 / 524.16 GB<br />
VG UUID               d2vwa2-6JHI-lTXJ-0WHg-iXhv-6COc-h01kf6</span></p></blockquote>
<p>According to &#8220;Free PE/Size&#8221; you have 524.16GB left . Then you are good to proceed with the steps.<br />
<br />
Lets check the current size of the LV you want to resize</p>
<blockquote><p><span style="color: #ff6600;">[root@linux1 data]# df -h .<br />
Filesystem            Size  Used Avail Use% Mounted on<br />
/dev/mapper/VolGroup00-lvdata<br />
296G  191M  281G   1% /data</span></p></blockquote>
<p>Lets start increasing the size!</p>
<blockquote><p><span style="color: #ff6600;">[root@linux1 data]# lvextend -L+20G /dev/VolGroup00/lvdata<br />
Extending logical volume lvdata to 320.00 GB<br />
Logical volume lvdata successfully resized</span></p></blockquote>
<p>Then resize it live!</p>
<blockquote><p><span style="color: #ff6600;">[root@linux1 data]# resize2fs /dev/VolGroup00/lvdata<br />
resize2fs 1.39 (29-May-2006)<br />
Filesystem at /dev/VolGroup00/lvdata is mounted on /data; on-line resizing required<br />
Performing an on-line resize of /dev/VolGroup00/lvdata to 83886080 (4k) blocks.<br />
The filesystem on /dev/VolGroup00/lvdata is now 83886080 blocks long.</span></p></blockquote>
<p>The final output you are looking for <img src='http://www.thinkway.info/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote><p><span style="color: #ff6600;">[root@linux1 data]# df -h .<br />
Filesystem            Size  Used Avail Use% Mounted on<br />
/dev/mapper/VolGroup00-lvdata<br />
315G  195M  299G   1% /data</span></p></blockquote>
<p>Easy right? The original guide in <a title="Redhat LVM" href="http://www.redhat.com/magazine/009jul05/features/lvm2/" target="_blank">Redhat </a>showed &#8220;ext2online&#8221; but i don&#8217;t see it in my /sbin ! Luckily my best friend google told me resize2fs is the new method <img src='http://www.thinkway.info/log/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Redhat you should update your documentation!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkway.info/2010/04/lvm-extend-in-live-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

