gdiskでmount

めも

[code lang=text] <br />[root@test2 ] # cat /etc/redhat-release [~] CentOS release 6.7 (Final) [root@test2 ] # [~] [root@test2 ] # uname -a [~] Linux test2.localdomain 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 22:00:00 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # fdisk -l [~]

ディスク /dev/sda: 64.0 GB, 64023257088 バイト ヘッド 255, セクタ 63, シリンダ 7783 Units = シリンダ数 of 16065 * 512 = 8225280 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0xe12d9fc4

バイス ブート 始点 終点 ブロック Id システム /dev/sda1 * 1 13 102400 7 HPFS/NTFS パーティション 1 は、シリンダ境界で終わっていません。 /dev/sda2 13 6479 51932160 7 HPFS/NTFS パーティション 2 は、シリンダ境界で終わっていません。 /dev/sda3 6479 6542 512000 83 Linux パーティション 3 は、シリンダ境界で終わっていません。 /dev/sda4 6542 7784 9974784 5 拡張領域 パーティション 4 は、シリンダ境界で終わっていません。 /dev/sda5 6542 7784 9973760 8e Linux LVM

ディスク /dev/sdb: 250.1 GB, 250059350016 バイト ヘッド 255, セクタ 63, シリンダ 30401 Units = シリンダ数 of 16065 * 512 = 8225280 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0xc47d7246

バイス ブート 始点 終点 ブロック Id システム

警告: GPT (GUID パーティションテーブル) が '/dev/sdc' に検出されました! この fdisk ユーティリティは GPT をサポートしません。GNU Parted を使ってください。

ディスク /dev/sdc: 160.0 GB, 160041885696 バイト ヘッド 255, セクタ 63, シリンダ 19457 Units = シリンダ数 of 16065 * 512 = 8225280 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0xefdf1b69

バイス ブート 始点 終点 ブロック Id システム

ディスク /dev/mapper/VolGroup-lv_root: 6182 MB, 6182404096 バイト ヘッド 255, セクタ 63, シリンダ 751 Units = シリンダ数 of 16065 * 512 = 8225280 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0x00000000

ディスク /dev/mapper/VolGroup-lv_swap: 4026 MB, 4026531840 バイト ヘッド 255, セクタ 63, シリンダ 489 Units = シリンダ数 of 16065 * 512 = 8225280 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0x00000000

[root@test2 ] # [~]

[root@test2 ] # yum install gdisk [~] 読み込んだプラグイン:fastestmirror, priorities インストール処理の設定をしています Determining fastest mirrors epel/metalink | 4.2 kB 00:00
* base: ftp.jaist.ac.jp * epel: ftp.riken.jp * extras: ftp.jaist.ac.jp * remi-safe: remi.kazukioishi.net * rpmforge: mirror.fairway.ne.jp * updates: ftp.jaist.ac.jp base | 3.7 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.8 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 33 kB 00:00
isv_ownCloud_community | 1.2 kB 00:00
mariadb | 2.9 kB 00:00
nginx | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 215 kB 00:00
rpmforge | 1.9 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 2.6 MB 00:00
zabbix | 951 B 00:00
zabbix/primary | 29 kB 00:00
zabbix 193/193 zabbix-non-supported | 951 B 00:00
依存性の解決をしています --> トランザクションの確認を実行しています。 ---> Package gdisk.x86_64 0:0.8.10-1.el6 will be インストール --> 依存性解決を終了しました。

依存性を解決しました


パッケージ アーキテクチャ バージョン リポジトリー 容量

インストールしています: gdisk x86_64 0.8.10-1.el6 base 167 k

トランザクションの要約

インストール 1 パッケージ

総ダウンロード容量: 167 k インストール済み容量: 619 k これでいいですか? [y/N]y パッケージをダウンロードしています: gdisk-0.8.10-1.el6.x86_64.rpm | 167 kB 00:00
rpm_check_debug を実行しています トランザクションのテストを実行しています トランザクションのテストを成功しました トランザクションを実行しています インストールしています : gdisk-0.8.10-1.el6.x86_64 1/1 Verifying : gdisk-0.8.10-1.el6.x86_64 1/1

インストール: gdisk.x86_64 0:0.8.10-1.el6

完了しました! [root@test2 ] # [~]

[root@test2 ] # gdisk /dev/sdb [~] GPT fdisk (gdisk) version 0.8.10

Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present


Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format!


Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): Y

Command (? for help): p Disk /dev/sdb: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): 36CE26DE-0E46-4B6E-BE17-07D2845B6166 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 488397134 Partitions will be aligned on 2048-sector boundaries Total free space is 488397101 sectors (232.9 GiB)

Number Start (sector) End (sector) Size Code Name

Command (? for help): n Partition number (1-128, default 1): First sector (34-488397134, default = 2048) or {+-}size{KMGTP}: Last sector (2048-488397134, default = 488397134) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

Command (? for help):

Command (? for help): p Disk /dev/sdb: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): 36CE26DE-0E46-4B6E-BE17-07D2845B6166 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 488397134 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name 1 2048 488397134 232.9 GiB 8300 Linux filesystem

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!

Do you want to proceed? (Y/N): Y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully. [root@test2 ] #

[root@test2 ] # mkdir /hdd1 [root@test2 ] # mkfs.xfs /dev/sdb1 [~] mkfs.xfs: /dev/sdb1 appears to contain an existing filesystem (ntfs). mkfs.xfs: Use the -f option to force overwrite. [root@test2 ] # mkfs.xfs -f /dev/sdb1 [~] meta-data=/dev/sdb1 isize=256 agcount=4, agsize=15262347 blks = sectsz=512 attr=2, projid32bit=0 data = bsize=4096 blocks=61049385, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal log bsize=4096 blocks=29809, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # ls -l /dev/disk/by-uuid [~] 合計 0 lrwxrwxrwx 1 root root 10 11月 26 12:18 2015 04B828D9B828CB4E -> ../../sda1 lrwxrwxrwx 1 root root 10 11月 26 12:18 2015 0E0036FA0036E87B -> ../../sda2 lrwxrwxrwx 1 root root 10 11月 26 12:18 2015 17f35bfa-c99e-40d2-b961-912f1ae7426e -> ../../sda3 lrwxrwxrwx 1 root root 10 11月 26 12:18 2015 a0659b6c-f3d5-4fc6-84d0-f1d4b3eaf6c3 -> ../../dm-1 lrwxrwxrwx 1 root root 10 11月 26 12:18 2015 b6eb6cc2-f6f0-45b6-8297-ee3e8451e9e4 -> ../../dm-0 lrwxrwxrwx 1 root root 10 11月 26 14:48 2015 b853ca72-dfc7-4455-bbd5-cdd3091bf098 -> ../../sdb1 [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # vi /etc/fstab [root@test2 ] # cat /etc/fstab [~]

#

/etc/fstab

Created by anaconda on Sat Oct 24 08:30:31 2015

#

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/VolGroup-lv_root / ext4 defaults 1 1 UUID=17f35bfa-c99e-40d2-b961-912f1ae7426e /boot ext4 defaults 1 2 /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 UUID=b853ca72-dfc7-4455-bbd5-cdd3091bf098 /hdd1 xfs defaults 0 0 [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # df -h [~] Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 5.6G 2.7G 2.6G 52% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/sda3 477M 57M 395M 13% /boot [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # mount -a [~] [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # [~] [root@test2 ] # df -h [~] Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 5.6G 2.7G 2.6G 52% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/sda3 477M 57M 395M 13% /boot /dev/sdb1 233G 33M 233G 1% /hdd1 [root@test2 ] # [/code]