<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2018F%3A_Tutorial_6</id>
	<title>Operating Systems 2018F: Tutorial 6 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2018F%3A_Tutorial_6"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;action=history"/>
	<updated>2026-06-02T22:25:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21911&amp;oldid=prev</id>
		<title>Housedhorse: /* Creating, Mounting, and Unmounting Filesystem */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21911&amp;oldid=prev"/>
		<updated>2018-10-28T19:42:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Creating, Mounting, and Unmounting Filesystem&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:42, 28 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;ls -lai&amp;lt;/tt&amp;gt; (by itself or for a specific directory).  What are the numbers appearing in the left column?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;ls -lai&amp;lt;/tt&amp;gt; (by itself or for a specific directory).  What are the numbers appearing in the left column?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# dd if=/dev/zero of=foo bs=8192 count=32K   What is the logical size of the file?  How much space does it consume on disk? (Hint: Look at the size option to ls.)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Run &lt;/ins&gt;dd if=/dev/zero of=foo bs=8192 count=32K   What is the logical size of the file?  How much space does it consume on disk? (Hint: Look at the size option to ls.)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (If asked, say &amp;quot;yes&amp;quot; to operating on a regular file.)  Does foo consume any more space?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (If asked, say &amp;quot;yes&amp;quot; to operating on a regular file.)  Does foo consume any more space?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;dumpe2fs foo&amp;lt;/tt&amp;gt;.  What does the output of this command mean?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Run &amp;lt;tt&amp;gt;dumpe2fs foo&amp;lt;/tt&amp;gt;.  What does the output of this command mean?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Housedhorse</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21898&amp;oldid=prev</id>
		<title>Soma: /* Tasks */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21898&amp;oldid=prev"/>
		<updated>2018-10-19T16:54:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Tasks&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:54, 19 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l97&quot;&gt;Line 97:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can you access sshfs mounted files as root?  (You can become root by typing &amp;quot;sudo su -&amp;quot;.)  What happens?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can you access sshfs mounted files as root?  (You can become root by typing &amp;quot;sudo su -&amp;quot;.)  What happens?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Look at inode numbers in local and remote filesystems (as reported by ls -i).  How do they compare?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Look at inode numbers in local and remote filesystems (as reported by ls -i).  How do they compare?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# dd a large file to local drive.  Do same thing over sshfs.  Which is faster? (What is a large file in this context?)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# dd a large file to &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;local drive.  Do same thing over sshfs.  Which is faster? (What is a large file in this context?)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can you sshfs to the SCS systems (e.g., access.scs.carleton.ca)?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Can you sshfs to the SCS systems (e.g., access.scs.carleton.ca)?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Setup password-less login to the SCS system (and then undo it).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Setup password-less login to the SCS system (and then undo it).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# How can you use the mount command to unmount a sshfs-mounted filesystem (rather than fusermount)?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# How can you use the mount command to unmount a sshfs-mounted filesystem (rather than fusermount)?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;# Look at the questions in Assignment 4.  What experiments can you do to help you answer those questions?&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21897&amp;oldid=prev</id>
		<title>Soma at 16:53, 19 October 2018</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21897&amp;oldid=prev"/>
		<updated>2018-10-19T16:53:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:53, 19 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial you will be playing with filesystems (regular filesystems and sshfs).  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;You much &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;this tutorial you&#039;ll need root access&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial you will be playing with filesystems (regular filesystems and sshfs).  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Please use a VM and make backups, as some &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;these commands could erase all data on your system&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Creating, Mounting, and Unmounting Filesystem==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Creating, Mounting, and Unmounting Filesystem==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21896&amp;oldid=prev</id>
		<title>Soma at 16:52, 19 October 2018</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21896&amp;oldid=prev"/>
		<updated>2018-10-19T16:52:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:52, 19 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial you will be playing with filesystems.  You much of this tutorial you&#039;ll need root access.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In this tutorial you will be playing with filesystems &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(regular filesystems and sshfs)&lt;/ins&gt;.  You much of this tutorial you&#039;ll need root access.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Creating, Mounting, and Unmounting Filesystem==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Creating, Mounting, and Unmounting Filesystem==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21895&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;In this tutorial you will be playing with filesystems.  You much of this tutorial you&#039;ll need root access.  ==Creating, Mounting, and Unmounting Filesystem==  # Run &lt;tt&gt;ls -la...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2018F:_Tutorial_6&amp;diff=21895&amp;oldid=prev"/>
		<updated>2018-10-19T16:51:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In this tutorial you will be playing with filesystems.  You much of this tutorial you&amp;#039;ll need root access.  ==Creating, Mounting, and Unmounting Filesystem==  # Run &amp;lt;tt&amp;gt;ls -la...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In this tutorial you will be playing with filesystems.  You much of this tutorial you&amp;#039;ll need root access.&lt;br /&gt;
&lt;br /&gt;
==Creating, Mounting, and Unmounting Filesystem==&lt;br /&gt;
&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;ls -lai&amp;lt;/tt&amp;gt; (by itself or for a specific directory).  What are the numbers appearing in the left column?&lt;br /&gt;
# dd if=/dev/zero of=foo bs=8192 count=32K   What is the logical size of the file?  How much space does it consume on disk? (Hint: Look at the size option to ls.)&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (If asked, say &amp;quot;yes&amp;quot; to operating on a regular file.)  Does foo consume any more space?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;dumpe2fs foo&amp;lt;/tt&amp;gt;.  What does the output of this command mean?&lt;br /&gt;
# What command do you run to check the filesystem in foo for errors?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;sudo mount foo /mnt&amp;lt;/tt&amp;gt;.  How does this command change what files are accessible?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt;.  What device is mounted on /mnt?  What is this device?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;rsync -a -v /etc /mnt&amp;lt;/tt&amp;gt;.  What does this command do?  Explain the arguments as well.&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;sudo umount /mnt&amp;lt;/tt&amp;gt;.  What files can you still access, and what have gone away?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;dd if=/dev/zero of=foo conv=notrunc count=10 bs=512&amp;lt;/tt&amp;gt;.  How does the &amp;quot;conv=notrunc&amp;quot; change dd&amp;#039;s behavior (versus the command in question 1)?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;sudo mount foo /mnt&amp;lt;/tt&amp;gt;.  What error do you get?&lt;br /&gt;
# What command can you run to make foo mountable again?  What characteristic of the file system enables this command to work?&lt;br /&gt;
# Run the command &amp;lt;tt&amp;gt;truncate -s 1G bar&amp;lt;/tt&amp;gt;.  What is the logical size of bar, and how much space does it consume on disk?  How does this compare with foo?&lt;br /&gt;
# How does the logical size of bar change when you create an ext4 filesystem in it?  What about the space consumed on disk?&lt;br /&gt;
&lt;br /&gt;
==SSH &amp;amp; SSHFS==&lt;br /&gt;
&lt;br /&gt;
Here you will be learning about [http://www.openssh.org ssh (openssh)] and [https://github.com/libfuse/sshfs sshfs], a network filesystem built on [https://github.com/libfuse/libfuse FUSE].&lt;br /&gt;
&lt;br /&gt;
===Setup===&lt;br /&gt;
&lt;br /&gt;
Install the openssh-server and sshfs packages:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install openssh-server sshfs&lt;br /&gt;
&lt;br /&gt;
Create a second user in the virtual machine named &amp;quot;other&amp;quot; (or any other name you wish to use):&lt;br /&gt;
&lt;br /&gt;
 sudo adduser other&lt;br /&gt;
&lt;br /&gt;
(Answer the subsequent prompts however you wish, just remember the password.)&lt;br /&gt;
&lt;br /&gt;
At this point you should be able to log in to the &amp;quot;other&amp;quot; account using ssh:&lt;br /&gt;
&lt;br /&gt;
 ssh other@localhost&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll have to enter your password.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t get a password prompt, password authentication has probably been disabled.  (Password authentication has been disabled on the openstack VMs.)  To enable it, do the following&lt;br /&gt;
&lt;br /&gt;
  sudo nano /etc/ssh/sshd_config    (or vi, or emacs)&lt;br /&gt;
&lt;br /&gt;
In the editor change the line &amp;quot;PasswordAuthentication no&amp;quot; to &amp;quot;PasswordAuthentication yes&amp;quot;.  Then, to restart sshd:&lt;br /&gt;
&lt;br /&gt;
  sudo service sshd restart&lt;br /&gt;
&lt;br /&gt;
Be sure to change it back after you&amp;#039;ve set up public key authentication!&lt;br /&gt;
&lt;br /&gt;
===Remote filesystems using sshfs===&lt;br /&gt;
&lt;br /&gt;
To mount the other user&amp;#039;s files in a directory called &amp;quot;otherfiles&amp;quot;, do the following (as user student, ubuntu, or  your personal account):&lt;br /&gt;
&lt;br /&gt;
 mkdir otherfiles&lt;br /&gt;
 sshfs other@localhost: otherfiles&lt;br /&gt;
&lt;br /&gt;
To unmount the filesystem:&lt;br /&gt;
&lt;br /&gt;
 fusermount -u otherfiles&lt;br /&gt;
&lt;br /&gt;
===Public key authentication and ssh===&lt;br /&gt;
&lt;br /&gt;
Create a public key file for your account (as user student, ubuntu, or your personal account):&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
&lt;br /&gt;
(Accept the default filename and choose at least a simple passphrase.)&lt;br /&gt;
&lt;br /&gt;
You just created a certificate!  (A certificate is just a public key with metadata.)&lt;br /&gt;
&lt;br /&gt;
Copy the key to the other account:&lt;br /&gt;
&lt;br /&gt;
 cat ~/.ssh/id_rsa.pub &amp;gt;&amp;gt; authorized_keys&lt;br /&gt;
 scp authorized_keys other@localhost:.&lt;br /&gt;
 rm authorized_keys&lt;br /&gt;
 ssh other@localhost&lt;br /&gt;
&lt;br /&gt;
 (as user other)&lt;br /&gt;
 mkdir ~/.ssh (if it doesn&amp;#039;t exist already)&lt;br /&gt;
 chmod 700 ~/.ssh  (make it private)&lt;br /&gt;
 mv ~/authorized_keys ~/.ssh&lt;br /&gt;
 chmod 600 ~/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
Now you can log in to user other by typing in the passphrase you used to lock the key you generated.&lt;br /&gt;
&lt;br /&gt;
To avoid entering this passphrase every time, you can give it to the authentication agent (generally, ssh-agent) that was started when you logged in:&lt;br /&gt;
&lt;br /&gt;
  ssh-add&lt;br /&gt;
&lt;br /&gt;
Note I expect the above to be a bit confusing.  Do look around for resources on public key cryptography; however, you may find that playing around with ssh authentication may help you understand things better.  In particular, try using &amp;quot;-v&amp;quot; (verbose) with ssh.&lt;br /&gt;
&lt;br /&gt;
===Tasks===&lt;br /&gt;
&lt;br /&gt;
# Look at the hard link counts of files locally and compare those to the link counts over sshfs.  How do they compare?&lt;br /&gt;
# Can you access sshfs mounted files as root?  (You can become root by typing &amp;quot;sudo su -&amp;quot;.)  What happens?&lt;br /&gt;
# Look at inode numbers in local and remote filesystems (as reported by ls -i).  How do they compare?&lt;br /&gt;
# dd a large file to local drive.  Do same thing over sshfs.  Which is faster? (What is a large file in this context?)&lt;br /&gt;
# Can you sshfs to the SCS systems (e.g., access.scs.carleton.ca)?&lt;br /&gt;
# Setup password-less login to the SCS system (and then undo it).&lt;br /&gt;
# How can you use the mount command to unmount a sshfs-mounted filesystem (rather than fusermount)?&lt;br /&gt;
# Look at the questions in Assignment 4.  What experiments can you do to help you answer those questions?&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>