Building an rpm with a modified Makefile
by Jonathan Ryshpan
I may need to build audacity with the Makefile modified to set
__WXDEBUG__ . The natural way to do this would seem to be to invoke
$ rpmbuild -bb SPECS/audacity.spec
edit the Makefile, and then run something like
$ rpmbuild --short-circuit -bb audacity.spec
but --short circuit only works for -bc and -bi .
What's the easiest way to do this kind of thing? Would it be to run
$ rpmbuild --short-circuit -bc audacity.spec
followed by a make install <somewhere>? If so, where should the
$ make install
be invoked?
Thanks - jon
14 years, 6 months
Need to add date to script -
by Bob Goodwin
I have a simple bash script that lists my internet usage in gigs,
the first three lines are data downloaded, the second three data
uploaded, 17.0 g and 5.0 g respectively are the upper limit for 30
days..
cat /home/bobg/usg.txt >> /home/bobg/usg1.sav
Listing that -
cat /home/bobg/usg1.sav
produces a long list which I haven't been able to do much with due
to my limited knowledge.
30 %
5.2
17.0
9 %
0.4
5.0
30 %
5.0
17.0
9 %
0.4
5.0
I would like to have a "date" command inserted to separate each
group of six lines. Can some one tell me how to do that or point me
in the right direction.
This is an updated F-11 computer.
Bob
14 years, 6 months
Re: [Xen-users] Re: How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Thu, Nov 12, 2009 at 6:37 PM, Fajar A. Nugraha <fajar(a)fajar.net> wrote:
> On Thu, Nov 12, 2009 at 5:10 PM, Mr. Teo En Ming (Zhang Enming)
> <space.time.universe(a)gmail.com> wrote:
> > Hi,
> >
> > I don't think I will be using the LVM snapshot method. I will simply
> ensure
> > that my domU is not running,
>
> Ah, so you can live with the down time. It makes things a lot simpler then.
>
> > then I proceed to do the losetup and kpartx
> > procedure.
>
> Like others mentioned, you don't need losetup for LVs. It will only
> make things slower.
>
> > Subsequently I will backup the MBR of my domU by dd-ing
> > /dev/loopX and clone all the filesystems of the domU using fsarchiver.
> >
> > I would like to use fsarchiver because it can support LZMA compression.
> LZMA
> > can compress better than bzip2 and decompress 3x faster than bzip2.
> > partimage only supports gzip and bzip2.
>
>
> If your concern is the size and speed of backup, here's one final note
> from me: you might want to look at zfs. Possible use scenarios :
> - use opensolaris as dom0. Probably the most supported option when it
> comes to xen + zfs, but you need to be familiar with how opensolaris
> works.
> - use external storage server running solaris/opensolaris as iscsi
> SAN. Think of it as poor-man's Netapp.
> - use zfs-fuse inside Linux dom0, and store domU storage as files
> - use zfs-fuse on domU, and do backup from domU instead of dom0.
>
> With zfs, you'd get zfs snapshot (which is like instaneous in-place
> backup), incremental block-level send (can greatly reduce backup
> storage size if your data doesn't change often), optional transparent
> compression for live data (like what ntfs has).
>
> --
> Fajar
>
I am not familiar with OpenSolaris but that may change with time.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
14 years, 6 months
Why can't I ugrade Fedora like Centos?
by Timothy Murphy
I upgraded from CentOS-5.3 to CentOS-5.4
(and earlier from CentOS-5.2 to CentOS-5.3)
just by running "yum update".
Why can't I upgrade to Fedora-12 like that?
Is it just that the CentOS makers are cleverer...?
--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
14 years, 6 months
what's with that trailing "." for the mode from "ls -l"
by Robert P. J. Day
i once knew this, really. what's the explanation of that recent
introduction of an extra period after the normal mode bits in the
output from "ls -l"?
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
14 years, 6 months
Upgrades driving me crazy....
by Michael Pawlowsky
Are there any other people using FC in a production enterprise
environment?
The constant upgrades are driving me nuts. We have machines at FC8-FC9-
FC10 and FC-11.
The main reason we are using FC is because one it's free (in a sense).
The next one is that it does include more recent versions of packages
that we use and are looking for the latest versions to take advantage
of some new features and so on.
But now since FC8 is no longer being supported, it has caused some
real issues. One main one is that yum is not updated and even rpm
packages that we create ourselves will no longer install on it.
We've been through this before since we've been using FC ever since in
broke out of RH.
So basically we are in a never ending cycles of upgrades. And since we
have had bad experiences trying to upgrade over the last version, our
policy is to back up the data, re-install and put back in all the data.
I'm thinking of trying ESXi to make installing quicker. Reconfigure an
new image locally, clone it and push it to the virtual server.
Also, I am wondering why it is not possible to simply keep upgrading
packages, kernel and so on, as opposed to coming up with new versions
every six months.
To make things more difficult, our servers need to be up 24/7.
Is FC simply a bad choice for enterprise production.
I'm starting to want to try CentOS soon. Unfortunately this will mean
not always being able to take advantage of the latest features in
software and so on.
So I was just wondering what other people in this situation do?
14 years, 6 months
Re: [Xen-users] How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
On Thu, Nov 12, 2009 at 6:18 PM, Geert Janssens <info(a)kobaltwit.be> wrote:
> On Thursday 12 November 2009, you wrote:
> > > dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
> >
> > I think if you do this, you are only backing up the first 512 bytes of
> the
> > logical volume, not the MBR.
> >
> > Someone correct me if I am wrong.
>
> I did some tests just to be sure. As far as I can tell, dd interacts with
> lvm
> in exactly the same way as with a physical disk or a loop device.
>
> In the test I copied the first sector directly from the lvm partition or
> via
> the loop device. It results in exactly the same sector being copied.
>
> Also, if you try fdisk -l on the lvm disk or the loop device, it results in
> the same output.
>
> Below is the output from my tests:
>
> [root@aragorn:~]# losetup /dev/loop1 /dev/base/kobaltwit_f11_disk
>
> [root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
>
> Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id
> System
> /dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
> Linux
> [root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
>
> Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Device Boot Start End Blocks Id
> System
> /dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
> Linux
>
> [root@aragorn:~]# dd if=/dev/base/kobaltwit_f11_disk of=mbr.lvm bs=512
> count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 7.6e-05 seconds, 6.7 MB/s
>
> [root@aragorn:~]# dd if=/dev/loop1 of=mbr.loop bs=512 count=1
> 1+0 records in
> 1+0 records out
> 512 bytes (512 B) copied, 0.000151 seconds, 3.4 MB/s
>
> [root@aragorn:~]# diff mbr.l*
> [root@aragorn:~]#
>
> These test seem to indicate to me that the lvm layer in completely
> transparent
> to userland tools such as fdisk or dd.
>
> So I still think the losetup step is superfluous and possibly causing
> unnecessary overhead.
>
> Geert
>
> --
> Kobalt W.I.T.
> Web & Information Technology
> Brusselsesteenweg 152
> 1850 Grimbergen
>
> Tel : +32 479 339 655
> Email: info(a)kobaltwit.be
>
>
Thank you!
I will omit the losetup step.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
14 years, 6 months
How to Backup and Restore MBR within Logical Volumes?
by Mr. Teo En Ming (Zhang Enming)
Hi All,
I have several Xen virtual machines within logical volumes using LVM2. I did
not use disk images for performance reasons.
Conventionally, if I want to clone my virtual machines, I have to dd the LV
to an image file. But this consumes a lot of time and harddisk space.
So, instead of doing that, I want to use losetup and kpartx with my logical
volumes, which contain operating systems of virtual machines.
I can backup the filesystems of a virtual machine in this way:
# losetup /dev/loop1 /dev/virtualmachines/windows7-x64
virtualmachines is the name of my volume group.
windows7-x64 is the logical volume.
# kpartx -av /dev/loop1
Then I would see the partitions of the virtual machine within a logical
volume, like so:
/dev/mapper/loop1p1
/dev/mapper/loop1p2
/dev/mapper/loop1p3
Now that I can access the partitions of the virtual machine within a logical
volume, I can use partimage or fsarchiver to backup the partitions (provided
the filesystem is supported by the archiver).
But the problem is that I can only backup/clone the filesystems of my
virtual machine within a logical volume. I can't backup the Master Boot
Record (MBR) of the virtual machine within a logical volume. For example,
dd if=/dev/hda of=mbr.hda bs=512 count=1
Because /dev/hda resides in a logical volume. The logical volume is a
virtual harddisk for my virtual machine.
I would like to know how to backup and also restore the MBR of my virtual
machine/guest operating system/domU within a logical volume because the
losetup and kpartx procedure only allows me access to the partitions, not
the MBR. A complete backup of a virtual machine (and also a bare metal
machine) includes the MBR and all filesystems.
If there is a catastrophic failure with my logical volumes containing domUs,
I would like to
1) re-create the physical volume (PV)
2) re-create the volume group
3) assign the PV to the volume group
4) restore the LVM metadata, i.e. the configuration files for all the
logical volumes
5) restore the MBR of my domU
6) restore the filesystems of my domU
Please advise.
Thank you very much.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe(a)gmail.com
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
14 years, 6 months
Anyone tested the HP Probook 4310s with fedora 11?
by Edwin Tan
Hi Guys,
Did anyone tested the HP Probook 4310s with fedora 11?
Are all the drivers available for it in fedora 11 or the next, fedora 12
release?
Kindly help.... thanks
regards,
Edwin Tan.
14 years, 6 months