![]() |
ノート/mintのディスクをgingerへ移すhttps://pepper.is.sci.toho-u.ac.jp:443/pepper/index.php?%A5%CE%A1%BC%A5%C8%2Fmint%A4%CE%A5%C7%A5%A3%A5%B9%A5%AF%A4%F2ginger%A4%D8%B0%DC%A4%B9 |
![]() |
ノート/テキストマイニング
訪問者数 1241 最終更新 2016-01-22 (金) 12:41:18
mintから引っこ抜いて、gingerへ挿す。
gingerを立ち上げる。dmesgを見て、SATAがどのデバイスに割り振られたか確認する。
# dmesg | grep sd [ 12.069533] sd 4:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB) [ 12.069540] sd 4:0:0:0: [sda] 4096-byte physical blocks [ 12.069579] sd 4:0:0:0: [sda] Write Protect is off [ 12.069583] sd 4:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 12.069599] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 12.069659] sd 5:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB) [ 12.069665] sd 5:0:0:0: [sdb] 4096-byte physical blocks [ 12.069677] sd 6:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB) <=== これだ [ 12.069681] sd 6:0:0:0: [sdc] 4096-byte physical blocks [ 12.069714] sd 5:0:0:0: [sdb] Write Protect is off [ 12.069718] sd 5:0:0:0: [sdb] Mode Sense: 00 3a 00 00 [ 12.069721] sd 6:0:0:0: [sdc] Write Protect is off [ 12.069724] sd 6:0:0:0: [sdc] Mode Sense: 00 3a 00 00 [ 12.069736] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 12.069743] sd 5:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 12.119393] sda: sda1 sda2 sda3 [ 12.119715] sd 4:0:0:0: [sda] Attached SCSI disk [ 12.122464] sdb: sdb1 [ 12.122724] sd 5:0:0:0: [sdb] Attached SCSI disk [ 12.685184] sdc: sdc1 sdc2 [ 12.685918] sd 6:0:0:0: [sdc] Attached SCSI disk [ 19.124306] XFS (sda2): Mounting V4 Filesystem [ 19.892988] XFS (sda2): Ending clean mount [ 19.893040] SELinux: initialized (dev sda2, type xfs), uses xattr [ 909.934717] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null) [ 909.945286] SELinux: initialized (dev sdc1, type ext4), uses xattr
/dev/sdcになっていて、sdc1とsdc2があることを確認。当然、scd1がブートパーティション)でscd2がルートだろう。
で、これをマウントしてみる。
# mount /dev/sdc2 /mnt mount: unknown filesystem type 'LVM2_member'
Logical Volumeの一部ということで、よくわからない。LVの扱いは初めてなので手探り。
特集:LVMによるディスクパーティションの動的化(後編) (3/5) あたりを覗きながら、様子を見る。
# vgdisplay -v Using volume group(s) on command line. Finding all volume groups. --- Volume group --- VG Name vg_mint System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 1.82 TiB PE Size 4.00 MiB Total PE 476806 Alloc PE / Size 476806 / 1.82 TiB Free PE / Size 0 / 0 VG UUID 8vfrMa-FLD5-vV1H-7pmZ-8xWv-QuAP-U8sRQH --- Logical volume --- LV Path /dev/vg_mint/lv_root LV Name lv_root VG Name vg_mint LV UUID WffYoG-I8gu-3YbP-PAtA-HBt0-2t96-V40Wh6 LV Write Access read/write LV Creation host, time mint.yy.is.sci.toho-u.ac.jp, 2012-11-03 15:09:30 +0900 LV Status available # open 0 LV Size 50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:3 --- Logical volume --- LV Path /dev/vg_mint/lv_home LV Name lv_home VG Name vg_mint LV UUID ANQ9Aj-KnK2-Qm0O-oRpY-LXtF-6ntS-7S5Y2o LV Write Access read/write LV Creation host, time mint.yy.is.sci.toho-u.ac.jp, 2012-11-03 15:09:40 +0900 LV Status available # open 0 LV Size 1.74 TiB Current LE 455936 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:4 --- Logical volume --- LV Path /dev/vg_mint/lv_swap LV Name lv_swap VG Name vg_mint LV UUID 3GTfzv-4nwy-1dlJ-iqf3-W0lV-Qfoo-EA5JbS LV Write Access read/write LV Creation host, time mint.yy.is.sci.toho-u.ac.jp, 2012-11-03 15:15:56 +0900 LV Status available # open 0 LV Size 31.52 GiB Current LE 8070 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:5 --- Physical volumes --- PV Name /dev/sdc2 PV UUID XHdEPC-03dq-xioj-sVfG-VjuP-cDEJ-RbEie5 PV Status allocatable Total PE / Free PE 476806 / 0 --- Volume group --- VG Name centos System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 2 Act PV 2 VG Size 5.46 TiB PE Size 4.00 MiB Total PE 1430667 Alloc PE / Size 1430652 / 5.46 TiB Free PE / Size 15 / 60.00 MiB VG UUID sIIgyo-VBgW-Dphb-CQcw-tQ1W-RxFB-kkMzAO --- Logical volume --- LV Path /dev/centos/swap LV Name swap VG Name centos LV UUID eFQ5ZW-3p8V-kIZu-33bO-QGDx-9eiL-V6W00A LV Write Access read/write LV Creation host, time ginger.yy.is.sci.toho-u.ac.jp, 2015-12-15 09:22:50 +0900 LV Status available # open 2 LV Size 4.00 GiB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Path /dev/centos/home LV Name home VG Name centos LV UUID ppoQV0-pblD-zRMT-mHyS-tPnq-uojL-Ac0Fpp LV Write Access read/write LV Creation host, time ginger.yy.is.sci.toho-u.ac.jp, 2015-12-15 09:22:50 +0900 LV Status available # open 1 LV Size 5.40 TiB Current LE 1416828 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 --- Logical volume --- LV Path /dev/centos/root LV Name root VG Name centos LV UUID LjLDIh-Vvf2-OJCx-cmgd-W6bk-Q1T4-vhvHC6 LV Write Access read/write LV Creation host, time ginger.yy.is.sci.toho-u.ac.jp, 2015-12-15 09:23:04 +0900 LV Status available # open 1 LV Size 50.00 GiB Current LE 12800 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Physical volumes --- PV Name /dev/sda3 PV UUID Y2Jchq-M6IK-5RKA-5OJX-rU4q-qtPh-PzqMUJ PV Status allocatable Total PE / Free PE 715271 / 15 PV Name /dev/sdb1 PV UUID lbQ84v-TRy2-y6HH-6K6I-exiU-EnD6-VO58f6 PV Status allocatable Total PE / Free PE 715396 / 0
ということで、非常にラッキーだったのは、mintから抜いてきたディスクのVolumeGroup名がmintで、gingerをインストールした方のディスクはVolumeGroup名がCentosになっていたこと。同じだったらかなりやばいのかも。
というところで、ロジカルボリューム/dev/vg_mint/lv_rootと/dev/vg_mint/lv_homeを使えばいいということらしい。
# mount /dev/vg_mint/lv_home /mnt/mint_home # ls /mnt/mint_home <正しいユーザホーム> # mount /dev/vg_mint/lv_root /mnt/mint_root # ls /mnt/mint_root bin cgroup etc lib lost+found misc net proc sbin srv tmp var boot dev home lib64 media mnt opt root selinux sys usr
というわけで、見られるようになった。