OpenVZ Forum


Home » General » Support » Mount in vps
Re: Mount in vps [message #7130 is a reply to message #7128] Wed, 04 October 2006 14:06 Go to previous messageGo to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Here is an example how I can do it on my node:

[HN]# dd if=/dev/zero of=/tmp/shareddisk bs=1024 count=4000
4000+0 records in
4000+0 records out
[HN]# mke2fs -F /tmp/shareddisk
mke2fs 1.37 (21-Mar-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
504 inodes, 4000 blocks
200 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=4194304
1 block group
8192 blocks per group, 8192 fragments per group
504 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[HN]# vzctl start 112
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
[HN]# mount -o loop,ro /tmp/shareddisk /vz/root/112/shared/
[root@dhcp0-132 /]# vzctl enter 112
entered into VPS 112
[VE]# cat /proc/mounts
simfs / simfs rw 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
ext2 /shared ext2 ro 0 0
[VE]# cd /shared/
[VE]# touch qwe
touch: cannot touch `qwe': Read-only file system


Of course, if you have and wish to share some block device or partion you don't need to create loop device.


HTH,
vass.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* quagga on FC5 and RHEL4
Next Topic: Better SO x Control Panel
Goto Forum:
  


Current Time: Tue Nov 04 19:26:00 GMT 2025

Total time taken to generate the page: 0.19386 seconds