메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


1. 현재 연결된 기기 확인

(아래는 31.7GB(/dev/mmcblk0)과 1000.2 GB(/dev/sda)의 2개의 외장기기 확인됨

   /dev/mmcblk0는 /dev/mmcblk0p1과 /dev/mmcblk0p2의 2개 파티션으로 구성 되어 있고

          /dev/sda는 /dev/sda1로 파티션 1개로 구성되어 있음)

root@slave1:~# fdisk -l

Disk /dev/mmcblk0: 31.7 GB, 31657558016 bytes
4 heads, 16 sectors/track, 966112 cylinders, total 61831168 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 identifier: 0xf7e9dfe5

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       40960       19456+  81  Minix / old Linux
/dev/mmcblk0p2           40961     7577599     3768319+  81  Minix / old Linux

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xc197d009

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1953521663   976759808    7  HPFS/NTFS/exFAT

 

2. device에 mount할 폴더 생성

root@slave1:~# mkdir /app
root@slave1:~# mkdir /app/usb
root@slave1:~# mkdir /app/usb2
root@slave1:~# mkdir /app/hdd

 

3. hdd는 인식가능하게 파티션을 생성해야함..

root@slave1:/# fdisk /dev/sda

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0xb092454e.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


The device presents a logical sector size that is smaller than

the physical sector size. Aligning to a physical sector (or optimal

I/O) size boundary is recommended, or performance may be impacted.


Command (m for help): o

Building a new DOS disklabel with disk identifier 0xb5607451.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


The device presents a logical sector size that is smaller than

the physical sector size. Aligning to a physical sector (or optimal

I/O) size boundary is recommended, or performance may be impacted.


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 1

First sector (2048-1953525167, default 2048): 

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-1953525167, default 1953525167): 

Using default value 1953525167


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.

Syncing disks.


4. 작성된 파티션을 사용하기 위해 파일시스템을 생성한다.

(아래는 전체를 파티션 1개로 설정한 경우임)

root@slave1:/# mkfs -t ext4 /dev/sda1

mke2fs 1.42.5 (29-Jul-2012)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

61054976 inodes, 244190390 blocks

12209519 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

7453 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks: 

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 

        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 

        102400000, 214990848


Allocating group tables: done                            

Writing inode tables: done                            

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done     


*파티션 정보 확인

root@slave1:/# fdisk -l


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes

81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk identifier: 0xb5607451


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048  1953525167   976761560   83  Linux


Disk /dev/mmcblk0: 31.7 GB, 31657558016 bytes

4 heads, 16 sectors/track, 966112 cylinders, total 61831168 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 identifier: 0xf7e9dfe5


        Device Boot      Start         End      Blocks   Id  System

/dev/mmcblk0p1            2048       40960       19456+  81  Minix / old Linux

/dev/mmcblk0p2           40961     7577599     3768319+  81  Minix / old Linux

root@slave1:/# fdisk -l


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes

81 heads, 63 sectors/track, 382818 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk identifier: 0xb5607451


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048  1953525167   976761560   83  Linux


Disk /dev/mmcblk0: 31.7 GB, 31657558016 bytes

4 heads, 16 sectors/track, 966112 cylinders, total 61831168 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 identifier: 0xf7e9dfe5


        Device Boot      Start         End      Blocks   Id  System

/dev/mmcblk0p1            2048       40960       19456+  81  Minix / old Linux

/dev/mmcblk0p2           40961     7577599     3768319+  81  Minix / old Linux


5. device와 폴더 연결(mount)

root@slave1:/# mount /dev/sda1 /app/hdd

 

6. 자동 mount설정

 vi /etc/fstab에 아래의 내용을 추가한다.

 

 /dev/sda1       /app/hdd        ext4    defaults        0       0


번호 제목 글쓴이 날짜 조회 수
560 os가 windows7인 host pc에서 ubuntu가 os인 guest pc에 접근하기 위한 네트워크설정 총관리자 2014.04.20 725
559 hortonworks에서 제공하는 메모리 설정값 계산기 사용법 file 총관리자 2015.06.14 719
558 update를 많이 하면 heap memory가 많이 소진되고 최종적으로 OOM가 발생하는데 이에 대한 설명 총관리자 2017.04.10 717
557 secureCRT에서 backspace키가 작동하지 않는 경우 해결방법 총관리자 2015.05.11 716
556 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 총관리자 2015.04.02 701
555 oozie가 말하는 start시간은..서버에서 확인되는 시간이 아닙니다. 총관리자 2014.05.14 699
554 [Impala 3.2버젼]compute incremental stats db명.테이블명 수행시 ERROR: AnalysisException: Incremental stats size estimate exceeds 2000.00MB. 오류 발생원인및 조치방안 gooper 2022.11.30 697
553 mysql 5.5.34-0ubuntu0.13.04용 설치/진행 화면 총관리자 2014.09.10 697
552 sendmail전송시 421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory 발생시 조치사항 총관리자 2017.06.11 694
551 lateral view 예제 총관리자 2014.09.18 691
550 source의 type을 spooldir로 하는 경우 해당 경로에 파일이 들어오면 파일단위로 전송함 총관리자 2014.05.20 687
549 [springframework]Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류 발생시 조치사항 총관리자 2017.01.23 680
548 znode /hbase recursive하게 지우기 총관리자 2015.05.06 673
547 sqoop으로 mariadb에 접근해서 hive 테이블로 자동으로 생성하기 총관리자 2018.08.03 670
546 hadoop cluster에 포함된 노드중에서 문제있는 decommission하는 방법및 절차 file 총관리자 2017.12.28 660
545 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법(SolrCloud) 총관리자 2016.04.08 656
544 "File /user/hadoop/share/lib does not exist" 오류 해결방법 총관리자 2015.06.07 655
543 solr 인스턴스 기동후 shard에 서버가 정상적으로 할당되지 않는 경우 해결책 총관리자 2016.04.29 654
542 AIX 7.1에 Python 2.7.11설치하기 총관리자 2016.10.06 651
541 springframework를 이용한 war를 생성하는 build.gradle파일(참고용) 총관리자 2016.08.19 650

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로