Re: [Libguestfs] virt-resize
On Mon, Jun 25, 2012 at 06:28:42AM -0500, Dan The Man wrote:
Tried resizing a standard UFS partition on a freebsd guest, booting from it resulted in "missing boot loader".
We can't currently resize BSD guests; patches welcome ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files. On 25 June 2012 15:52, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Jun 25, 2012 at 06:28:42AM -0500, Dan The Man wrote:
Tried resizing a standard UFS partition on a freebsd guest, booting from it resulted in "missing boot loader".
We can't currently resize BSD guests; patches welcome ...
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
-- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.
Don't think guestmount even supports ufs even if it is enabled either: Did a quick download of this read only ufs module: rpm -i kmod-ufs-0.0-1.el6.elrepo.x86_64.rpm cappy:~# modprobe ufs cappy:~# guestmount -a /dev/virtual/freebsd -m /dev/sda2 /freebsd -r libguestfs: error: mount_options: /dev/vda2 on /: mount: unknown filesystem type 'ufs' guestmount: '/dev/sda2' could not be mounted. Did you mean one of these? /dev/vda1 (unknown) /dev/vda2 (ufs) /dev/vda3 (unknown) cappy:~# kpartx -av /dev/virtual/freebsd add map virtual-freebsd1 (253:6): 0 128 linear /dev/virtual/freebsd 34 add map virtual-freebsd2 (253:7): 0 19920768 linear /dev/virtual/freebsd 162 add map virtual-freebsd3 (253:8): 0 1048576 linear /dev/virtual/freebsd 19920930 cappy:~# mount -t ufs -o ro,ufstype=ufs2 /dev/mapper/virtual-freebsd2 /freebsd cappy:~# ls /freebsd/ bin boot COPYRIGHT dev entropy etc home lib libexec media mnt proc rescue root sbin sys tmp usr var cappy:~# Guess still some uses for kpartx, curious what outcome would have been if a recompiled kernel with read-write ufs support here, or is ufs hardcoded as non supported? Dan. -- Dan The Man CTO/ Senior System Administrator Websites, Domains and Everything else http://www.SunSaturn.com Email: Dan@SunSaturn.com
On 25 June 2012 15:52, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Jun 25, 2012 at 06:28:42AM -0500, Dan The Man wrote:
Tried resizing a standard UFS partition on a freebsd guest, booting from it resulted in "missing boot loader".
We can't currently resize BSD guests; patches welcome ...
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
_______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
-- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com
On Mon, Jun 25, 2012 at 09:04:26AM -0500, Dan The Man wrote:
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.
Don't think guestmount even supports ufs even if it is enabled either: Did a quick download of this read only ufs module: rpm -i kmod-ufs-0.0-1.el6.elrepo.x86_64.rpm
cappy:~# modprobe ufs
After downloading a kmod, you need to rebuild the libguestfs appliance. Just do: rm -rf /var/tmp/.guestfs-*
cappy:~# guestmount -a /dev/virtual/freebsd -m /dev/sda2 /freebsd -r libguestfs: error: mount_options: /dev/vda2 on /: mount: unknown filesystem type 'ufs' guestmount: '/dev/sda2' could not be mounted. Did you mean one of these? /dev/vda1 (unknown) /dev/vda2 (ufs) /dev/vda3 (unknown)
You can pass the extra mount options to guestmount, so this might work: guestmount [...] -m /dev/sda2:/:ro,ufstype=ufs2 [...] Or if you want full control over everything (only available in libguestfs >= 1.18), replace guestmount with a command like: guestfish <<EOF add /dev/virtual/freebsd run #modprobe ufs (?) mount-vfs "ro,ufstype=ufs2" "ufs" "/dev/sda2" "/" mount-local /tmp/mntpoint mount-local-run EOF There are lots of configurables for each of those commands. Read the guestfish(1) man page for more information. There are several variations of ufs, and the Linux ufs driver isn't really that great. I wouldn't trust it to do writes, at least not without doing a great deal of testing first. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
You can write to UFS. It is rather safe. But you could not make a resize of ufs filesystem on Linux. There is not utilities for this. On 25 June 2012 18:53, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Jun 25, 2012 at 09:04:26AM -0500, Dan The Man wrote:
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.
Don't think guestmount even supports ufs even if it is enabled either: Did a quick download of this read only ufs module: rpm -i kmod-ufs-0.0-1.el6.elrepo.x86_64.rpm
cappy:~# modprobe ufs
After downloading a kmod, you need to rebuild the libguestfs appliance. Just do:
rm -rf /var/tmp/.guestfs-*
cappy:~# guestmount -a /dev/virtual/freebsd -m /dev/sda2 /freebsd -r libguestfs: error: mount_options: /dev/vda2 on /: mount: unknown filesystem type 'ufs' guestmount: '/dev/sda2' could not be mounted. Did you mean one of these? /dev/vda1 (unknown) /dev/vda2 (ufs) /dev/vda3 (unknown)
You can pass the extra mount options to guestmount, so this might work:
guestmount [...] -m /dev/sda2:/:ro,ufstype=ufs2 [...]
Or if you want full control over everything (only available in libguestfs >= 1.18), replace guestmount with a command like:
guestfish <<EOF add /dev/virtual/freebsd run #modprobe ufs (?) mount-vfs "ro,ufstype=ufs2" "ufs" "/dev/sda2" "/" mount-local /tmp/mntpoint mount-local-run EOF
There are lots of configurables for each of those commands. Read the guestfish(1) man page for more information.
There are several variations of ufs, and the Linux ufs driver isn't really that great. I wouldn't trust it to do writes, at least not without doing a great deal of testing first.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
-- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
You can write to UFS. It is rather safe. But you could not make a resize of ufs filesystem on Linux. There is not utilities for this.
On 25 June 2012 18:53, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Jun 25, 2012 at 09:04:26AM -0500, Dan The Man wrote:
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.
Don't think guestmount even supports ufs even if it is enabled either: Did a quick download of this read only ufs module: rpm -i kmod-ufs-0.0-1.el6.elrepo.x86_64.rpm
cappy:~# modprobe ufs
After downloading a kmod, you need to rebuild the libguestfs appliance. Just do:
rm -rf /var/tmp/.guestfs-*
Tried this but still got ufs unknown type ufs error.
cappy:~# guestmount -a /dev/virtual/freebsd -m /dev/sda2 /freebsd -r libguestfs: error: mount_options: /dev/vda2 on /: mount: unknown filesystem type 'ufs' guestmount: '/dev/sda2' could not be mounted. Did you mean one of these? /dev/vda1 (unknown) /dev/vda2 (ufs) /dev/vda3 (unknown)
You can pass the extra mount options to guestmount, so this might work:
guestmount [...] -m /dev/sda2:/:ro,ufstype=ufs2 [...]
cappy:~# guestmount -a /dev/virtual/centos -m /dev/sda1:/ /centos cappy:~# umount /centos cappy:~# guestmount -a /dev/virtual/centos -m /dev/sda1:/:ro /centos libguestfs: error: mount_options: you must mount something on / first guestmount: '/dev/sda1' could not be mounted. Did you mean one of these? /dev/vda1 (ext4) /dev/virtual/root (ext4) /dev/virtual/swap (swap) cappy:~# Just trying to pass a simple "ro" option, can't seem to get it to take any option even on a simple /boot mount on sda1? Dan.
Or if you want full control over everything (only available in libguestfs >= 1.18), replace guestmount with a command like:
guestfish <<EOF add /dev/virtual/freebsd run #modprobe ufs (?) mount-vfs "ro,ufstype=ufs2" "ufs" "/dev/sda2" "/" mount-local /tmp/mntpoint mount-local-run EOF
There are lots of configurables for each of those commands. Read the guestfish(1) man page for more information.
There are several variations of ufs, and the Linux ufs driver isn't really that great. I wouldn't trust it to do writes, at least not without doing a great deal of testing first.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
-- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com
On Mon, Jun 25, 2012 at 12:55:11PM -0500, Dan The Man wrote:
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
You can write to UFS. It is rather safe. But you could not make a resize of ufs filesystem on Linux. There is not utilities for this.
On 25 June 2012 18:53, Richard W.M. Jones <rjones@redhat.com> wrote:
On Mon, Jun 25, 2012 at 09:04:26AM -0500, Dan The Man wrote:
On Mon, 25 Jun 2012, Nikita A Menkovich wrote:
For now, UFS in Linux do not support resizing at all. There is only one way to resize: create new image, partition, attach to existing freebsd, install bootloader, sync files.
Don't think guestmount even supports ufs even if it is enabled either: Did a quick download of this read only ufs module: rpm -i kmod-ufs-0.0-1.el6.elrepo.x86_64.rpm
cappy:~# modprobe ufs
After downloading a kmod, you need to rebuild the libguestfs appliance. Just do:
rm -rf /var/tmp/.guestfs-*
Tried this but still got ufs unknown type ufs error.
[...]
cappy:~# guestmount -a /dev/virtual/centos -m /dev/sda1:/ /centos cappy:~# umount /centos cappy:~# guestmount -a /dev/virtual/centos -m /dev/sda1:/:ro /centos libguestfs: error: mount_options: you must mount something on / first guestmount: '/dev/sda1' could not be mounted. Did you mean one of these? /dev/vda1 (ext4) /dev/virtual/root (ext4) /dev/virtual/swap (swap) cappy:~#
Just trying to pass a simple "ro" option, can't seem to get it to take any option even on a simple /boot mount on sda1?
Enable debugging to understand what's going on: http://libguestfs.org/guestfs-faq.1.html#debugging_libguestfs Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
participants (3)
-
Dan The Man -
Nikita A Menkovich -
Richard W.M. Jones