[root@localhost 바탕화면]# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 3월 25 21:43 /dev/sda
brw-rw---- 1 root disk 8, 1 3월 25 21:43 /dev/sda1
brw-rw---- 1 root disk 8, 2 3월 25 21:43 /dev/sda2
brw-rw---- 1 root disk 8, 16 3월 25 21:43 /dev/sdb
Building a new DOS disklabel with disk identifier 0x2569293f.
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
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
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): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): (그냥 엔터)
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151): (그냥 엔터 디폴트값)
Using default value 2097151
Partition 1 of type Linux and of size 1023 MiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 3월 25 21:43 /dev/sda
brw-rw---- 1 root disk 8, 1 3월 25 21:43 /dev/sda1
brw-rw---- 1 root disk 8, 2 3월 25 21:43 /dev/sda2
brw-rw---- 1 root disk 8, 16 3월 25 21:56 /dev/sdb
brw-rw---- 1 root disk 8, 17 3월 25 21:56 /dev/sdb1
[root@localhost ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 261888 blocks
13094 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
[root@localhost ~]# mkdir /mydata
[root@localhost ~]# mount /dev/sdb1 /mydata/
[root@localhost ~]# ls /mydata/
lost+found
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 81797100 4405012 77392088 6% /
devtmpfs 496956 0 496956 0% /dev
tmpfs 505432 140 505292 1% /dev/shm
tmpfs 505432 7072 498360 2% /run
tmpfs 505432 0 505432 0% /sys/fs/cgroup
/dev/sdb1 1014680 2564 943356 1% /mydata
[root@localhost ~]#
//// 복사 테스트
[root@localhost ~]# cp /boot/vmlinuz-3.10.0-123.el7.x86_64 /mydata/data1
[root@localhost ~]# ls -l /mydata/
합계 4804
-rwxr-xr-x 1 root root 4902656 3월 25 22:01 data1
drwx------ 2 root root 16384 3월 25 21:57 lost+found
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 81797100 4403856 77393244 6% /
devtmpfs 496956 0 496956 0% /dev
tmpfs 505432 140 505292 1% /dev/shm
tmpfs 505432 7072 498360 2% /run
tmpfs 505432 0 505432 0% /sys/fs/cgroup
/dev/sdb1 1014680 7352 938568 1% /mydata
///// 부트시 자동 마운트
[root@localhost ~]# gedit /etc/fstab
****** gedit - fstab *******
#
# /etc/fstab
# Created by anaconda on Fri Nov 28 05:45:53 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=d45767af-bda8-4336-b31c-66add765e665 / xfs defaults 1 1
UUID=9134adf3-0e7f-481f-9907-b5fa267c157a swap swap defaults 0 0
/dev/sdb1 /mydata ext4 defaults 0 0
댓글 ( 4)
댓글 남기기