15 managing disk - creating filesystem mkfs

[root@svn ~]# cat /proc/partitions 
major minor  #blocks  name

   8        0   31457280 sda
   8        1    1048576 sda1
   8        2   19921920 sda2
   8       16    5242880 sdb
   8       17     102400 sdb1
  11        0    8086528 sr0
 253        0   17821696 dm-0
 253        1    2097152 dm-1


at this point partition created sdb1 is empty, meaning we cannot do anything with it.
to do something with it, we need to create FS on it.

[root@svn ~]# mkfs
mkfs         mkfs.cramfs  mkfs.ext3    mkfs.fat     mkfs.msdos   mkfs.xfs
mkfs.btrfs   mkfs.ext2    mkfs.ext4    mkfs.minix   mkfs.vfat

for working with large file size it makes sense to use large block size (default is 512 byte)

[root@svn ~]# mkfs.xfs --help
mkfs.xfs: invalid option -- '-'
unknown option -- 
Usage: mkfs.xfs
/* blocksize */ [-b log=n|size=num]

/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
   projid32bit=0|1]
/* label */ [-L label (maximum 12 characters)]
[root@svn ~]# 


[root@svn ~]# mkfs.xfs -L myfs /dev/sdb1 
meta-data=/dev/sdb1              isize=512    agcount=4, agsize=6400 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=25600, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=855, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@svn ~]# 

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all