[Top][All Lists]

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

Re: [gNewSense-users] Mounting/partitioning inside a VM

From: Kim Hawtin
Subject: Re: [gNewSense-users] Mounting/partitioning inside a VM
Date: Fri, 20 Apr 2012 10:35:22 +0930
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120207 Icedove/3.0.11

Hi Stayvoid,

Perhaps the first question is, why do you want to slice up the file system in this way?

I would consider it unusual to split off /tmp, /var, /var/tmp and /var/mail in this way unless you were shifting a very large amount of mail.

And then to separate disks, not all on the same volume/disk.

As you seem to be running a Xen VM, I would expect you are not going to get a performance increase. It makes it much more likely that one of these file systems is going to fill and halt which ever process that doing the work in that file system.

This is a fun exercise that I would recommend doing in a VM on your desktop or laptop first. Not on a remote machine, because bad things can happen. Been there, done that ;)

On 19/04/12 08:51, Stayvoid wrote:
I use one disk with the following fstab:
proc /proc proc defaults 0 0
/dev/xvda / ext3 noatime,errors=remount-ro,nobarrier 1 2
/dev/xvdc none sw sw,nobarrier 0 0

I want to migrate to the several disks and this fstab:
proc /proc proc defaults 0 0
/dev/xvda / ext3 noatime,errors=remount-ro,nobarrier 0 1
/dev/xvdb /boot ext3 defaults,noatime 0 2
/dev/xvdc none swap sw 0 0
/dev/xvdd /home ext3 rw,nosuid,nodev,noexec,auto,nouser,async 0 2
/dev/xvde /var/tmp ext3 defaults,nodev,nosuid,noexec 0 2
/dev/xvdf /tmp ext3 defaults,nodev,nosuid,noexec 0 2
/dev/xvdg /var/mail ext3 defaults,nodev,nosuid,noexec 0 2
/dev/xvdh /var ext3 defaults,nodev,nosuid 0 2

I assume that some step is missing. Should I mount the disks while
using the old version of fstab, then reboot and change fstab

Ok, for each new file system you will have to migrate them from the 'root' disk/partition to the new disk/partition.

0) backup VM disk image
1) boot with the old fstab into single user mode
2) create the new partitions
3) for each new partition/file system you want to moigrate
  1) format the new file systems on new partitions
  2) mount each file system, eg under /tmp
  3) copy the data from the 'root' file system to the new one
     eg rsync -av /tmp/ /mnt/
  4) unmount the file system from /mnt
  5) update /etc/fstab
  6) mv the directory you've copied and mkdir a new one to replace it
     eg; mv /tmp /tmp-old ; mkdir /tmp
  7) mount the new file system from the /etc/fstab enrty
     eg; mount /tmp
4) reboot and see if everything comes up clean
5) restore from backup if things go pair shaped
6) be home in time for tea



reply via email to

[Prev in Thread] Current Thread [Next in Thread]