We have currently the XenServer Version 6.2 with SP1 and the updates to XS62ESP1014.
If we tried to increase one of our vm disks, then there is an error:
[root#xenserver-xx ~]# xe vdi-resize uuid=5101f789-78c2-44e1-9a06-7fe7794dd98e disk-size=100GiB
Error code: SR_BACKEND_FAILURE_110
Error parameters: , VDI resize failed [opterr=Command ['/usr/sbin/lvcreate', '-n', 'inflate_5101f789-78c2-44e1-9a06-7fe7794dd98e_53800337408', '-L', '4', 'VG_XenStorage-81d9f03d-b7fc-80f3-240e-9f6a172059c7', '--addtag', 'journaler', '--inactive', '--zero=n'] failed (3): /usr/sbin/lvcreate: unrecognized option `--inactive'
Error during parsing of command line.],
The lvcreate version:
[root#xenserver-xx ~]# lvcreate --version
LVM version: 2.02.88(2)-RHEL5 (2014-04-04)
Library version: 1.02.67-RHEL5 (2011-10-14)
Driver version: 4.15.0
The redhat version:
[root#xenserver-xx ~]# more /etc/redhat-release
CentOS release 5.11 (Final)
Does sombody know somthing about this error or have somebody the some problem?
Is there a way to fix this?
The problem is also there, then we create a new vm disc and try the increase the disc immediately.
I've got a solution:
The Probelm was that XenServer needs a special version of lvm.
LVM version: 2.02.88(2)-RHEL5 (2014-04-04)
Library version: 1.02.67-RHEL5 (2011-10-14)
Driver version: 4.15.0
In this case lvcreate is a symbolic lik to lvm and the newer version has other arguments to increase one of the vm disks.
My workaround is that I copied the old version from an other XenServer to this XenServer and exchange the lvcreate link.
copy lvm__2_02_84_2 into /usr/sbin/
cp /usr/sbin/
chmod 555 lvm__2_02_84_2
ls -lah lv* # check if lvm and lvm__2_02_84_2 are not different (rights)
mv lvcreate lvcreate_<date>_bak # <date> e.g. 2014-12-02 # backup the old link
ln -s lvm__2_02_84_2 lvcreate # create the new link
ls -lah lv* # check again
Perhaps it's better to exchange the hole lvm:
copy lvm__2_02_84_2 into /usr/sbin/
cp /usr/sbin/
chmod 555 lvm__2_02_84_2
ls -lah lv* # check if lvm and lvm__2_02_84_2 are not different (rights)
mv lvm lvm_<date>_bak # <date> e.g. 2014-12-02 # backup the old link
mv lvm__2_02_84_2 lvm # create the new link
ls -lah lv* # check again
I believe you are missing some hotfixes.
You can try to run rpm -qa| grep lvm2
If your RPM name doesn't have 'xs' string, then definately there is some lvm2 related update is missing.
e.g.
[root#xenserver~]# rpm -qa | grep lvm
lvm2-2.02.88-12.xs1420
Related
I'm fairly new to linux but decided to dive right in with arch-linux to become familiar with everything.
Unfortunatelly I can't even finish the installation - shame on me.
The error while booting after setting arch up is:
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.
I went for btrfs on luks on lvm
The layout looks like this
sda
|- sda1 512MB fat32 /boot
`- sda2 remaining lvm
|- cryptswap 4GB swap
|- crypttmp 2GB tmp /tmp
`- cryptroot remaining btrfs
|- # /
|- #home /home
|- #snapshots /.snapshots
|- #log /var/log
|- #cache /var/cache
`- #tmp /var/tmp
Those are the commands and configurations I used to setup arch:
dd status=progress if=/dev/zero of=/dev/sda
wipe disk
gdisk /dev/sda
o clear gpt table
boot partition
n
↵
↵
+512M
ef00
lvm partition
n
↵
↵
↵
8e00
w write partition changes
setup lvm
pvcreate /dev/sda2
vgcreate vg1 /dev/sda2
lvcreate -L 4G -n cryptswap vg1
lvcreate -L 2G -n crypttmp vg1
lvcreate -l 100%FREE cryptroot vg1
setup encryption
cryptsetup luksFormat /dev/vg1/cryptroot
cryptsetup open /dev/vg1/cryptroot root
make filesystems
mkfs.fat -F32 -n BOOT /dev/sda1
mkfs.btrfs --label ROOT /dev/mapper/root
create btrfs subvolumes
mount /dev/mapper/root /mnt
cd /mnt
btrfs subvolume create #
btrfs subvolume create #home
btrfs subvolume create #snapshots
btrfs subvolume create #log
btrfs subvolume create #cache
btrfs subvolume create #tmp
cd ..
umount /mnt
mount btrfs subvolumes and BOOT partition
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=# /dev/mapper/root /mnt
mkdir /mnt/home
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=#home /dev/mapper/root /mnt/home
mkdir /mnt/.snapshots
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=#snapshots /dev/mapper/root /mnt/.snapshots
mkdir /mnt/var
mkdir /mnt/var/log
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=#log /dev/mapper/root /mnt/var/log
mkdir /mnt/var/cache
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=#cache /dev/mapper/root /mnt/var/cache
mkdir /mnt/var/tmp
mount -o noatime,compress=lzo,space_cache=v2,discard=async,subvol=#tmp /dev/mapper/root /mnt/var/tmp
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
pacstrap /mnt base linux linux-firmware lvm2 btrfs-progs amd-ucode vim install necessities
genfstab -L /mnt > mnt/etc/fstab generate fstab
arch-chroot /mnt
basic configuration
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
vim /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "KEYMAP=de-latin1" >> /etc/vconsole.conf
echo "devstation" >> /etc/hostname
vim /etc/hosts
vim /etc/mkinitcpio.conf
the mkinitcpio.conf content:
MODULES=(btrfs)
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block lvm2 encrypt filesystems fsck)
mkinitcpio -p linux
bootctl install
echo "default arch" > /boot/loader/loader.conf
vim /boot/loader/entries/arch.conf
the arch.conf content
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID={/dev/vg1/cryptroot uuid inserted here}:root root=/dev/mapper/root rw
exit
umount -a
poweroff
Pulling the arch installation medium out of the computer and starting it.
The booting output
:: running early hook [udev]
Starting version 248.3-2-arch
:: running hook [udev]
:: Triggering uevents...
:: running hook [keymap]
:: Loading keymap...done.
:: running hook [encrypt]
A password is requires to acces the root volume:
Enter passphrase for /dev/mapper/vg1-cryptroot: {inserting passphrase}
:: performing fsck on '/dev/mapper/root'
:: mounting '/dev/mapper/root' on real root
:: running cleanup hook [udev]
ERROR: Root device mounted successfully, but /sbin/init does not exist.
Bailing out, you are on your own. Good luck.
sh: can't access tty; job control turned off
[rootfs ]#
Obviously I didnt setup cryptswap and crypttmp, yet. Those will be setup with crypttab and fstab. I am just mentioning this, and highly doubt it is part of the problem, because they are just partitions not recognized by anything at the moment, aren't they.
I hope I didn't miss any command or configuration I did - I am typing off videos I watched and from head, because no single video I found had the btrfs, luks, lvm config I went with. Thanks for your time/help and reading this through.
Adding rootflags=subvol=# to /boot/loader/entries/arch.conf like so
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID={/dev/vg1/cryptroot uuid inserted here}:root root=/dev/mapper/root rootflags=subvol=# rw
did the trick.
my os is centos 7.4
root#wllabs:/home/wllabs/instances/image2016$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
kernel version: 3.10.0
root#wllabs:/home/wllabs/instances/image2016$ uname -r
3.10.0-693.5.2.el7.x86_64
Here is my mount command and error prompt, use guestmount -m /dev/sda1
root#wllabs:/home/wllabs/instances/image2016$ guestmount -a win2016
--ro -m /dev/sda1 /mount libguestfs: error: mount: unsupported filesystem type guestmount: '/dev/sda1' could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: /dev/sda1 (ntfs) guestmount: /dev/sda2 (ntfs)
here is use guestmount -m /dev/sda2
root#wllabs:/home/wllabs/instances/image2016$ guestmount -a win2016
--ro -m /dev/sda2 /mount libguestfs: error: mount: unsupported filesystem type guestmount: '/dev/sda2' could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: /dev/sda1 (ntfs) guestmount: /dev/sda2 (ntfs)
-m /dev/sda report error , so i use -i to guestmout, but also error
root#wllabs:/home/wllabs/instances/image2016$ guestmount -a win2016
--ro -i /mount guestmount: no operating system was found on this disk
If using guestfish '-i' option, remove this option and instead
use the commands 'run' followed by 'list-filesystems'.
You can then mount filesystems you want by hand using the
'mount' or 'mount-ro' command.
If using guestmount '-i', remove this option and choose the
filesystem(s) you want to see by manually adding '-m' option(s).
Use 'virt-filesystems' to see what filesystems are available.
If using other virt tools, this disk image won't work
with these tools. Use the guestfish equivalent commands
(see the virt tool manual page).
the libguestfs-winsupport and ntfs are all installed.
root#wllabs:/home/wllabs/instances/image2016$ rpm -qa | grep winsupport
libguestfs-winsupport-7.2-2.el7.x86_64
root#wllabs:/home/wllabs/instances/image2016$ rpm -qa | grep ntfs
ntfs-3g-devel-2017.3.23-1.el7.x86_64
ntfsprogs-2017.3.23-1.el7.x86_64
ntfs-3g-2017.3.23-1.el7.x86_64
I'm noticing the same behavior..
According the documentation, this is normal behavior.
They removed ntfs support starting from RHEL/CentOS 7.3.
More info on: http://libguestfs.org/guestfs-faq.1.html#mount:-unsupported-filesystem-type-with-ntfs-in-rhel-7.2
It is possible to compile your own libguestfs which supports ntfs, but this is not supported.
I haven't tested it yet, but this thread mentions the steps.
https://www.redhat.com/archives/libguestfs/2016-February/msg00145.html
I hope this helps since this is my first post. :-)
Kind regards,
Jeff
When booting a virtual server with Ubuntu 14.04/16.04 (I had the issues with both), it cant find the boot partition for root and the system falls to the initramfs shell with the following error:
(initframs) exit
Gave up waiting for root device. Common problems:
- Boot args (cat proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/CAC_VG-CAC_LV does not exist. Dropping to a shell!
if I type
ls /dev/mapper/
I still can see the partition mentioned in the error (and in the GRUB)
root=/dev/mapper/CAC_VG-CAC_LV
cat output as suggested in the error message
(initframs) cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-4.4.0-66-generic root=/dev/mapper/CAC_VG-CAC_LV ro
Notice: it seems to mount the device in Read-Only (ro). Maybe I should change this after I manage to start the system...
If I type exit I get the same error as above.
Then I try to mount:
mount -t ext4 /dev/mapper/CAC_VG-CAC_LV
mount: can't find /dev/mapper/CAC_VG-CAC_LV in /etc/fstab`
I had the same problem after a fresh install of Ubuntu 14.04
And this actually worked!!
mount -o remount, rw /
lvm vgscan
lvm vgchange -a y
mount -t ext4 /dev/mapper/CAC_VG-CAC_LV /root
exit
I'm running boot2docker 1.3 on Win7.
I want to connect a shared folder.
In the VirtualBox Manager under the image properties->shared folders I've added the folder I've want and named it "c/shared". The "auto-mount" and "make permanent" boxes are checked.
When boot2docker boots, it isn't mounted though. I have to do an additional:
sudo mount -t vboxsf c/shared /c/shared
for it to show up.
Since I need that for every time I'll ever use docker, I'd like that to just run on boot, or just already be there. So I thought if there were some startup script I could add, but I can't seem to find where that would be.
Thanks
EDIT: It's yelling at me about this being a duplicate of Boot2Docker on Mac - Accessing Local Files which is a different question. I wanted to mount a folder that wasn't one of the defaults such as /User on OSX or /c/Users on windows. And I'm specifically asking for startup scripts.
/var/lib/boot2docker/bootlocal.sh fits your need probably, it will be run by initial script /opt/bootscripts.sh
And bootscripts.sh will also put the output into the /var/log/bootlocal.log, see segment below (boot2docker 1.3.1 version)
# Allow local HD customisation
if [ -e /var/lib/boot2docker/bootlocal.sh ]; then
/var/lib/boot2docker/bootlocal.sh > /var/log/bootlocal.log 2>&1 &
fi
One use case for me is
I usually put shared directory as /c/Users/larry/shared, then I add script
#/bin/bash
ln -s /c/Users/larry/shared /home/docker/shared
So each time, I can access ~/shared in boot2docker as the same as in host
see FAQ.md (provided by #KCD)
If using boot2docker (Windows) you should do following:
First create shared folder for boot2docker VM:
"C:/Program Files/Oracle/VirtualBox/VBoxManage" sharedfolder add default -name some_shared_folder -hostpath /c/some/path/on/your/windows/box
#Then make this folder automount
docker-machine ssh
vi /var/lib/boot2docker/profile
Add following at the end of profile file:
sudo mkdir /windows_share
sudo mount -t vboxsf some_shared_folder /windows_share
Restart docker-machine
docker-machine restart
Verify that folder content is visible in boot2docker:
docker-machine ssh
ls -al /windows_share
Now you can mount the folder either using docker run or docker-compose.
Eg:
docker run it --rm --volume /windows_share:/windows_share ubuntu /bin/bash
ls -al /windows_share
If changes in the profile file are lost after VM or Windows restart please do following:
1) Edit file C:\Program Files\Docker Toolbox\start.sh and comment out following line:
#line number 44 (or somewhere around that)
yes | "${DOCKER_MACHINE}" regenerate-certs "${VM}"
#change the line above to:
# yes | "${DOCKER_MACHINE}" regenerate-certs "${VM}"
Thanks for your help with this. An additional few flags I needed to add, in order for the new mount to be accessible by the boot2docker "docker" user:
sudo mount -t vboxsf -o umask=0022,gid=50,uid=1000 Ext-HD /Volumes/Ext-HD
With docker 1.3 you do not need to manually mount anymore. Volumes should work properly as long as the source on the host vm is in your user directory.
https://blog.docker.com/2014/10/docker-1-3-signed-images-process-injection-security-options-mac-shared-directories/
I can't make it work following Larry Cai's instruction. I figured I could make changes to "c:\Program Files\Boot2Docker for Windows\start.sh", add below
eval "$(./boot2docker.exe shellinit 2>/dev/null | sed 's,\\,\\\\,g')"
your mount command
eval "$(./boot2docker ssh 'sudo mount -t vboxsf c/shared /c/shared')"
I also add the command to start my container here.
eval "$(docker start KDP)"
I've installed docker on mac os as written in documentation.
But in some docs (for example in the docker book) I see the recomendations to use man docker-run (man docker-pull, etc).
But when I run such command I get the error:
bessarabov#bessarabov-osx:~$ man docker
No manual entry for docker
How can I install docker man-documentation to my Mac OS system?
As of 2017.06.01, you have to git checkout your desired tag/version from
version >= 17.06: https://github.com/docker/docker-ce
version < 17.06: https://github.com/moby/moby
and then, go to the components/cli directory and execute:
make -f docker.Makefile manpages
To add the manpages to the manpath:
echo "MANPATH $PWD/man" | sudo tee -a /private/etc/man.conf
Source: https://github.com/docker/cli/issues/217
It looks like docker has slightly changed since #Sergiy's answer. Here is a slightly updated version that worked for me.
git clone https://github.com/docker/docker.git
cd docker/man # looks like the directory has moved up
docker build -t docker/md2man . # don't forget the '.'
docker run -v $PWD/:/docs:rw -w /docs -i docker/md2man /docs/md2man-all.sh
sudo cp -R man* /usr/share/man/ # you'll likely need sudo access for this
man docker # check it worked
Until the issue is resolved you can build man pages manually via a docker container using the supplied Dockerfile and then just copy generated files to /usr/share/man/:
# Step 1: checkout docker sources, but make sure you do this
# somewhere in /Users directory because boot2docker can only
# share this path with docker containers
git clone https://github.com/docker/docker.git
# Step 2: build docker image
cd docker/docs/man
docker build -t docker/md2man .
# Step 3: build man pages
docker run -v /Users/<path-to-git-dir>/docker/docs/man:/docs:rw \
-w /docs -i docker/md2man /docs/md2man-all.sh
# Step 4: copy generated man pages to /usr/share/man
cp -R man* /usr/share/man/
Enjoy!
It seems the go/glide bits under the hood of docker/md2man have changed since #gilly's answer. What I ended up doing, on Mac OS:
cd /usr/local
git clone https://github.com/docker/docker.git
brew install ruby
gem install md2man
cd docker/man
mkdir man1; for i in *.1.md; md2man-roff $i > man1/${i%.md}; done
cd /usr/local/share/man/man1
for i in ../../../docker/man/man1/*.1; do ln -s $i .; done