Re: [CentOS-virt] Best practices for LVM and virtualization
>> 3. On both host and guest > This is what I always use and recommend. It doesn't have any side effects > with modern software versions, except with layered Thanks! I have tried this, but I don't see how to grow the guest file system without restarting the guest: - if I grow the underlying logical volume on the host, the guest still see the hard drive with the old size (checking with fdisk) - if I would add additional logical volumes (host) / drives (guest) in order to add them to the guest volume group, I will have to restart the guest I am using virtio disks. Is there a command so that the guest notices that its harddrive has grown? Is there a way to add new drives without restarting the guest? ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
Mathieu Baudier wrote: >>> 3. On both host and guest >>> >> This is what I always use and recommend. It doesn't have any side effects >> with modern software versions, except with layered >> > > Thanks! > > I have tried this, but I don't see how to grow the guest file system > without restarting the guest: > - if I grow the underlying logical volume on the host, the guest still > see the hard drive with the old size (checking with fdisk) > - if I would add additional logical volumes (host) / drives (guest) in > order to add them to the guest volume group, I will have to restart > the guest > > I am using virtio disks. > > Is there a command so that the guest notices that its harddrive has grown? > Is there a way to add new drives without restarting the guest? yes, you can add / remove disks to a VM without restarting the guest. look at the xm block-attach / block-detach commands ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
> yes, you can add / remove disks to a VM without restarting the guest. > look at the xm block-attach / block-detach commands My understanding is that xm is Xen specific (I'm using Qemu/KVM) I tried with virsh: virsh # attach-disk 6 /dev/mapper/vg_alma_fast-lv_test_virtlvm2 vdb Disk attached successfully virsh # dumpxml 6 ... /usr/libexec/qemu-kvm ... ... But I still cannot see the disk using fdisk: there is no /dev/vdb. Please note that I'm testing with a minimal CentOS installation (without even the Base group). So maybe it lacks some required deamons (there is no ACPI deamon for exmaple). I will try again with an install including the Base group. ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
Mathieu Baudier wrote: >> yes, you can add / remove disks to a VM without restarting the guest. >> look at the xm block-attach / block-detach commands >> > > My understanding is that xm is Xen specific (I'm using Qemu/KVM) > > I tried with virsh: > > virsh # attach-disk 6 /dev/mapper/vg_alma_fast-lv_test_virtlvm2 vdb > Disk attached successfully > > virsh # dumpxml 6 > > ... > > /usr/libexec/qemu-kvm > ... > > > > > > > > > > ... > > > > But I still cannot see the disk using fdisk: there is no /dev/vdb. > > You also need to tell the guest that a new device exists... Unless it (the guest) has some hotswap abilities ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
> You also need to tell the guest that a new device exists... Unless it > (the guest) has some hotswap abilities Do you know how I can do that? I reinstalled the guest (CentOS 5.4 x86_64, just as the host) with the default non-desktop groups, but it still doesn't see when I attach a disk. I also try to disable SELinux, to no effect. I've googling intensively around the concept of hotplug, hotswap, PCI, HAL, etc. in relation to virsh/KVM/virtio but withotu success. On the guest, lspci only shows on drive (the initial one I guess): [r...@localhost ~]# lspci 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] 00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) 00:02.0 VGA compatible controller: Cirrus Logic GD 5446 00:03.0 Ethernet controller: Qumranet, Inc. Virtio network device 00:04.0 SCSI storage controller: Qumranet, Inc. Virtio block device 00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
Mathieu Baudier wrote: >> You also need to tell the guest that a new device exists... Unless it >> (the guest) has some hotswap abilities >> > > Do you know how I can do that? > something along echo - - - > /sys/class/scsi_host/hostX/scan // yes, the "-" must be there ! might help > I reinstalled the guest (CentOS 5.4 x86_64, just as the host) with the > default non-desktop groups, but it still doesn't see when I attach a > disk. > > I also try to disable SELinux, to no effect. > > I've googling intensively around the concept of hotplug, hotswap, PCI, > HAL, etc. in relation to virsh/KVM/virtio but withotu success. > > On the guest, lspci only shows on drive (the initial one I guess): > > [r...@localhost ~]# lspci > 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) > 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] > 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] > 00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB > [Natoma/Triton II] (rev 01) > 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03) > 00:02.0 VGA compatible controller: Cirrus Logic GD 5446 > 00:03.0 Ethernet controller: Qumranet, Inc. Virtio network device > 00:04.0 SCSI storage controller: Qumranet, Inc. Virtio block device > 00:05.0 RAM memory: Qumranet, Inc. Virtio memory balloon > ___ > CentOS-virt mailing list > CentOS-virt@centos.org > http://lists.centos.org/mailman/listinfo/centos-virt > -- Manuel Wolfshant linux registered user #131416 IT managerNoBug Consulting SRL A: Yes. >Q: Are you sure? >>A: Because it reverses the logical flow of conversation. >>>Q: Why is top posting frowned upon? ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
> something along > > echo - - - > /sys/class/scsi_host/hostX/scan // yes, the "-" > must be there ! Unfortunately there is nothing under scsi: [r...@localhost ~]# ll /sys/class/scsi_* /sys/class/scsi_device: total 0 /sys/class/scsi_disk: total 0 /sys/class/scsi_host: total 0 I also tried kudzu (http://linux.die.net/man/8/kudzu), but it still shows only the original drive: [r...@localhost ~]# kudzu [r...@localhost ~]# kudzu -p ... - class: HD bus: VIRTIO detached: 0 device: vda driver: virtio_blk desc: "Virtio Block Device" - ... While looking around I found this comment (in a bug not directly related): Yaniv Kaul 2009-05-19 06:53:14 EDT Hot-add is not supported for RHEV 2.1. https://bugzilla.redhat.com/show_bug.cgi?id=501468#c1 So maybe it actually cannot work? ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] Best practices for LVM and virtualization
Got it! As per: http://www.linux-kvm.org/page/Hotadd_pci_devices You need to load the acpiphp kernel module: [r...@localhost ~]# modprobe acpiphp (I could not find pci_hotplug, but it worked without it) If you then add a new disk from virsh: virsh # attach-disk 9 /dev/mapper/vg_alma_fast-lv_test_virtlvm2 vdb Disk attached successfully It is automatically detected: [r...@localhost ~]# ll /dev/vdb brw-r- 1 root disk 253, 16 Feb 10 16:26 /dev/vdb I could then extend the guest's LVM: [r...@localhost ~]# pvcreate /dev/vdb Physical volume "/dev/vdb" successfully created [r...@localhost ~]# vgextend VolGroup00 /dev/vdb Volume group "VolGroup00" successfully extended [r...@localhost ~]# lvextend -l +100%FREE /dev/VolGroup00/LogVol00 Extending logical volume LogVol00 to 6.84 GB Logical volume LogVol00 successfully resized Thanks a lot for your help!! For reference, here are two interesting posts from the CentOS mailing list which are related to this topic: - Similar procedure (with Xen): LVM on both host and guest and adding additional space as disks: http://lists.centos.org/pipermail/centos-virt/2009-September/001161.html - Extending LVMs (a bit dated): http://lists.centos.org/pipermail/centos/2005-November/013471.html ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] LTO tape drives and Bacula for Backups?
How does everyone feel about using Quantum LTO 3 and 4 tapes with Bacula for backing up both the VM's, Host, as well as from within the VM's. What are know good backup solutions? Can anyone name specific tape drives / software that is working. Lee ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
We used bacula to hotswap SATA disks. It worked great. On Feb 10, 2010, at 8:39 AM, Lee Doran wrote: > How does everyone feel about using Quantum LTO 3 and 4 tapes with > Bacula for backing up both the VM’s, Host, as well as from within the VM’s. > > What are know good backup solutions? Can anyone name specific tape drives / > software that is working. > > Lee > ___ > CentOS-virt mailing list > CentOS-virt@centos.org > http://lists.centos.org/mailman/listinfo/centos-virt ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
- "Ben Chobot" wrote: > We used bacula to hotswap SATA disks. It worked great. There is little argument for tapes at all in modern backup systems unless you need archival storage and you have money to burn on media, time (backup/restore time as well as time lost during restore on the requesting side), staff, etc. You are better off and you will get more business value from one or more DR sites, replication, and NLS for backups in one or more locations. You will probably end up spending less overall if you just use the aforementioned hot swap SATA disks instead of tapes. -- Christopher G. Stach II http://ldsys.net/~cgs/ ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
>Christopher G. Stach II >There is little argument for tapes at all in modern backup systems unless you need archival storage and you have money to burn on media, time (backup/restore time as well as time lost during restore on the requesting side), staff, etc. We think of our 320G Quantum Sata DLT-4 tape drive as 'hot-swappable'. The tape is easily replaceable, without having to worry about bad connectors that can plague hot swap drive bay equipment. At $45 per tape for 320G of storage, it competes with hard drives. In case of tape drive failure, the tapes still work with the new drive. And with scsi or sata based tape drives, speed is not a problem. Combined with disk based network storage, tapes have a place in IT. ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
On Feb 10, 2010, at 11:43 AM, compdoc wrote: > At $45 per tape for 320G of storage, it competes with hard > drives. In case of tape drive failure, the tapes still work > with the new drive. And with scsi or sata based tape drives, > speed is not a problem. ...or, with 750GB drives today, you could more than double that storage for 25% more per unit. Tapes are more durable than hard drives, but they're hardly impervious, and they certainly aren't higher density when you start backing up many TB. ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
- "compdoc" wrote: > The tape is easily replaceable, without > having to worry about bad connectors that can plague hot > swap drive bay equipment. I really worry about your staff if you have damaged hot swap anything. How many insertions are they rated for? According to its data sheet, a lower end Tyco/AMP SATA connector measures up against EIA-364-09C (i.e., "Mate and unmated [sic] connector assemblies for 500 cycles at a maximum rate of 200 cycles/hour.") Other relevant forces are on there, and you can read the rest if you're interested here: http://tinyurl.com/ybnacp7 Basically, if you break them, you're doing something wrong or you are buying equipment with counterfeit or excessively substandard parts. I wouldn't consider this to be on the scale of a plague. > At $45 per tape for 320G of storage, it competes with hard > drives. In case of tape drive failure, the tapes still work > with the new drive. And with scsi or sata based tape drives, > speed is not a problem. Plus the cost of the tape drive (~$700), plus time, increased risk (longer backup duration means more risk), deployment flexibility, etc etc etc. > Combined with disk based network storage, tapes have a place > in IT. Yes, archival storage. -- Christopher G. Stach II http://ldsys.net/~cgs/ ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
Christopher G. Stach II wrote: > - "compdoc" wrote: > > >> Combined with disk based network storage, tapes have a place >> in IT. >> > > Yes, archival storage. > Concur. You can buy 1TB RAID rated SATA drives (with a 7 year warranty) for $150 US from Newegg. The strategy I use is build two machines, one on-site and one off-site, and use an rsync over ssh network back up strategy. Using nothing except off the shelf you can have a complete RAID6 multi-terabyte on and offsite backup system with 'deep' retention going back a year ( 7 x daily, 5 x weekly, 3 x monthly, 2 x quarterly, 2 x semiannual) for only two or three thousand dollars net and no consumables or manual intervention except when a new machine is added to the to be backed up or if a drive fails. -- Benjamin Franz ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Re: [CentOS-virt] LTO tape drives and Bacula for Backups?
Let your backup array of hard drives falling down in the floor and try to restore something later... :p I haven't this problem with my LTO/DAT tapes. I don't like backups in hard drives too. 2010/2/10 Benjamin Franz > Christopher G. Stach II wrote: > > - "compdoc" wrote: > > > > > >> Combined with disk based network storage, tapes have a place > >> in IT. > >> > > > > Yes, archival storage. > > > > Concur. You can buy 1TB RAID rated SATA drives (with a 7 year warranty) > for $150 US from Newegg. > > The strategy I use is build two machines, one on-site and one off-site, > and use an rsync over ssh network back up strategy. Using nothing except > off the shelf you can have a complete RAID6 multi-terabyte on and > offsite backup system with 'deep' retention going back a year ( 7 x > daily, 5 x weekly, 3 x monthly, 2 x quarterly, 2 x semiannual) for only > two or three thousand dollars net and no consumables or manual > intervention except when a new machine is added to the to be backed up > or if a drive fails. > > -- > Benjamin Franz > > ___ > CentOS-virt mailing list > CentOS-virt@centos.org > http://lists.centos.org/mailman/listinfo/centos-virt > -- Lucas Timm, Goiânia/GO. http://timmerman.wordpress.com (62) 9157-0789 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
[CentOS-virt] Enabling KSM with ksmctl under Centos 5.4
Are their any good guides out there on how to use ksmctl to enable and tune KSM performance on Centos/RedHat At the moment the only guidelines I can find are from the following OLS paper, plus the Linux Kernel Docs. * http://www.kernel.org/doc/ols/2009/ols2009-pages-19-28.pdf * http://www.kernel.org/doc/Documentation/vm/ksm.txt On a basic dual core testbed with 4GB Ram and 4-5 VMs I've tried ksmctl start 60 5000 This resulted in a 5% system cpu load as it tried to recover shared space. Sadly I can't tell how well it is working as we don't have /sys/kernel/mm/ksm support in Centos. Has anyone got some guidelines on how to relate number of pages + interval to number of CPUs and Ram. Cheers Steve -- Steven Ellis - Director of Worldwide Engineering, Bulletin.Net Inc - http://www.bulletin.net/ Ph +64 9 307 1146 Fax +64 9 307 1148 Mo +64 21 321 673 ___ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt