如何在zed—oob上创建虚拟硬盘

du /  -d  1 -h

dd if=/dev/zero of=large.bin bs=1048576 count=200
du /  -d  1 -h

mkfs.ext2  /dev/ram

//Linux 内核默认创建了 16 个 ramdisks。详情:http://blog.csdn.net/liangkaiming/article/details/6237537

mkdir /mnt/tmpfs   //建立tmpfs子目录
mount tmpfs /mnt/tmpfs -t tmpfs//创建tmpft文件系统,详见:http://www.360doc.com/content/12/0731/08/6828497_227391810.shtml
ls /mnt/tmpfs
df
cd /mnt/tmpfs/

dd if=/dev/zero of=lagre.bin bs=1024576 count=256
这里会发现最多只能写进243M

df
 发现dev/loop0 的空间太小要设大一些
free

umount /mnt/tmpfs
//太麻烦,懒得标注,你们自己看吧。
~~~~~~~~~~~~~~~~~~~~~~ zynq> umount /mnt/tmpfs umount: can't umount /mnt/tmpfs: Device or resource busy zynq> cd / zynq> umount /mnt/tmpfs zynq> free total used free shared buffers Mem: 498200 41588 456612 0 448 -/+ buffers: 41140 457060 0 0 0 zynq> mount tmpfs /mnt/tmpfs -t tmpfs size=350m BusyBox v1.18.4 (2012-01-09 15:03:52 PST) multi-call binary. Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE Mount a filesystem. Filesystem autodetection requires /proc. Options: -a Mount all filesystems in fstab -f Update /etc/mtab, but don't mount -n Don't update /etc/mtab -r Read-only mount -w Read-write mount (default) -t FSTYPE Filesystem type -O OPT Mount only filesystems with option OPT (-a only) -o OPT: loop Ignored (loop devices are autodetected) [a]sync Writes are [a]synchronous [no]atime Disable/enable updates to inode access times [no]diratime Disable/enable atime updates to directories [no]relatime Disable/enable atime updates relative to modification ti me [no]dev (Dis)allow use of special device files [no]exec (Dis)allow use of executable files [no]suid (Dis)allow set-user-id-root programs [r]shared Convert [recursively] to a shared subtree [r]slave Convert [recursively] to a slave subtree [r]private Convert [recursively] to a private subtree [un]bindable Make mount point [un]able to be bind mounted bind Bind a file or directory to another location move Relocate an existing mount point remount Remount a mounted filesystem, changing flags ro/rw Same as -r/-w There are filesystem-specific -o flags. zynq> mount tmpfs /mnt/tmpfs -t tmpfs -size=350m mount: invalid option -- 'z' BusyBox v1.18.4 (2012-01-09 15:03:52 PST) multi-call binary. Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE Mount a filesystem. Filesystem autodetection requires /proc. Options: -a Mount all filesystems in fstab -f Update /etc/mtab, but don't mount -n Don't update /etc/mtab -r Read-only mount -w Read-write mount (default) -t FSTYPE Filesystem type -O OPT Mount only filesystems with option OPT (-a only) -o OPT: loop Ignored (loop devices are autodetected) [a]sync Writes are [a]synchronous [no]atime Disable/enable updates to inode access times [no]diratime Disable/enable atime updates to directories [no]relatime Disable/enable atime updates relative to modification ti me [no]dev (Dis)allow use of special device files [no]exec (Dis)allow use of executable files [no]suid (Dis)allow set-user-id-root programs [r]shared Convert [recursively] to a shared subtree [r]slave Convert [recursively] to a slave subtree [r]private Convert [recursively] to a private subtree [un]bindable Make mount point [un]able to be bind mounted bind Bind a file or directory to another location move Relocate an existing mount point remount Remount a mounted filesystem, changing flags ro/rw Same as -r/-w There are filesystem-specific -o flags. zynq> mount tmpfs /mnt/tmpfs -t tmpfs --size=350m zynq> free total used free shared buffers Mem: 498200 41340 456860 0 448 -/+ buffers: 40892 457308 Swap 0 0 0 zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 358400 0 358400 0% /mnt/tmpfs zynq> umount /mnt/tmpfs zynq> mount tmpfs /mnt/tmpfs -t tmpfs --size=450m zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 0 460800 0% /mn[0;31mzynq> zynq> cd /mnt/tmpfs zynq> ls zynq> dd if=/dev/zero of=lagre.bin bs=1024576 count=300 300+0 records in 300+0 records out 307372800 bytes (293.1MB) copied, 0.928720 seconds, 315.6MB/s zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp zynq> dd if=/dev/zero of=lagre.bin bs=1024576 count=450 450+0 records in 450+0 records out 461059200 bytes (439.7MB) copied, 1.531221 seconds, 287.2MB/s zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 0 249100 0% /tmp /dev/loop0 460800 450256 10544 98% /mnt/tmpfs zynq> dd if=/dev/zero of=lagre.bin bs=1024576 count=460 460+0 records in 460+0 records out 471304960 bytes (449.5MB) copied, 1.670316 seconds, 269.1MB/s zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp p0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /m zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq[m df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> ddf -/bin/ash: ddf: not found zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /m zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp 31mzynq> d 460800 460260 540 100% /mnt/tmpfs -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> f -/bin/ash: f: not found zynq> d -/bin/ash: d: not found zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 4 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs nq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs[0;31mzynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mntzynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmp[0;31mzynq> zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tm;31mzynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tm;31mzynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 249100 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpf[0;31mzynq> zynq> zynq> df Filesystem 1K-blocks Used Available Use% Mounted on none 0 249100 0% /tmp /dev/loop0 460800 460260 540 100% /mnt/tmpfs zynq> df

 

posted @ 2013-04-22 10:40  puckpuck  阅读(440)  评论(0编辑  收藏  举报