ext3 を xfs に変更する。。。。といっても
各種設定がしてあったり、
既にたくさんのファイルが置いてあったりするので、
・待避
・xfs で mkfs
・復元
という手順を取る。
作業には、(なんでもいいが)玄箱/Pro + ハックキットと
GW3.5KH-U2 + HDT725025VLAT80(250GB IDE HDD)を使用する。
hackkit:~# dmesg|less : : scsi0 : Marvell SCSI to SATA adapter scsi1 : Marvell SCSI to SATA adapter Vendor: Seagate Model: ST3120026AS Rev: 3.18 Type: Direct-Access ANSI SCSI revision: 03 Vendor: WDC Model: WD1600JS-00NCB1 Rev: 10.0 Type: Direct-Access ANSI SCSI revision: 03 SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB) SCSI device sda: drive cache: write back SCSI device sda: 234441648 512-byte hdwr sectors (120034 MB) SCSI device sda: drive cache: write back sda: sda1 sda2 sda3 sda4 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0 SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB) SCSI device sdb: drive cache: write back SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB) SCSI device sdb: drive cache: write back sdb: sdb1 sdb2 sdb3 sdb4 Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0 : : Vendor: Hitachi Model: HDT725025VLAT80 Rev: V5DO Type: Direct-Access ANSI SCSI revision: 02 SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) sdc: assuming drive cache: write through SCSI device sdc: 488397168 512-byte hdwr sectors (250059 MB) sdc: assuming drive cache: write through sdc: sdc1 Attached scsi disk sdc at scsi2, channel 0, id 0, lun 0 : :LS-GL の SATA HDD は sdb として
このうち sdb2 と sdb4 とを xfs に変換する。
hackkit:~# mkdir /tmp/root hackkit:~# mount /dev/sdb2 /tmp/root XFS mounting filesystem sdb2 XFS: failed to read root inode mount: Unknown error 990 hackkit:~#-t ext3 オプションが必要
hackkit:~# mount -t ext3 /dev/sdb2 /tmp/root kjournald starting. Commit interval 5 seconds EXT3-fs warning: maximal mount count reached, running e2fsck is recommended EXT3 FS on sdb2, internal journal EXT3-fs: mounted filesystem with ordered data mode. hackkit:~#案の定、fsck することが推奨されている
hackkit:~# mount -t ext3 /dev/sdb4 /tmp/root/mnt kjournald starting. Commit interval 5 seconds EXT3 FS on sdb4, internal journal EXT3-fs: mounted filesystem with ordered data mode. hackkit:~# ls /tmp/root bin dev home lib media opt root srv tmp var boot etc initrd lost+found mnt proc sbin sys usr hackkit:~# ls /tmp/root/mnt Backup home lost+found sdb1 share tmp hackkit:~#続いて USB HDDD もマウントする
hackkit:~# mkdir /tmp/root2 hackkit:~# mount /dev/sdc1 /tmp/root2 XFS mounting filesystem sdc1 hackkit:~# ls -l /tmp/root2 total 0 hackkit:~#
hackkit:~# (cd /tmp/root; tar cf - .)|(cd /tmp/root2; tar xvf -) ./ ./lost+found/ ./bin/ ./bin/bash ./bin/rbash : hackkit:~#
hackkit:~# umount /tmp/root/mnt hackkit:~# umount /tmp/root hackkit:~#
hackkit:~# mkfs.xfs /dev/sdb2 mkfs.xfs: /dev/sdb2 appears to contain an existing filesystem (xfs). mkfs.xfs: Use the -f option to force overwrite. hackkit:~# mkfs.xfs -f /dev/sdb2 meta-data=/dev/sdb2 isize=256 agcount=8, agsize=64260 blks = sectsz=512 data = bsize=4096 blocks=514080, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 hackkit:~# mkfs.xfs -f /dev/sdb4 meta-data=/dev/sdb4 isize=256 agcount=16, agsize=2402721 blks = sectsz=512 data = bsize=4096 blocks=38443536, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=18771, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 hackkit:~#
hackkit:~# mount /dev/sdb2 /tmp/root XFS mounting filesystem sdb2 hackkit:~# mkdir /tmp/root/mnt hackkit:~# mount /dev/sdb4 /tmp/root/mnt XFS mounting filesystem sdb4 hackkit:~#
hackkit:~# rmdir /tmp/root2/lost+found hackkit:~# rmdir /tmp/root2/mnt/lost+found hackkit:~#
hackkit:~# (cd /tmp/root2/;tar cf - .)|(cd /tmp/root; tar xvf -) : : hackkit:~#
hackkit:~# cd /tmp/root/etc/ hackkit:/tmp/root/etc# vi fstab : : hackkit:/tmp/root/etc# cat fstab # /etc/fstab: static file system information. # #/dev/sda2 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 none /dev/pts devpts gid=103,mode=0622 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 /dev/sda4 /mnt xfs defaults,noatime 0 2 hackkit:/tmp/root/etc#
yasunari@ude:~$ mount /dev/sda2 on / type xfs (rw,noatime) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=103,mode=0622,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) usbfs on /proc/bus/usb type usbfs (rw) /dev/sda1 on /boot type ext3 (rw,noatime) /dev/sda4 on /mnt type xfs (rw,noatime) yasunari@ude:~$完了
|
← SATA と USB とはどちらが速い? |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-LGL シリーズ発表 |