CT320

CT320: Network and System Administration

Fall 2015

Storage

See this page as a slide show

Chapter 8: Storage

CT 320: Network and System Administration

Colorado State University

Computer Science Department

Original slides from Dr. James Walden at Northern Kentucky University.

Topics

  1. Disk interfaces
  2. Disk components
  3. Performance
  4. Reliability
  5. RAID
  6. Adding a disk
  7. Logical volumes
  8. Filesystems

Disk Interfaces

SCSI

IDE

SATA vs. SCSI

Hard Drive Components

Disk Information: hdparm

    # hdparm -i /dev/hde
    /dev/hde:
     Model=WDC WD1200JB-00CRA1, FwRev=17.07W17, SerialNo=WDWMA8C4533667
     Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
     RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=40
     BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=off
     CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234441648
     IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
     PIO modes: pio0 pio1 pio2 pio3 pio4
     DMA modes: mdma0 mdma1 mdma2
     UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
     AdvancedPM=no WriteCache=enabled
     Drive conforms to: device does not report version:
     * signifies the current active mode

Disk Performance

Latency vs. Throughput

Disk Performance: hdparm

    # hdparm -tT /dev/hde
    /dev/hde:
     Timing cached reads:
     876 MB in 2.00 seconds = 437.41 MB/sec
     Timing buffered disk reads:
     88 MB in 3.08 seconds = 28.60 MB/sec

Reliability

RAID

RAID Levels

Adding a Disk

When don’t you need a filesystem?

    mkswap -v /dev/sdb1

Logical Volumes

LVM

Logical Volume Manager

LVM Components

Mapping Modes

Setting up an LVG and LV

    # pvcreate /dev/hda1
    # pvcreate /dev/hdb1
    vgcreate nku_proj /dev/hda1 /dev/hdb1
Use vgextend to add more PVs later.
    lvcreate -n nku1 --size 100G nku_proj1
    mkfs -v -t ext3 /dev/nku_proj/nku1

Extending a LV

    lvextend -L120G /dev/nku_proj/nku1
    lvextend -L+20G /dev/nku_proj/nku1
    ext2online -v /dev/nku_proj/nku1
    df -h

Swap

    dd if=/dev/zero of=/swapfile bs=1024k count=512
    mkswap /swapfile
    swapon /swapfile
    swapon /dev/sda2
    swapoff /swapfile
    swapoff /dev/sda2
    cat /proc/swaps

Filesystems

    tune2fs -j /dev/sda1

Other Filesystems

Mounting

    # mount /dev/sda1 /mnt
    # df -h /mnt

fstab

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc      /proc          proc    defaults 0 0
    /dev/hdc1 /              ext3    defaults 0 1
    /dev/hdc5 /win           vfat    user,rw  0 0
    /dev/hdc7 none           swap    sw       0 0
    /dev/hdc8 /var           ext3    defaults 0 2
    /dev/hdc9 /home          ext3    defaults 0 2
    /dev/hda  /media/cdrom0  iso9660 ro,user  0 0
    /dev/fd0  /media/floppy0 auto    rw,user  0 0

/etc/fstab first field

The first field of an /etc/fstab can be:

fsck: check + repair fs

Lots of filesystem flavors

# cd /sbin

# ls mkfs*
mkfs         mkfs.ext2       mkfs.ext4dev  mkfs.minix     mkfs.reiserfs
mkfs.btrfs   mkfs.ext3       mkfs.fat      mkfs.msdos     mkfs.vfat
mkfs.cramfs  mkfs.ext4       mkfs.hfsplus  mkfs.ntfs      mkfs.xfs

# ls fsck*
fsck         fsck.ext3       fsck.fat      fsck.minix     fsck.reiserfs
fsck.btrfs   fsck.ext4       fsck.hfs      fsck.msdos     fsck.vfat
fsck.cramfs  fsck.ext4dev    fsck.hfsplus  fsck.ntfs      fsck.xfs
fsck.ext2

# ls mount*
mount.cifs   mount.glusterfs mount.nfs     mount.ntfs     mount.ntfs-fuse
mount.fuse   mount.lowntfs-3 mount.nfs4    mount.ntfs-3g  mountstats

References

Modified: 2015-09-27T12:30

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building