ls -l /dev/sd*
fdistk /dev/sdb
n
p
1
엔터
엔터
t
L
[root@localhost ~]# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 3월 26 18:44 /dev/sda
brw-rw---- 1 root disk 8, 1 3월 26 18:44 /dev/sda1
brw-rw---- 1 root disk 8, 2 3월 26 18:44 /dev/sda2
brw-rw---- 1 root disk 8, 16 3월 26 18:44 /dev/sdb
brw-rw---- 1 root disk 8, 32 3월 26 18:44 /dev/sdc
brw-rw---- 1 root disk 8, 48 3월 26 18:44 /dev/sdd
brw-rw---- 1 root disk 8, 64 3월 26 18:44 /dev/sde
brw-rw---- 1 root disk 8, 80 3월 26 18:44 /dev/sdf
brw-rw---- 1 root disk 8, 96 3월 26 18:44 /dev/sdg
brw-rw---- 1 root disk 8, 112 3월 26 18:44 /dev/sdh
brw-rw---- 1 root disk 8, 128 3월 26 18:44 /dev/sdi
brw-rw---- 1 root disk 8, 144 3월 26 18:44 /dev/sdj
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x83365dbb.
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): 1
First sector (2048-2097151, default 2048):
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):
++++++++++++++++++++++++++++
Command (m for help): p
Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x83365dbb
Device Boot Start End Blocks Id System
/dev/sdb1 2048 2097151 1047552 83 Linux
+++++++++++++++++++++++++++++++++++++++
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): t
Selected partition 1
++++++++++++++++++++++++++++++++++++++++++++
Selected partition 1
Hex code (type L to list all codes): L
0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris
1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT-
2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT-
3 XENIX usr 3c PartitionMagic 84 OS/2 hidden C: c6 DRDOS/sec (FAT-
4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx
5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data
6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / .
7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility
8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt
9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access
a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O
b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor
c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi eb BeOS fs
e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD ee GPT
f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ef EFI (FAT-12/16/
10 OPUS 55 EZ-Drive a7 NeXTSTEP f0 Linux/PA-RISC b
11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f1 SpeedStor
12 Compaq diagnost 5c Priam Edisk a9 NetBSD f4 SpeedStor
14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f2 DOS secondary
16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ fb VMware VMFS
17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fc VMware VMKCORE
18 AST SmartSleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fe LANstep
1c Hidden W95 FAT3 75 PC/IX be Solaris boot ff BBT
1e Hidden W95 FAT1 80 Old Minix
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'
++++++++++++++++++++++++++++++++++++++++++++
Command (m for help): p
Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x83365dbb
Device Boot Start End Blocks Id System
/dev/sdb1 2048 2097151 1047552 fd Linux raid autodetect
++++++++++++++++++++++++++++++++++++++++++++
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]# fdisk /dev/sdd
n
p
1
엔터
엔터
t
fd
w
==>결과
[root@localhost ~]# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 3월 26 18:44 /dev/sda
brw-rw---- 1 root disk 8, 1 3월 26 18:44 /dev/sda1
brw-rw---- 1 root disk 8, 2 3월 26 18:44 /dev/sda2
brw-rw---- 1 root disk 8, 16 3월 26 18:56 /dev/sdb
brw-rw---- 1 root disk 8, 17 3월 26 18:56 /dev/sdb1
brw-rw---- 1 root disk 8, 32 3월 26 19:00 /dev/sdc
brw-rw---- 1 root disk 8, 33 3월 26 19:00 /dev/sdc1
brw-rw---- 1 root disk 8, 48 3월 26 19:02 /dev/sdd
brw-rw---- 1 root disk 8, 49 3월 26 19:02 /dev/sdd1
brw-rw---- 1 root disk 8, 64 3월 26 19:02 /dev/sde
brw-rw---- 1 root disk 8, 65 3월 26 19:02 /dev/sde1
brw-rw---- 1 root disk 8, 80 3월 26 19:03 /dev/sdf
brw-rw---- 1 root disk 8, 81 3월 26 19:03 /dev/sdf1
brw-rw---- 1 root disk 8, 96 3월 26 19:03 /dev/sdg
brw-rw---- 1 root disk 8, 97 3월 26 19:03 /dev/sdg1
brw-rw---- 1 root disk 8, 112 3월 26 19:05 /dev/sdh
brw-rw---- 1 root disk 8, 113 3월 26 19:05 /dev/sdh1
brw-rw---- 1 root disk 8, 128 3월 26 19:06 /dev/sdi
brw-rw---- 1 root disk 8, 129 3월 26 19:06 /dev/sdi1
brw-rw---- 1 root disk 8, 144 3월 26 19:06 /dev/sdj
brw-rw---- 1 root disk 8, 145 3월 26 19:06 /dev/sdj1
1 ~ 9 개 생성후 VMware 에서 스냅샷
==========================================================
Linear RAID 생성하기
[root@localhost ~]# mdadm --create /dev/md9 --level=linear --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md9 started.
1. 명령어 : 전체 RAID 확인
mdadm --detail --scan
==>출력 결과
[root@localhost ~]# mdadm --detail --scan
ARRAY /dev/md9 metadata=1.2 name=localhost.localdomain:9 UUID=be9c2354:b33e8d1d:c5580daf:2b5616a5
2. 명령어 : RAID 장치 상세 확인
mdadm --detail /dev/md9
=>출력 결과
/dev/md9:
Version : 1.2
Creation Time : Sun Mar 26 19:19:12 2017
Raid Level : linear
Array Size : 2094048 (2044.97 MiB 2144.31 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Sun Mar 26 19:19:12 2017
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Rounding : 0K
Name : localhost.localdomain:9 (local to host localhost.localdomain)
UUID : be9c2354:b33e8d1d:c5580daf:2b5616a5
Events : 0
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
++++++++++++++++++++++++++++++++++++++++++++++++++++
++++ 포멧
[root@localhost ~]# mkfs.ext4 /dev/md9
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
131072 inodes, 523512 blocks
26175 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
[root@localhost ~]#
++++++++++++++++++++++++++++++++
마운트 하기
[root@localhost ~]# mkdir /raidLinear
[root@localhost ~]# mount /dev/md9 /raidLinear/
++++++++++++++++++++++++++ 확인
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/cl-root 78088956 4696384 73392572 7% /
devtmpfs 917760 0 917760 0% /dev
tmpfs 933632 144 933488 1% /dev/shm
tmpfs 933632 9084 924548 1% /run
tmpfs 933632 0 933632 0% /sys/fs/cgroup
/dev/sda1 508580 170820 337760 34% /boot
tmpfs 186728 8 186720 1% /run/user/0
/dev/md9 2028336 6144 1901108 1% /raidLinear
++++++++++++++++++ 드라이브 장치가 잘 장착이 되었나 테스트로 파일 카피 후 확인
[root@localhost ~]# cp /boot/vmlinuz-3.10.0-514.el7.x86_64 /raidLinear/data1
[root@localhost ~]# ls -l /raidLinear/
합계 5284
-rwxr-xr-x 1 root root 5392080 3월 26 19:27 data1
drwx------ 2 root root 16384 3월 26 19:23 lost+found
+++++ 부팅시 자동 마운트 설정
[root@localhost ~]# gedit /etc/fstab
# Created by anaconda on Mon Feb 27 22:28:56 2017
#
# 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
#
/dev/mapper/cl-root / xfs defaults 0 0
UUID=d2e19957-3300-4d21-ae86-9d13f7fa6dd1 /boot xfs defaults 0 0
/dev/mapper/cl-swap swap swap defaults 0 0
/dev/md9 /raidLinear ext4 defaults 0 0
댓글 ( 4)
댓글 남기기