• Save
File Systems
Upcoming SlideShare
Loading in...5
×
 

File Systems

on

  • 6,330 views

 

Statistics

Views

Total Views
6,330
Views on SlideShare
2,695
Embed Views
3,635

Actions

Likes
3
Downloads
0
Comments
0

10 Embeds 3,635

http://sysplay.in 2111
http://profession.sarika-pugs.com 1236
http://www.userspace.org 242
http://www.linkedin.com 23
http://localhost 8
https://www.linkedin.com 6
url_unknown 4
http://www.sysplay.in 3
http://www.slideshare.net 1
http://128.199.163.140 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    File Systems File Systems Presentation Transcript

    • File Systems© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
    • What to Expect?Ws of File SystemDissecting the Root File SystemMixing the various File Systems © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
    • What is a File System?Place to store Data in form of Files © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
    • File System in the 3 SpacesThree things at three levels Hardware Space – The Physical Organization of Data on the Storage Devices Kernel Space – Drivers to decode & access the data from the Physical Organization User Space – All what you see from / - The User View © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
    • Do we need one in ES?Lets observe the Desktop EnvironmentWhere & Which are the File Systemsthere? Where: Hard Disk, CDROM, Pen Drive, … Which: FAT, FAT32, NTFS, iso9600, ext3, …What are they for? For (Operating) Systems Data For your Data © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
    • So, do we need FS in ES?Answer is in the following two Questions Do we need to have a Operating System running on it? Do we need to store our data on it?First one is definitely yesSecond is requirement basedBut the needs & the storage medium for the twocould be differentAnd accordingly, we have a wide variety of FileSystems to choose fromLets understand © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
    • FS for Operating SystemAlso referred as the Root File System (RFS)A Minimal RFS should contain the following Binaries (/bin, /sbin) Libraries (/lib) Devices (/dev) Configurations (/etc) Virtual File Systems (/proc, /sys) Application Temporary File (/tmp) Variable Data from Daemons & Utilities (/var) User Data (/root, /home) – optional Mount points (/mnt, /media) – optional Additional software (/usr, /opt) - optional Bootloader files (/boot) – optional © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
    • Building a Root File SystemInvolves Creating & Populating the complete directory structure, appropriately Putting that in the desired FS type Either on the host & then transferring it to the target, or directly on the targetVarious sources Binaries – Application Sets (busybox, ...) Libraries – Toolchain Libraries (glibc, uClibc, …) Devices – Create by Hand, Or Device package Virtual & Temporary Files – Create by Hand Configuration & Variable – Created as requiredMany a times, a more easier way is Start with a reference RFS Add-on whatever needed © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
    • Choosing RFS Types initramfs – For initial board bringup cycles nfs – For initial development squashfs – For read only storage jffs2 – For flash-based storage ext* - For large size storage …Please note that, we cant use any of fat, vfat, ntfs, … As they do not support device & special files on them ext3 supports 7 different types of files © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
    • HOWTO of a Read Only FSMost of the Embedded System FS are Created on the Host, as images And then transferred to the TargetLets take an Example: squashfsCreating (on Host) mksquashfs [options] <rfs_dir> <img_file>Transferring (on Target) dd if=<img_file> of=<part_for_fs> © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.
    • Creating initramfsDone during Kernel BuildingBefore building the Kernel, configure thefollowing Under “General setup” Enable “Initial RAM filesystem … support” Set the “Initramfs source file(s)” to the RFS dir © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 11 All Rights Reserved.
    • Root File System over NFSEnable NFS mount of the RFS directory on thehostUpdate the Targets Kernel image with Root over NFS feature enabledOn the target, add the following to thebootargs, before booting root=/dev/nfs nfsroot=<host_ip>:<rfs_dir_on_host> Argument for assigning an IP addressBoot the target to use the RFS over NFS © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 12 All Rights Reserved.
    • What about swap partition?Purposes of swap partition (on Desktop) Process Swapping in case Memory is less HibernationEmbedded Systems Has less Memory. So, if there is swap, it would be used frequently. But where? Flash??? What about its write cycles, write levelling? Typically, no Hibernation neededHence, no swap on Embedded Systems © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 13 All Rights Reserved.
    • Other File Systems/ → Root File System → One particular FSHowever, subdirectories under / could be On other Partitions, Or Even other File SystemsExamples: / → initramfs; /home → jffs2 / → squashfs; /var & /tmp → tmpfs / → jffs2; /home → ext2 or fat © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 14 All Rights Reserved.
    • Feature-specific File SystemsJournalizing FS: ext2 vs ext3Read-only FS vs Mounting Read-onlyCompressed FS: cramfs, squashfsFlash-Specific FS: jffs2Temporary Storage: ramfs, tmpfs, ... © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 15 All Rights Reserved.
    • What all have we learnt?Ws of File SystemDissecting the Root File System Building an RFS Choosing FS Type for RFS Creating the various FS typesMixing the various File Systems © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 16 All Rights Reserved.
    • Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 17 All Rights Reserved.