Will Converting /vz Container from ext3 to ext4 Mess Up My Other Containers?

Discussion in 'HOWTO-Related Questions' started by darinpeterson, Jun 27, 2014.

  1. darinpeterson

    darinpeterson Member

    On my current server I'm currently running a mix of Wheezy and Squeeze containers, and I tried to create a new CentOS 6 container today, and ran into some issues.

    This is the HOWTO I'm using: http://www.howtoforge.com/installing-and-using-openvz-on-centos-6.4

    I got this error: Storing /vz/private/1332441.tmp/root.hdd/DiskDescriptor.xml
    Error in check_mount_restrictions (ploop.c:1536): The ploop image can not be used on ext3 or ext4 file system without extents
    Failed to create image: Error in check_mount_restrictions (ploop.c:1536): The ploop image can not be used on ext3 or ext4 file system without extents [21]
    Destroying container private area: /vz/private/1332441
    Creation of container private area failed


    I did some research online, and found this solution which says I should migrate my /vz container from ext3 to ext4, but I'm not sure this is the right solution, b/c of the error message. Seems like I'm missing something called "extents".

    My first question is am I missing something here? Can I still use ext3 if extents is installed?


    If not, this is what I'm told to do to convert ext3 to ext4: http://kb.parallels.com/en/115201.

    The file system can be converted by following the official steps from the kernel.org wiki Ext 4 Howto: Converting an ext3 filesystem to ext4:

    • Stop virtualization services:
    Code:
    [[email protected] ~]# service vz stop
    Code:
    [[email protected] ~]# service parallels-server stop
    • Remove /vz/pfcache.hdd partition:
    Code:
    [[email protected] ~]# rm -rf /vz/pfcache.hdd
    • Unmount /vz/ partition:
    Code:
    [[email protected] ~]# umount /vz
    • Convert the file system:
    Code:
    [[email protected] ~]# tune2fs -O extents,uninit_bg,dir_index /dev/DEVICE_NAME
    Code:
    [[email protected] ~]# e2fsck -fDC0 /dev/DEVICE_NAME
    (This command will ask if you would like to fix errors; press Y to continue.)

    • Change mounting options in /etc/fstab:
    Code:
    [[email protected] ~]# mount /dev/DEVICE_NAME /vz
    Code:
    [[email protected] ~]# grep "/vz" /etc/fstab
    /dev/DEVICE_NAME /vz ext3 defaults,noatime 1 2

    Code:
    [[email protected] ~]# vi /etc/fstab
    Code:
    [[email protected] ~]# grep "/vz" /etc/fstab
    /dev/DEVICE_NAME /vz ext4 defaults,noatime 1 2

    • Start virtualization services:
    Code:
    [[email protected] ~]# service parallels-server start
    Code:
    [[email protected] ~]# service vz start
    NOTE: Replace DEVICE_NAME with the actual partition name.

    Second, If I convert from ext3 to ext4, will my Debian servers be affected?

    Thanks,
    Darin
     
    Last edited: Jun 27, 2014
  2. srijan

    srijan New Member HowtoForge Supporter

    Do a backup before attempting this procedure. It may render your system unbootable, and may destroy your data.

    Your filesystems will become incompatible with ext3, so you need to make sure that you have a complete toolkit available with ext4 support before doing a conversion. This includes a bootloader, e2fsprogs, mount, and a recent kernel.

    If it succeeds, congratulations. If not, do not panic. You have not lost your data.And you have a backup after all, right? Make sure you have all the latest tools listed in prerequisites. Get them form Debian unstable or experimental if needed.
     
  3. darinpeterson

    darinpeterson Member

    Of course, backups are esential for any task like this, because you can expect things to go wrong. :)

    Thanks for the reply, I'm not going to pursue it due to the potential issues with the conversion, and the fact that conversion will happen at the end of the year.
     

Share This Page