[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH 5/6] ts-xen-build-prep: mkfs a new /home/osstest, don't resize2fs



On Wed, 2015-05-13 at 12:15 +0100, Ian Jackson wrote:
> +sub replace_home () {
> +    my $dir = '/home/osstest';
> +    my $mapper = lv_dev_mapper($vg,$lvleaf);
> +    my ($fstype,@opts) = qw(ext3 -m 0 -O sparse_super);
> +    target_cmd_root($ho, <<END, 1000);
> +        set -ex
> +     if mount | sed -e 's/^[^ ].* on //; s/ .*//' | grep -F '$dir'; then
> +         exit 0
> +     fi
> +     mkfs -t $fstype @opts $lv
> +        mount $lv /mnt
> +     rsync -aHx --numeric-ids $dir/. /mnt/.
> +     rm -rf $dir
> +     mkdir -m 2700 $dir
> +     echo '$mapper $dir $fstype defaults 0 0' >>/etc/fstab
> +     umount /mnt
> +     mount $dir

This doesn't update /etc/fstab so in standalone mode (when a host may
share build and test duties) the reboots will cause the
old /home/osstest to reappear and then I'm not sure if this all does
what we want or not with the existing lv.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.