ssd mount

本当にメモ

完全に金土日書くの忘れてたわ!

https://wiki.archlinuxjp.org/index.php/XFS http://archlinux-blogger.blogspot.jp/2015/01/hdd-gpt-xfs-4kib-advanced-format.html http://category7.blog.fc2.com/blog-entry-54.html http://d.hatena.ne.jp/incarose86/20150131/1422723062 http://everlastingrecordarea.blogspot.jp/2014/09/xfs_24.html

[code lang=text] [root@n54l ~]# [root@n54l ~]# fdisk -l /dev/sdf

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

バイス ブート 始点 終点 ブロック Id システム [root@n54l ~]# ls -l /dev/ | grep sd brw-rw---- 1 root disk 8, 0 10月 14 23:48 2015 sda brw-rw---- 1 root disk 8, 1 10月 14 23:48 2015 sda1 brw-rw---- 1 root disk 8, 2 10月 14 23:48 2015 sda2 brw-rw---- 1 root disk 8, 16 10月 14 23:48 2015 sdb brw-rw---- 1 root disk 8, 17 10月 14 23:48 2015 sdb1 brw-rw---- 1 root disk 8, 32 10月 14 23:48 2015 sdc brw-rw---- 1 root disk 8, 33 10月 14 23:48 2015 sdc1 brw-rw---- 1 root disk 8, 48 10月 14 23:48 2015 sdd brw-rw---- 1 root disk 8, 64 10月 14 23:48 2015 sde brw-rw---- 1 root disk 8, 80 10月 15 01:42 2015 sdf [root@n54l ~]# ls -l /dev/ | grep sdf brw-rw---- 1 root disk 8, 80 10月 15 01:42 2015 sdf [root@n54l ~]# [root@n54l ~]# mount | grep sdf [root@n54l ~]# mount | grep sde [root@n54l ~]# mount | grep sda /dev/sda1 on /boot type ext4 (rw) [root@n54l ~]# mount | grep sda1 /dev/sda1 on /boot type ext4 (rw) [root@n54l ~]# mount | grep sdb /dev/sdb1 on /hdd1 type ext4 (rw) [root@n54l ~]# cat /sys/block/sdf/queue/physical_block_size 512 [root@n54l ~]# cat /sys/block/sdb/queue/physical_block_size 4096 [root@n54l ~]# mkfs.xfs no device name given in argument list Usage: mkfs.xfs / blocksize / [-b log=n|size=num] / data subvol / [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num), sectlog=n|sectsize=num / inode size / [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1] / log subvol / [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectlog=n|sectsize=num, lazy-count=0|1] / label / [-L label (maximum 12 characters)] / naming / [-n log=n|size=num,version=2|ci] / prototype file / [-p fname] / quiet / [-q] / realtime subvol / [-r extsize=num,size=num,rtdev=xxx] / sectorsize / [-s log=n|size=num] / version / [-V] devicename <devicename> is required unless -d name=xxx is given. <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). <value> is xxx (512 byte blocks). [root@n54l ~]# gdisk /dev/sdf 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): ? b back up GPT data to a file c change a partition's name d delete a partition i show detailed information on a partition l list known partition types n add a new partition o create a new empty GUID partition table (GPT) p print the partition table q quit without saving changes r recovery and transformation options (experts only) s sort partitions t change a partition's type code v verify disk w write table to disk and exit x extra functionality (experts only) ? print this menu

Command (? for help): q [root@n54l ~]# gdisk /dev/sdf 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): 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/sdf. The operation has completed successfully. [root@n54l ~]# gdisk /dev/sdf GPT fdisk (gdisk) version 0.8.10

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

Found valid GPT with protective MBR; using GPT.

Command (? for help): q [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# gdisk /dev/sdf GPT fdisk (gdisk) version 0.8.10

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

Found valid GPT with protective MBR; using GPT.

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/sdf: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): D386526A-6D72-47B0-A60C-0E98DED62A6D 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):

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/sdf. The operation has completed successfully. [root@n54l ~]# gdisk -l /dev/sdf GPT fdisk (gdisk) version 0.8.10

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

Found valid GPT with protective MBR; using GPT. Disk /dev/sdf: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): D386526A-6D72-47B0-A60C-0E98DED62A6D 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 [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# gdisk /dev/sdf GPT fdisk (gdisk) version 0.8.10

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

Found valid GPT with protective MBR; using GPT.

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): p Disk /dev/sdf: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): D386526A-6D72-47B0-A60C-0E98DED62A6D 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): p Disk /dev/sdf: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): D386526A-6D72-47B0-A60C-0E98DED62A6D 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/sdf. The operation has completed successfully. [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# gdisk -l /dev/sdf GPT fdisk (gdisk) version 0.8.10

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

Found valid GPT with protective MBR; using GPT. Disk /dev/sdf: 488397168 sectors, 232.9 GiB Logical sector size: 512 bytes Disk identifier (GUID): D386526A-6D72-47B0-A60C-0E98DED62A6D 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 [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# gdisk -l /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.


Disk /dev/sdb: 3907029168 sectors, 1.8 TiB Logical sector size: 512 bytes Disk identifier (GUID): 6340BC30-8F82-4326-BCAE-522963E5FCE2 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 3907029134 Partitions will be aligned on 8-sector boundaries Total free space is 5099 sectors (2.5 MiB)

Number Start (sector) End (sector) Size Code Name 1 63 3907024064 1.8 TiB 8300 Linux filesystem [root@n54l ~]# [root@n54l ~]# fdisk -l /dev/sdb

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

バイス ブート 始点 終点 ブロック Id システム /dev/sdb1 1 243201 1953512001 83 Linux Partition 1 does not start on physical sector boundary. [root@n54l ~]# fdisk -l /dev/sdf

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

ディスク /dev/sdf: 250.1 GB, 250059350016 バイト ヘッド 256, セクタ 63, シリンダ 30282 Units = シリンダ数 of 16128 * 512 = 8257536 バイト セクタサイズ (論理 / 物理): 512 バイト / 512 バイト I/O size (minimum/optimal): 512 bytes / 512 bytes ディスク識別子: 0x00000000

バイス ブート 始点 終点 ブロック Id システム /dev/sdf1 1 30283 244198583+ ee GPT [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# mkfs.xfs -m crc=1,finobt=1 /dev/sdf1 mkfs.xfs: オプションが違います -- 'm' unknown option -m Usage: mkfs.xfs / blocksize / [-b log=n|size=num] / data subvol / [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num), sectlog=n|sectsize=num / inode size / [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1] / log subvol / [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectlog=n|sectsize=num, lazy-count=0|1] / label / [-L label (maximum 12 characters)] / naming / [-n log=n|size=num,version=2|ci] / prototype file / [-p fname] / quiet / [-q] / realtime subvol / [-r extsize=num,size=num,rtdev=xxx] / sectorsize / [-s log=n|size=num] / version / [-V] devicename <devicename> is required unless -d name=xxx is given. <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). <value> is xxx (512 byte blocks). [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# mkfs.xfs -m crc=1,finobt=1 /dev/sdf1 mkfs.xfs: オプションが違います -- 'm' unknown option -m Usage: mkfs.xfs / blocksize / [-b log=n|size=num] / data subvol / [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num), sectlog=n|sectsize=num / inode size / [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1] / log subvol / [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectlog=n|sectsize=num, lazy-count=0|1] / label / [-L label (maximum 12 characters)] / naming / [-n log=n|size=num,version=2|ci] / prototype file / [-p fname] / quiet / [-q] / realtime subvol / [-r extsize=num,size=num,rtdev=xxx] / sectorsize / [-s log=n|size=num] / version / [-V] devicename <devicename> is required unless -d name=xxx is given. <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). <value> is xxx (512 byte blocks). [root@n54l ~]# mkfs.xfs --version mkfs.xfs: オプションが違います -- '-' unknown option -- Usage: mkfs.xfs / blocksize / [-b log=n|size=num] / data subvol / [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num), sectlog=n|sectsize=num / inode size / [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1] / log subvol / [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectlog=n|sectsize=num, lazy-count=0|1] / label / [-L label (maximum 12 characters)] / naming / [-n log=n|size=num,version=2|ci] / prototype file / [-p fname] / quiet / [-q] / realtime subvol / [-r extsize=num,size=num,rtdev=xxx] / sectorsize / [-s log=n|size=num] / version / [-V] devicename <devicename> is required unless -d name=xxx is given. <num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). <value> is xxx (512 byte blocks). [root@n54l ~]# mkfs.xfs -V mkfs.xfs version 3.1.1 [root@n54l ~]# mkfs.xfs /dev/sdf1 meta-data=/dev/sdf1 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@n54l ~]# xfs_info /dev/sdf1 xfs_info: /dev/sdf1 is not a mounted XFS filesystem [root@n54l ~]# dumpe2fs /dev/sdf1 dumpe2fs 1.41.12 (17-May-2010) dumpe2fs: Bad magic number in super-block while trying to open /dev/sdf1 Couldn't find valid filesystem superblock. [root@n54l ~]# blockdev --getalignoff /dev/sdf 0 [root@n54l ~]# ls -l /dev/disk/by-uuid 合計 0 lrwxrwxrwx 1 root root 10 10月 14 23:48 2015 1611fc31-c829-4fc5-8b50-245b19311f73 -> ../../sdb1 lrwxrwxrwx 1 root root 10 10月 14 23:48 2015 41ea0e75-4e7d-488c-8494-19ded4248556 -> ../../dm-1 lrwxrwxrwx 1 root root 10 10月 14 23:48 2015 4b8b299b-7a28-4853-8846-4f2f5df790d3 -> ../../sdc1 lrwxrwxrwx 1 root root 10 10月 14 23:48 2015 a46ffd3d-e961-4147-ad06-a937b529dd87 -> ../../sda1 lrwxrwxrwx 1 root root 10 10月 15 02:41 2015 a9170af9-f6be-4ecc-bbbb-42fb7b4a85db -> ../../sdf1 lrwxrwxrwx 1 root root 10 10月 14 23:48 2015 c70d4dcc-2565-4ecf-8585-817434b9a86b -> ../../dm-0 [root@n54l ~]# vi /etc/fstab [root@n54l ~]# mkdir /ssd1 [root@n54l ~]# chown -R root:root /ssd1 [root@n54l ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_n54l-lv_root 10G 4.4G 5.1G 47% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/sda1 477M 133M 319M 30% /boot /dev/sdb1 1.8T 1.3T 432G 76% /hdd1 /dev/sdc1 917G 736G 135G 85% /hdd2 [root@n54l ~]# mount -a [root@n54l ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_n54l-lv_root 10G 4.4G 5.1G 47% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/sda1 477M 133M 319M 30% /boot /dev/sdb1 1.8T 1.3T 432G 76% /hdd1 /dev/sdc1 917G 736G 135G 85% /hdd2 /dev/sdf1 233G 33M 233G 1% /ssd1 [root@n54l ~]# xfs_info /dev/sdf sdf sdf1
[root@n54l ~]# xfs_info /dev/sdf1 meta-data=/dev/sdf1 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 bsize=4096 blocks=29809, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 [root@n54l ~]# [root@n54l ~]# [root@n54l ~]# [/code]