Product SiteDocumentation Site

2.2. Exercises

2.2.1. Exercise 1

  1. Make an XFS filesystem using default options. Note: the -f option is required to force mkfs to overwrite an existing filesystem.
    # mkfs -t xfs -f /dev/sda4
    meta-data=/dev/sda4              isize=256    agcount=16, agsize=461617 blks
             =                       sectsz=512   attr=0
    data     =                       bsize=4096   blocks=7385872, imaxpct=25
             =                       sunit=0      swidth=0 blks, unwritten=1
    naming   =version 2              bsize=4096
    log      =internal log           bsize=4096   blocks=3606, version=1
             =                       sectsz=512   sunit=0 blks
    realtime =none                   extsz=65536  blocks=0, rtextents=0
    
  2. Mount the filesystem:
    # mkdir mnt
    # mount /dev/sda4 /mnt
    # mount
    /dev/sda2 on / type xfs (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    tmpfs on /dev/shm type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
    usbfs on /proc/bus/usb type usbfs (rw)
    /dev/sda4 on /mnt type xfs (rw)
    
  3. Query the filesystem's parameters:
    # xfs_info /mnt
    meta-data=/dev/sda4              isize=256    agcount=16, agsize=461617 blks
             =                       sectsz=512   attr=0
    data     =                       bsize=4096   blocks=7385872, imaxpct=25
             =                       sunit=0      swidth=0 blks, unwritten=1
    naming   =version 2              bsize=4096
    log      =internal               bsize=4096   blocks=3606, version=1
             =                       sectsz=512   sunit=0 blks
    realtime =none                   extsz=65536  blocks=0, rtextents=0
    
  4. Unmount the filesystem:
    # umount /mnt
    
MediaWiki Appliance - Powered by TurnKey Linux