Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 191 - Lesson 2 Storage Devices. CIS 191 - Lesson 2 Floppy drive and diskettes Hard drive (IDE and SCSI) USB flash drive (aka pen drive) Storage Devices.

Similar presentations


Presentation on theme: "CIS 191 - Lesson 2 Storage Devices. CIS 191 - Lesson 2 Floppy drive and diskettes Hard drive (IDE and SCSI) USB flash drive (aka pen drive) Storage Devices."— Presentation transcript:

1 CIS Lesson 2 Storage Devices

2 CIS Lesson 2 Floppy drive and diskettes Hard drive (IDE and SCSI) USB flash drive (aka pen drive) Storage Devices

3 CIS Lesson 2 DAS – Direct Attached Storage NAS – Network Attached Storage SAN – Storage Area Networks Storage Devices

4 CIS Lesson 2 IDE drives: Primary master (/dev/hda) Primary slave (/dev/hdb) Secondary master (/dev/hca) Secondary slave (/dev/hdd) SCSI drives: Each SCSI disk has a target id (1-7) or (1- 14). (/dev/sda, /dev/sdb,...) Recognizing and specifying storage devices

5 CIS Lesson 2 USB Flash (pen) drives: Same device naming as SCSI drives (can use dmesg to distinguish) Floppies: First drive (/dev/fd0) Second drive (/dev/fd1) … Recognizing and specifying storage devices

6 CIS Lesson 2 Recognizing Storage Devices

7 CIS Lesson 2 Master IDE drive on primary One IDE drive Recognizing and specifying storage devices

8 CIS Lesson 2 Master IDE drive on Secondary Two IDE drives Recognizing and specifying storage devices Master IDE drive on primary

9 CIS Lesson 2 USB flash (pen) drive IDE hard drive Floppy drive Recognizing and specifying storage devices

10 CIS Lesson 2 SCSI hard drive USB flash drive SCSI and USB Flash (pen) drive Recognizing and specifying storage devices

11 CIS Lesson 2 dmesg command output Plugging in USB flash drive starts here Device identification (/dev/sdb) shows here and log ends here

12 CIS Lesson 2 Geometry

13 14 tracks 8 sectors per track CIS Lesson 2 Example Physical CHS Disk Drive Geometry One sector One track 3 platters 6 heads 14 cylinders One imaginary cylinder One head on each side of platter size = cylinders x heads x sectors per track x 512 bytes size = 14 x 6 x 8 x 512 = 344,064 bytes

14 CIS Lesson 2 Disk Drive Geometry Times have changed! Disk drives are no longer limited to 1024 cylinders (old BIOS restriction) Modern track density has hit over tens of thousands of tracks per inch (the old 3.5diskette had 80 per side) Zone bit recording places more sectors per track on outside tracks. E.g. A IBM 34.2 GB Deskstar has 272 to 452 sectors per track. NOTE: The OS uses logical disk geometry which does not match physical disk geometry. Modern drives use Logical Block Addressing (LBA) rather than the old CHS addressing.

15 CIS Lesson 2 Disk Drive Geometry physical logical Modern drives have variable number of sectors per track. It is not possible to represent their full capacity using the old CHS method. The BIOS shows 16 logical heads and 63 logical sectors per track and adjust the number of logical cylinders to approximate the full capacity. The OS fdisk shows 255 logical heads and 63 logical sectors per track and then adjusts logical cylinders accordingly. Disk /dev/hda: 5368 MB, bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of * 512 = bytes

16 CIS Lesson 2 Disk sizes (fdisk command) 5GB VMWare Drive 5 x 1024 x 1024 x 1024 = 5,368,709,120 bytes 255 heads x 63 sectors/track x 652 cylinders x 512 bytes = 5,362,882,560 bytes NOTE This is logical (not physical) disk geometry Cylinders Blocks (1 block = 1024 bytes)

17 CIS Lesson 2 Disk sizes (df command) 3,5266,204 x 1000 x (1000/1024) = 3,443,558,594 bytes = 3.4 GB 101,107 x 1000 x (1000/1024) = 98,737,304 bytes = 99 MB NOTE: 1 computer KB = 1,024 bytes (2 to the 10 th power) 1 human KB = 1,000 bytes

18 CIS Lesson 2 Disk Partitions

19 CIS Lesson 2 Free Space Setting up Hard Drives Step 1 – Add hard drive to computer Add the hard drive: Low-level formatting has already been done at the factory (lays out the physical tracks and sectors). There are no partitions yet. There are no file systems yet. Note: Floppies, unlike hard drives, can be low-level formatted with the fdformat command

20 CIS Lesson 2 Partition Boot Sector Data Master Boot Record (MBR) Free Space Setting up Hard Drives Step 2 - Partition the hard drive Partition Boot Sector Data Partition the hard drive: The MBR is on the very first sector and is 512 bytes long. The first 446 bytes of the MBR gets system boot code. The next 64 bytes of the MBR gets the partition table. The last 2 bytes are marked 0xAA55.

21 CIS Lesson 2 Partition Boot Sector Data Master Boot Record (MBR) Free Space Setting up Hard Drives Step 2 - Partition the hard drive Partition Boot Sector Data Primary partition Primary partition The MBR partition table records the location, status and type of each primary partition. Each added partition has its own boot sector at the beginning.

22 CIS Lesson 2 Setting up Hard Drives Step 2 - Partition the hard drive Partition Boot Sector Data Master Boot Record (MBR) Partition Boot Sector Data Partition Boot Sector Data Partition Boot Sector Data Primary partition Primary partition Primary partition Primary partition The maximum number of primary partitions is four.

23 CIS Lesson 2 Partition Boot Sector Data Master Boot Record (MBR) Partition Boot Sector Data Partition Boot Sector Data Partition Boot Sector Data Primary partition Primary partition Primary partition Extended partition One of the four primary partitions can be an extended partition An extended may contain an arbitrary number of logical partitions Unused Boot Sector Data Unused Boot Sector Logical partition Logical partition Setting up Hard Drives Step 2 - Partition the hard drive

24 CIS Lesson 2 Partition Boot Sector Data Master Boot Record (MBR) Partition Boot Sector Data Partition Boot Sector Data Partition Boot Sector Data Unused Boot Sector Data Unused Boot Sector Setting up Hard Drives Step 3 – Add file systems to partitions Superblock Inode Table ext2 file system Data Blocks

25 CIS Lesson 2 fdisk and mount Show current partitions and their usage Partition Boot Sector /boot Master Boot Record (MBR) Partition Boot Sector / swap Partition Boot Sector /home Unused Boot Sector Free Space /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5

26 CIS Lesson 2 Specifying partitions Partitions are labeled by Linux as the drive name following by a number. The numbers 1-4 are reserved for the first four primary partitions. 5 or higher indicates it is a logical partition. Examples: /dev/hda1 = first partition (primary) on the primary master IDE drive. /dev/sdb3 = third partition (primary) on the second SCSI drive. /dev/sda5 = fifth partition (logical partition) on the first SCSI drive.

27 CIS 191 – Lesson 2 root]# fdisk -l Disk /dev/sda: 5368 MB, bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of * 512 = bytes Device Boot Start End Blocks Id System /dev/sda1 * Linux /dev/sda Linux /dev/sda Linux swap /dev/sda Extended /dev/sda Linux /dev/sda Linux Disk /dev/sdb: 2147 MB, bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of * 512 = bytes Disk /dev/sdb doesn't contain a valid partition table root]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): Specifying partitions Add 1 primary and 1 extended to new drive /dev/sda has been partitioned already. /dev/sdb has not been partitioned yet.

28 CIS 191 – Lesson 2 Command (m for help): n Command action e extended p primary partition (1-4) e Partition number (1-4): 1 First cylinder (1-261, default 1): 1 Last cylinder or +size or +sizeM or +sizeK (1-261, default 261): 50 Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1-50, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-50, default 50): 10 Command (m for help): p Disk /dev/sdb: 2147 MB, bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of * 512 = bytes Device Boot Start End Blocks Id System /dev/sdb Extended /dev/sdb Linux Command (m for help): MBR Boot Sector Unused Free /dev/sdb1 /dev/sdb5 Specifying partitions Add 1 primary and 1 extended to new drive Note: The second partition added is number 5 because it is in an extended partition. Numbers 1-4 are reserved for the four primary partitions.

29 CIS Lesson 2 fdisk Partition Utility – (n)ew and (p)rint root]# fdisk /dev/sda Command (m for help): n First cylinder ( , default 493): Using default value 493 Last cylinder or +size or +sizeM or +sizeK ( , default 652): +100M Command (m for help): p Disk /dev/sda: 5368 MB, bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of * 512 = bytes Device Boot Start End Blocks Id System /dev/sda1 * Linux /dev/sda Linux /dev/sda Linux swap /dev/sda Extended /dev/sda Linux /dev/sda Linux Command (m for help): Boot Sector /boot MBR Boot Sector / swap Boot Sector /home Unused Free Space Unused /dev/sda5 /dev/sda6 /dev/sda2 /dev/sda3 /dev/sda1 /dev/sda4

30 CIS Lesson 2 fdisk Partition Utility – (m)enu of commands Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): Boot Sector /boot MBR Boot Sector / swap Boot Sector /home Unused Free Space Unused /dev/sda5 /dev/sda6 /dev/sda2 /dev/sda3 /dev/sda1 /dev/sda4

31 CIS Lesson 2 fdisk Partition Utility – (w)rite out partition table Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. root]# partprobe Boot Sector /boot MBR Boot Sector / swap Boot Sector /home Unused Free Space Unused /dev/sda5 /dev/sda6 /dev/sda2 /dev/sda3 /dev/sda1 /dev/sda4 Use partprobe to update the kernel without rebooting. This is required if you want to mount a new partition.

32 CIS Lesson 2 fdisk Partition Utility – the l option root]# fdisk -l Disk /dev/sda: 5368 MB, bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of * 512 = bytes Device Boot Start End Blocks Id System /dev/sda1 * Linux /dev/sda Linux /dev/sda Linux swap /dev/sda Extended /dev/sda Linux /dev/sda Linux Boot Sector /boot MBR Boot Sector / swap Boot Sector /home Unused Free Space Unused /dev/sda5 /dev/sda6 /dev/sda2 /dev/sda3 /dev/sda1 /dev/sda4

33 CIS Lesson 2 Making File Systems

34 CIS Lesson 2 root]# fdisk -l Disk /dev/sda: 5368 MB, bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of * 512 = bytes Device Boot Start End Blocks Id System /dev/sda1 * Linux /dev/sda Linux /dev/sda Linux swap /dev/sda Extended /dev/sda Linux /dev/sda Linux Disk /dev/sdb: 2147 MB, bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of * 512 = bytes Disk /dev/sdb doesn't contain a valid partition table root]# echo "Rich was here" > /dev/sdb root]# xxd /dev/sdb | more : a 0000 Rich was here : : root]# /dev/sdb is a newly added un-partitioned drive You can write and read to the drive however it is very clumsy compared to using a file system* dd command (continued) Reading and writing directly to a drive *Never do this to a drive containing important data

35 root]# echo "Rich was here too" > test root]# wc -c test 18 test root]# root]# dd if=test of=/dev/sda6 bs=1 count= records in 18+0 records out root]# dd if=/dev/sda6 bs=1 count=18 Rich was here too 18+0 records in 18+0 records out root]# root]# xxd /dev/sda6 | more : f Rich was here to : 6f0a o : root]# dd if=/dev/zero of=/dev/sda6 bs=1 count= records in 18+0 records out root]# xxd /dev/sda6 | more : : CIS Lesson 2 /dev/sdb6 is a newly added, un-mounted partition on /dev/sda /dev/zero has an unlimited numbers of binary zeros. Can be used to zero out a partition or drive.* dd command (continued) Reading and writing directly to a partition We can also write and read directly to the partition.* *Never do this to a partition containing important data

36 CIS Lesson 2 Adding File Systems Analogy: making a file system on an empty partition is like painting the stripes on a parking lot. It organizes the space and makes it efficient. ext2 file system

37 CIS Lesson 2 Adding File Systems Superblock Inode Table mkfs –t ext2 /dev/sda6 Data Blocks Boot Sector /boot MBR Boot Sector / swap Boot Sector /home Unused Free Space Unused /dev/sda5 /dev/sda6 /dev/sda2 /dev/sda3 /dev/sda1 /dev/sda4

38 CIS Lesson 2 mkfs –t type device -t ext2 –t ext3 (has journaling) -t vfat (compatible with Windows) -t jfs (IBMs journaled file system) -t reiserfs For ext2 or ext3 use: -N option to specify number of inodes -m option to specify % blocks reserved for superuser (default 5%) -L option to set the volume label for the file system Example: mkfs –t ext3 /dev/sda6 (puts ext3 file system on 6 th partition of 1 st SCSI drive) Example: mkfs –t ext2 –m 0 –N 1000 –L myfiles /dev/sda6 (puts ext2 file system with 1000 inodes, no space reserved for superuser, volume label myfiles on 6 th partition of 1 st SCSI drive, ) Note: mkfs is actually a front end for various file systems builders. root]# ls /sbin/mkfs* /sbin/mkfs /sbin/mkfs.ext2 /sbin/mkfs.jfs /sbin/mkfs.reiserfs /sbin/mkfs.cramfs /sbin/mkfs.ext3 /sbin/mkfs.msdos /sbin/mkfs.vfat mkfs command

39 root]# fdisk -l /dev/sda Disk /dev/sda: 999 MB, bytes 4 heads, 8 sectors/track, cylinders Units = cylinders of 32 * 512 = bytes Device Boot Start End Blocks Id System /dev/sda1 * b Win95 FAT32 root]# root]# umount /mnt root]# mount /dev/sda1 /mnt root]# ls -l /mnt total rwxr-xr-x 1 root root Mar 23 23:18 KNOPPIX_V5.1.1CD EN.iso root]# CIS Lesson 2 This pen drive works with Windows or Linux File Systems FAT32 file system

40 CIS Lesson 2 Superblock Inode Table Data Blocks ext2 file system Superblock has: File system type, label, inode count, block count, etc. about entire file system. Redundant copies are maintained. Use: dumpe2fs –h /dev/sda2 to see / superblock info on rh9 VM inodes have: file type, permissions, link count, owner, group, size, major and minor numbers, creation date, modification date, access date, pointers to data blocks. Does not contain filenames which are kept in directories. Use stat command to see inode information Data blocks have actual file and directory data.

41 CIS Lesson 2 Superblock Inode Table ext2 file system Data Blocks ~]$ls -il letter rw-r--r-- 1 simmsben cis Jul letter Hello Mother! Hello Father! Here I am at Camp Granada. Things are very entertaining, and they say we'll have some fun when it stops raining. All the counselors hate the waiters, and the lake has alligators. You remember Leonard Skinner? He got ptomaine poisoning last night after dinner. Now I don't want this to scare you, but my bunk mate has malaria. You remember Jeffrey Hardy? Their about to organize a searching party. Take me home, oh Mother, Father, take me home! I hate Granada. Don't leave me out in the forest where I might get eaten by a bear! Take me home, I promise that I won't make noise, or mess the house with other boys, oh please don't make me stay -- I've been here one whole day. Dearest Father, darling Mother, how's my precious little brother? I will come home if you miss me. I will even let Aunt Bertha hug and kiss me! Wait a minute! It's stopped hailing! Guys are swimming! Guys are sailing! Playing baseball, gee that's better! Mother, Father, kindly disregard this letter. Alan Sherman bigfile bin letter bigfile bin letter simmsben cis Pointer(s) to data blocks inode number Type Number of links User Group Size Modification time Access Time Change time Pointer(s) to data blocks rw-rr-- Permissions

42 CIS Lesson 2 ext2 file system Using dumpe2fs –h to show superblock information root]# dumpe2fs -h /dev/sda2 dumpe2fs 1.32 (09-Nov-2002) Filesystem volume name: / Last mounted on: Filesystem UUID: b552eed8-4c9d-4f8f-9edf-dd76037f82bd Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal filetype needs_recovery sparse_super Default mount options: (none) Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: Block count: Reserved block count: Free blocks: Free inodes: First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: Fragments per group: Inodes per group: Inode blocks per group: 501 Filesystem created: Fri Jul 18 09:37: Last mount time: Fri Jul 18 17:06: Last write time: Fri Jul 18 17:06: Mount count: 3 Maximum mount count: -1 Last checked: Fri Jul 18 09:37: Check interval: 0 ( ) Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Journal UUID: Journal inode: 8 Journal device: 0x0000 First orphan inode: root]# If you leave off the –h option you will also see the data block status as well.

43 CIS Lesson 2 ext2 file system Using stat command to show Inode details root]# ls anaconda-ks.cfg install.log install.log.syslog test testdir root]# ls -l total 36 -rw-r--r-- 1 root root 1220 Jul 18 16:57 anaconda-ks.cfg -rw-r--r-- 1 root root Jul 18 16:51 install.log -rw-r--r-- 1 root root 2895 Jul 18 16:51 install.log.syslog -rw-r--r-- 1 root root 18 Jul 18 17:24 test drwxr-xr-x 2 root root 4096 Jul 20 18:41 testdir root]# stat test testdir File: `test' Size: 18 Blocks: 8 IO Block: 4096 Regular File Device: 802h/2050d Inode: Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: :40: Modify: :24: Change: :24: File: `testdir' Size: 4096 Blocks: 8 IO Block: 4096 Directory Device: 802h/2050d Inode: Links: 2 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: :41: Modify: :41: Change: :41: root]# Note: The name of the file is not kept in the Inode. It is kept as data in a directory file.

44 CIS Lesson 2 ext2 file system lost+found directory root]# mkfs -t ext2 /dev/sda6 mke2fs 1.32 (09-Nov-2002) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) inodes, blocks 5219 blocks (5.00%) reserved for the super user First data block=1 13 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root]# mount /dev/sda6 /mnt root]# ls /mnt lost+found root]# ls -l /mnt total 12 drwx root root Jul 21 08:22 lost+found root]# Note: The lost+found directory is created when you make a ext2 or ext3 file system. This is where the fsck utility will place any recovered data it finds when checking a file system. Dont delete it!

45 CIS Lesson 2 Mounting File Systems

46 CIS Lesson 2 Mounting and Un-mounting file systems mount [device-file] [directory] umount [device-file | directory] Mount information 1./etc/fstab (what to mount at boot time) 2./etc/mtab (current mount status) Mounting File Systems

47 CIS Lesson 2 / /bin /etc /mnt /cdrom On the rh9 VM root]# mount /dev/sda2 on / type ext3 (rw) none on /proc type proc (rw) /dev/sda1 on /boot type ext2 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda5 on /home type ext3 (rw) none on /dev/shm type tmpfs (rw) root]# cat /etc/mtab /dev/sda2 / ext3 rw 0 0 none /proc proc rw 0 0 /dev/sda1 /boot ext2 rw 0 0 none /dev/pts devpts rw,gid=5,mode= /dev/sda5 /home ext3 rw 0 0 none /dev/shm tmpfs rw 0 0 root]# root]# ls -F /home /boot /mnt /boot: boot.b kernel.h module-info chain.b lost+found/ os2_d.b vmlinuz config message grub/ message.ja System.map initrd img vmlinux /home: lost+found/ rsimms/ /mnt: cdrom/ floppy/ hgfs/ root]# /dev /boot /home /rsimms /grub /lost+found /dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6 /floppy /hgfs mount command with no arguments shows current mount status in /etc/mtab Showing current mount status

48 CIS Lesson 2 / /bin /etc /mnt /dir1 On the rh9 VM root]# mkfs -t ext3 /dev/sda6 mke2fs 1.32 (09-Nov-2002) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) inodes, blocks 5219 blocks (5.00%) reserved for the super user First data block=1 13 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root]# mount /dev/sda6 /mnt root]# cd /mnt mnt]# mkdir dir1 dir2 mnt]# ls dir1 dir2 lost+found mnt]# cd root]# ls /mnt dir1 dir2 lost+found root]# umount /mnt root]# ls /mnt cdrom floppy hgfs root]# /dev /boot /home /rsimms /grub /lost+found /fdir2 /lost+found /dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6 mount will overlay the new files ystem on a directory in the current file hierarchy. The old directory is no longer accessible until the new one is un-mounted Making a file system and mounting it

49 /dir1 /fdir2 /lost+found / /bin/etc/mnt /cdrom /dev/boot/home /rsimms /grub /lost+found /floppy /hgfs /lib /dev/sda6 /dev/sda1 /dev/sda5 Mounting File Systems Like pinning the tail on the donkey mount /dev/sda6 /mnt

50 / /bin/etc/mnt /dir1 /dev/boot/home /rsimms /grub /lost+found /dir2 /lost+found /lib /dev/sda1 /dev/sda5 Mounting File Systems Like pinning the tail on the donkey /dev/sda6 mount /dev/sda6 /mnt

51 Mounting File Systems Caveats Dont mount a file system to a directory you are in. You cant un-mount a file system you have cded into: mnt]# umount /mnt umount: /mnt: device is busy mnt]# cd root]# umount /mnt root]#

52 CIS Lesson 2 root]# mount /dev/sda2 on / type ext3 (rw) none on /proc type proc (rw) /dev/sda1 on /boot type ext2 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda5 on /home type ext3 (rw) none on /dev/shm type tmpfs (rw) root]# cat /etc/mtab /dev/sda2 / ext3 rw 0 0 none /proc proc rw 0 0 /dev/sda1 /boot ext2 rw 0 0 none /dev/pts devpts rw,gid=5,mode= /dev/sda5 /home ext3 rw 0 0 none /dev/shm tmpfs rw 0 0 root]# device mount point file system type mount options dump frequency fsck pass Note: spaces added to output above for readability Mounting File Systems mount command and /etc/mtab

53 CIS Lesson 2 root]# cat /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext2 defaults 1 2 none /dev/pts devpts gid=5,mode= LABEL=/home /home ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 device mount point file system type mount options dump frequency fsck pass Note: spacing modified in output above for readability Mounting File Systems /etc/fstab /etc/fstab is used to automatically mount file systems at boot time

54 CIS Lesson 2 root]# cat /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext2 defaults 1 2 none /dev/pts devpts gid=5,mode= LABEL=/home /home ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 device mount point file system type mount options dump frequency fsck pass Note: spacing modified in output above for readability Swap Space /etc/fstab /etc/fstab is used to automatically mount file systems at boot time


Download ppt "CIS 191 - Lesson 2 Storage Devices. CIS 191 - Lesson 2 Floppy drive and diskettes Hard drive (IDE and SCSI) USB flash drive (aka pen drive) Storage Devices."

Similar presentations


Ads by Google