How to customize Video services-RAMDisk memory file system

Source: Internet
Author: User

1,kernel configuration, setting RAMDisk size

[[Email protected] ~]# cat /etc/grub.conf # grub.conf generated by  anaconda## Note that you do not have to rerun grub  after making changes to this file# notice:  you have a  /boot partition.  this means that#           all kernel and initrd paths are relative to /boot/,  eg.#          root  (hd0,0) #           kernel /vmlinuz-version ro root=/dev/vda6#           initrd /initrd-[generic-]version.img#boot=/dev/vdadefault =0timeout=5splashimage= (hd0,0)/grub/splash.xpm.gzhiddenmenutitle centos  (2.6.32-358.el6.x86_64)  root  (hd0,0)  kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=uuid=5f60bd8c-5991-4101-a1f4-a08f3ef88832 rd_no_ Luks rd_no_lvm lang=en_us. utf-8 rd_no_md sysfont=latarcyrheb-sun16 crashkernel=auto  keyboardtype=pc  keytable=us rd_no_dm rhgb quiet ramdisk_size=102400 initrd / Initramfs-2.6.32-358.el6.x86_64.img

2. Format the RAM partition

Mke2fs/dev/ram0

3. Create mount Directory

Mkdir/ramdisk

4. Mount the RAMDisk directory

Mount/dev/ram0/ramdisk

5. Verifying the RAMDisk file system

[[email protected] ~]# df -hfilesystem             Size  Used Avail Use% Mounted on/dev/vda6               24G  601M    22g   3% /tmpfs                  1.9g     0  1.9g   0% / dev/shm/dev/vda1             504m    43M  436M   9% /boot/dev/vda3               30g  3.2g   25g  12% /usr/ dev/vda2              50g   618m   47g   2% /var/dev/vdb1               50G  690M   47G   2% /opt/dev/ram0               97m  1.6m   91m    2% /ramdisk
[[email protected] ramdisk]# lslost+found[[email  Protected] ramdisk]# dd if=/dev/zero of=./a.img count=88 bs=1m88+0 records  in88+0 records out92274688 bytes  (92 MB)  copied, 0.116734 s,  790 MB/S 
[[email protected] ramdisk]# df -hfilesystem             Size  Used Avail Use% Mounted on/dev/vda6               24G  601M    22G   3% /tmpfs                  1.9g     0  1.9g   0%  /dev/shm/dev/vda1             504m    43M  436M   9% /boot/dev/vda3               30g  3.2g   25g  12%  /usr/dev/vda2              50g   618m   47g   2% /var/dev/vdb1               50G  690M   47G   2% /opt/dev/ram0               97M   90M   2.0m  98% /ramdisk

6, Configuration Complete!

This article from "Welcome comments, Welcome to like" Blog, reproduced please contact the author!

How to customize Video services-RAMDisk memory file system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.