Sample menu:

FAQs will be posted here. Keep checking this page.

LAB-2

 

Cache, dedup and compression flag

Since segments are only generated when dedup is enabled, hence it is safe to assume that caching will only be enabled when dedup and compression is enabled.

 

Question: VirtualBox does not give me an option to configure 64-bit VM. What's wrong?

Running 64-bit VMs in Virtualbox requires hardware virtualization support. Most recent (< 4 years) CPUs do support hardware-virtualization. However, this feature might be turned off. That is the reason why Virtualbox will not allow you to configure 64-bit VMs.
The method to enable this support is vendor specific. There are many online articles and forum posts that describe how to enable hardware virtualizion. Once enabled, you will be able to configure 64-bit VMs.

 

Autolab submissions limit for Lab 2 Part 3

Since part 3 has the flavor of a competition rather than being mostly about correctness, we have decided to enforce a limit on the number of Autolab submissions.
Starting April 26, 2014 you are allowed 25 submissions to Autolab. Any submission beyond that will cost you 0.5 points per submission. Any submissions before April 26 will not count towards this limit.

 

Question: Rabin code generates one segment so that the entire file size thus generated is one byte short

Answer: run "make clean" and "make" inside dedup-lib directory and then copy libdedup.a to lib directory.

 

Question: What is dedup index persistency? Why don't I see it in my local test scripts?

Answer: Dedup index refers to the indexing data structures used to identify duplicate segments. When cloudfs crashes and restarts, it needs to rebuild the index so that it can still identify duplication of segments that are already stored.

You should not assume your code is correct, even if you have passed all local tests. Any set of tests is incomplete. We will run some tests in Autolab that are not released in the handout. We hope this will get you thinking beyond trial and error fixes for exactly the tests handed out.

 

Question: Hash Header file

Answer: In order to maintain hashes in cloudfs, uthash.h can be used. Please find this file here (uthash)

For usage refer to : http://troydhanson.github.io/uthash
Students are allowed to use only uthash.h from this link.

1) One student asked and was granted permission to use this file. Others can do the same.
2) 746-staff does not know if this code is correct and will not be debugging it. If there are bugs in this code, you will not get extra time or help debugging it.
3) It is certainly possible that using this code ends up costing you more time than it saves.

Decision to use this file is entirely the responsibility of the student.

 

Question: Autolab debugging

Answer: Autolab provides methods to log operations. This can be done by logging to ./cloudfs.log.

On the local machine this can be done by
logfile = fopen("/tmp/temp_log", "w");
setvbuf(logfile, NULL, _IOLBF, 0); /* To ensure that a log of content is not buffered */
int fuse_stat = fuse_main(argc, argv, &cloudfs_operations, NULL);
and then printing logs to logfile.

On Autolab the file name needs to be cloudfs.log. Corresponding commands will be :

logfile = fopen("./cloudfs.log", "w");
setvbuf(logfile, NULL, _IOLBF, 0); /* To ensure that a log of content is not buffered */
int fuse_stat = fuse_main(argc, argv, &cloudfs_operations, NULL);


Do use this to debug your code. Please not that there is a limit on the number of log lines we can print on Autolab, so be conservative about logging. Also, please note the placement of fopen is before fuse_main().

 

Question: My code passes all tests locally, but fails on Autolab. What could possibly be wrong?

Answer: Here is a list of possible solutions (non-exhasutive) for the things that can go wrong:

 

Question: setxattr fails with error code 95 / ENOSUPP

Answer: ssd drive is not mounted with user_xattr enabled. Use mount.sh in the scripts folder to mount the ssd drive.
Also make sure that the name of your extended attribute starts with user.

 

Question: make cloud-example fails

Answer: cloud-example.c includes cloudfs.h which is at cloudfs/cloudfs.h.
To solve this change line number 17 in cloud-lib/cloud-example.c from
#include "cloudfs.h" to #include <../cloudfs/cloudfs.h> and then make cloud-example again.

LAB-1

Question: Why is the partition table I see for the disk image different from that stated in the handout?

Answer: The partition table listed in the handout does not include an entry for the second extended partition contained in the disk image. An extended partition looks like a linked list. In each extended boot record (EBR), its first entry describes an information about a current partition and the second entry describes a way to find the next extended partition if available.

Complete partition table for the provided disk image is:

Partition # Type Start Length
1 0x83 (ext2) 63 48132
2 0x0 (unused) 0 0
3 0x83 (ext2) 48195 48195
4 0x5 (extended) 96390 64260
5 0x82 (swap) 96453 16002
- 0x5 (extended) 112455 48195
6 0x83 (ext2) 112518 48132

 

Question: What scheme is followed in assigning numbers to partitions?

Answer: Partition numbers are assigned as follows - All primary partitions in the master boot record are numbered 1 through 4 (irrespective of whether it is an empty or an extended partition). Next, all logical partitions are numbered starting from 5. All non-primary extended partitions are excluded.

 

Question: Where can I find more information about MBR, EBR, and EXT2?

Answer: We recommend looking at the following pages: http://en.wikipedia.org/wiki/Master_boot_record, http://en.wikipedia.org/wiki/Extended_boot_record, http://www.nongnu.org/ext2-doc/ext2.html.

 

Question: How can I mount the disk image as a normal partition under Linux?

Answer:

If you want to use the provided disk image for debugging, you can mount a specific partition under Linux -

1. Extract target partition from the disk image: Using your part I output, you cna find the starting sector of a particular partition and the number of sectors it has. You can then extract this partition using the 'dd' command:

dd if=/path/to/disk/image of=hda.img bs=512 skip=[starting sector] count=[#sectors]

2. Mount the extracted image in a directory (e.g. /mnt/test/)

mount -o loop hda.img /mnt/test/

You can now access /mnt/test as a normal partition in Linux.

 

Question: Why isn't there a valid superblock in every block group?

Answer: The ext2 partitions in the disk image use sparse superblocks. Valid superblocks only exist in block groups 0, 1, and groups corresponding to powers of 3, 5, and 7.

 

Question: There are many edge cases to deal with when adding an entry to a directory. Do I have to deal with all of them?

Answer: No, you don't have to deal with them. You can assume that the entry you wish to insert will fit in the first direct block allocated to the directory.

 

Question: Is it okay for a phase of FSCK to break some filesystem consistency requirement as long as a latter phase of FSCK re-establishes the requirement?

Answer: Yes. Keep this option in mind, as it will make implementing certain phases of FSCK easier. You might also end up in situations where it is easier to implement some latter phase of FSCK in a manner that breaks the consistency established by some previous phase. In such scenarios, you can run FSCK phases out of order, or to re-run FSCK phases as necessary. We don't recommend running phases out of order, or re-running, but we don't have a policy against it either.

 

Question: Is it possible to have any directories without the '.' and '..' entries?

Answer: This might be possible. Especially, there is one directory that will not contain the '..' entry.