Monthly Archive for November, 2008

Hinting MP4 Files for Flash Player

Today, I found my MP4 files are full-downloaded, then played. If the size of the MP4 file is very large, I must wait for a long time. So, I tried to find some solution to hint MP4 files. mp4box just can do this job.

Although mp4box is a multiplexor for MP4 files, I just use it to hint my MP4 file:

# cd /usr/ports/multimedia/gpac-mp4box
# make install clean
# mp4box -hint video.mp4

Now, I can stream my MP4 files with Flash player.

Linux: Move / to Software RAID 1

It’s a simple thought: build a software RAID 1 disk array with an empty hard disk, and copy data on / to it. After data copied, add the old disk to the array.

For example,

(sda is the old /, and sdb is the new disk)
# sfdisk -d /dev/sda | sfdisk /dev/sdb
# mdadm -C /dev/md0 –level=raid1 –raid-devices=2 /dev/sdb1 missing
# mkfs -t ext3 /dev/md0
# mount /dev/md0 /mnt
# rsync -ax / /mnt/
# vim /etc/fstab
# vim /boot/grub/menu.lst

Modify fstab and menu.lst, and make sure all /dev/sda is changed to /dev/md0.

# reboot

Make sure that md0 is mounted successfully.

# mdadm –manage /dev/md0 –add /dev/sda1

Now, we successfully moved / to software RAID 1 :)