Re: [Users] convert to ploop

2014-11-10 Thread Nick Knutov
Thanks, this is working.

For wiki - I did

find /etc/vz/conf/*.conf -type f -exec sed -i.bak
s/DISKINODES/#DISKINODES/g {} \;

VE=123 ; vzctl stop $VE ; vzctl convert $VE ; vzctl start $VE

Unfortunatly, I do not understand how to work with/edit MediaWiki and
I'm not sure on what page it's better to add this.

25.10.2014 7:32, Kirill Kolyshkin пишет:
 
 On Oct 24, 2014 5:33 PM, Devon B. devo...@virtualcomplete.com
 mailto:devo...@virtualcomplete.com wrote:

 I think what Kir was getting at was set the diskinodes equal to 65536
 x GiB before converting.  So for 40GiB, set diskinodes to 2621440
 
 Either that, or just remove the DISKINODES from CT config
 
 On 10/24/2014 8:05 PM, Nick Knutov wrote:

 Thanks, now I understand why this occurred, but what is the easiest way
 to convert a lot of different CTs to ploop? As I remember there is no
 way to set up unlimited diskinodes or disable them (in case I want to
 use CT size when converting to ploop and don't want to think about
 inodes at all).


 25.10.2014 5:31, Kir Kolyshkin пишет:

 [...]
 Previously, we didn't support setting diskinodes for ploop, but later we
 found
 a way to implement it (NOTE: for vzctl create and vzctl convert only).
 The trick we use it we create a file system big enough to accomodate the
 requested number of inodes, and then use ploop resize (in this case
 downsize)
 to bring it down to requested amount.

 In this case, 1G inodes requirements leads to creation of 16TB
 filesystem
 (remember, 1 inode per 16K). Unfortunately, such huge FS can't be
 downsized
 to as low as 40G, the minimum seems to be around 240G (values printed in
 the error message are in sectors which are 512 bytes each).

 Solution: please be reasonable when requesting diskinodes for ploop.



 ___
 Users mailing list
 Users@openvz.org mailto:Users@openvz.org
 https://lists.openvz.org/mailman/listinfo/users
 
 
 
 ___
 Users mailing list
 Users@openvz.org
 https://lists.openvz.org/mailman/listinfo/users
 

-- 
Best Regards,
Nick Knutov
http://knutov.com
ICQ: 272873706
Voice: +7-904-84-23-130
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] convert to ploop

2014-11-10 Thread Kir Kolyshkin


On 11/10/2014 05:51 PM, Nick Knutov wrote:

Thanks, this is working.

For wiki - I did

find /etc/vz/conf/*.conf -type f -exec sed -i.bak
s/DISKINODES/#DISKINODES/g {} \;

VE=123 ; vzctl stop $VE ; vzctl convert $VE ; vzctl start $VE


By the way I just found it's enough to set DISKINODES to 0
(after stopping a container of course).



Unfortunatly, I do not understand how to work with/edit MediaWiki and
I'm not sure on what page it's better to add this.


I have modified this:

https://openvz.org/Ploop/Getting_started#Creating_a_new_CT,

and also wrote a whole new

https://openvz.org/Ploop/diskinodes

Hope it's enough information now.



25.10.2014 7:32, Kirill Kolyshkin пишет:

On Oct 24, 2014 5:33 PM, Devon B. devo...@virtualcomplete.com
mailto:devo...@virtualcomplete.com wrote:

I think what Kir was getting at was set the diskinodes equal to 65536

x GiB before converting.  So for 40GiB, set diskinodes to 2621440

Either that, or just remove the DISKINODES from CT config


On 10/24/2014 8:05 PM, Nick Knutov wrote:

Thanks, now I understand why this occurred, but what is the easiest way
to convert a lot of different CTs to ploop? As I remember there is no
way to set up unlimited diskinodes or disable them (in case I want to
use CT size when converting to ploop and don't want to think about
inodes at all).


25.10.2014 5:31, Kir Kolyshkin пишет:

[...]
Previously, we didn't support setting diskinodes for ploop, but later we
found
a way to implement it (NOTE: for vzctl create and vzctl convert only).
The trick we use it we create a file system big enough to accomodate the
requested number of inodes, and then use ploop resize (in this case
downsize)
to bring it down to requested amount.

In this case, 1G inodes requirements leads to creation of 16TB

filesystem

(remember, 1 inode per 16K). Unfortunately, such huge FS can't be

downsized

to as low as 40G, the minimum seems to be around 240G (values printed in
the error message are in sectors which are 512 bytes each).

Solution: please be reasonable when requesting diskinodes for ploop.



___
Users mailing list
Users@openvz.org mailto:Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users



___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users



___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] convert to ploop

2014-10-24 Thread Kir Kolyshkin


On 10/24/2014 02:50 PM, Nick Knutov wrote:

Hello all,

trying to convert CT from simfs to ploop. vzctl convert ended with error

Error in ploop_resize_image (ploop.c:2477): Unable to change image size
to 83877888 sectors, minimal size is 502423144
Unmounting file system at /vz/private/101.ploop/root.hdd/root.hdd.mnt
Unmounting device /dev/ploop37776
Failed to resize image: Error in ploop_resize_image (ploop.c:2477):
Unable to change image size to 83877888 sectors, minimal size is
502423144 [38]


Why this happened? What I'm doing wrong?

If it does matter - CT was:
vzctl set ${ve} --diskspace  40G --quotatime 600 --save


[Just a side note -- quotatime doesn't make sense for ploop,
as it's only related to vzquota. Harmless but totally useless.]


vzctl set ${ve} --diskinodes 10:10 --save


 This ^^

While with simfs option --diskinodes is just a limit and can be set 
arbitrarily high,
with ploop it affects the actual file system being created. By default, 
ext4 allocates
1 (one) inode per each 16 KB of data (this is practically the same as to 
assume that

the average file size will be 16KB).

Now, let's do some simple math. 40GB of disk space means 2621440 inodes
(40 * 1024 * 1024 / 16). Apparently you think it won't be enough for you and
set diskinodes to 1,000,000,000, i.e 1G (which by the way means you assume
the average file size inside containers will be 40 bytes).

Previously, we didn't support setting diskinodes for ploop, but later we 
found

a way to implement it (NOTE: for vzctl create and vzctl convert only).
The trick we use it we create a file system big enough to accomodate the
requested number of inodes, and then use ploop resize (in this case 
downsize)

to bring it down to requested amount.

In this case, 1G inodes requirements leads to creation of 16TB filesystem
(remember, 1 inode per 16K). Unfortunately, such huge FS can't be downsized
to as low as 40G, the minimum seems to be around 240G (values printed in
the error message are in sectors which are 512 bytes each).

Solution: please be reasonable when requesting diskinodes for ploop.

PS I would be much obliged if you can put this on OpenVZ wiki


and there are about 20Gb of files inside this CT.

2.6.32-042stab093.5 and latest ploop.




___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] convert to ploop

2014-10-24 Thread Nick Knutov
Thanks, now I understand why this occurred, but what is the easiest way
to convert a lot of different CTs to ploop? As I remember there is no
way to set up unlimited diskinodes or disable them (in case I want to
use CT size when converting to ploop and don't want to think about
inodes at all).


25.10.2014 5:31, Kir Kolyshkin пишет:
 [...]
 Previously, we didn't support setting diskinodes for ploop, but later we
 found
 a way to implement it (NOTE: for vzctl create and vzctl convert only).
 The trick we use it we create a file system big enough to accomodate the
 requested number of inodes, and then use ploop resize (in this case
 downsize)
 to bring it down to requested amount.
 
 In this case, 1G inodes requirements leads to creation of 16TB filesystem
 (remember, 1 inode per 16K). Unfortunately, such huge FS can't be downsized
 to as low as 40G, the minimum seems to be around 240G (values printed in
 the error message are in sectors which are 512 bytes each).
 
 Solution: please be reasonable when requesting diskinodes for ploop.


-- 
Best Regards,
Nick Knutov
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] convert to ploop

2014-10-24 Thread Devon B.
I think what Kir was getting at was set the diskinodes equal to 65536 x 
GiB before converting.  So for 40GiB, set diskinodes to 2621440




On 10/24/2014 8:05 PM, Nick Knutov wrote:

Thanks, now I understand why this occurred, but what is the easiest way
to convert a lot of different CTs to ploop? As I remember there is no
way to set up unlimited diskinodes or disable them (in case I want to
use CT size when converting to ploop and don't want to think about
inodes at all).


25.10.2014 5:31, Kir Kolyshkin пишет:

[...]
Previously, we didn't support setting diskinodes for ploop, but later we
found
a way to implement it (NOTE: for vzctl create and vzctl convert only).
The trick we use it we create a file system big enough to accomodate the
requested number of inodes, and then use ploop resize (in this case
downsize)
to bring it down to requested amount.

In this case, 1G inodes requirements leads to creation of 16TB filesystem
(remember, 1 inode per 16K). Unfortunately, such huge FS can't be downsized
to as low as 40G, the minimum seems to be around 240G (values printed in
the error message are in sectors which are 512 bytes each).

Solution: please be reasonable when requesting diskinodes for ploop.




___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users


Re: [Users] convert to ploop

2014-10-24 Thread Kirill Kolyshkin
On Oct 24, 2014 5:33 PM, Devon B. devo...@virtualcomplete.com wrote:

 I think what Kir was getting at was set the diskinodes equal to 65536 x
GiB before converting.  So for 40GiB, set diskinodes to 2621440

Either that, or just remove the DISKINODES from CT config

 On 10/24/2014 8:05 PM, Nick Knutov wrote:

 Thanks, now I understand why this occurred, but what is the easiest way
 to convert a lot of different CTs to ploop? As I remember there is no
 way to set up unlimited diskinodes or disable them (in case I want to
 use CT size when converting to ploop and don't want to think about
 inodes at all).


 25.10.2014 5:31, Kir Kolyshkin пишет:

 [...]
 Previously, we didn't support setting diskinodes for ploop, but later we
 found
 a way to implement it (NOTE: for vzctl create and vzctl convert only).
 The trick we use it we create a file system big enough to accomodate the
 requested number of inodes, and then use ploop resize (in this case
 downsize)
 to bring it down to requested amount.

 In this case, 1G inodes requirements leads to creation of 16TB
filesystem
 (remember, 1 inode per 16K). Unfortunately, such huge FS can't be
downsized
 to as low as 40G, the minimum seems to be around 240G (values printed in
 the error message are in sectors which are 512 bytes each).

 Solution: please be reasonable when requesting diskinodes for ploop.



 ___
 Users mailing list
 Users@openvz.org
 https://lists.openvz.org/mailman/listinfo/users
___
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users