Server :: Shell Script To Create Multiple LVM's Or Raw Devices For Syabse
Mar 22, 2011
I have Disk /dev/cciss/c0d1: 599.9 GB, unallocated on CentOS release 5.4 .
I need to create about 30-40 LVM's worth 500GB as raw devices for sybase . is there a way to script it or anyone already has it ?
The problem is that each time we need to do fdisk /dev/cciss/c0d1 and enter the partition no to create a new one .. how to overcome that problem and automate it in a script ?
have to create a webhost on an running fedora server which runs multiple webpages + a coldfusion serveri have to add an coldfusion virtual host to these.what i would do:*crate a new user & group*enter vhosts.conf and copy an existing host and modify it for the new one.*create an new folder and copy the main files (phpstarter and webroot) *chown the files for the right useri think an apache graceful would be needet
I have an old pentium 3 computer that has ~7 NICs installed. These NICs are attached to modems and other networking equipment. According to the linux ping page on computerhope.com, it seems that one could send a ping from a certain specified NIC. How would one go about this?
I tried to create logfile for the below shell program but i was not able to get log file,can anyone help me for the below program to create a log file for the shellscript.
I am trying to create a shell script similar to ls, but which only lists directories. I have the first half working (no argument version), but trying to make it accept an argument, I am failing. My logic is sound I think, but I'm missing something on the syntax.
Code: if [ $# -eq 0 ] ; then d=`pwd` for i in * ; do if test -d $d/$i ; then echo "$i:" code....
I'm trying to connect one computer to two others in an ad-hoc infrastructure.
[computer 1] ---- [computer 2] ---- [computer 3]
computer 2 is running Linux and has a single NIC wlan0. I want to it to connect to both computer 1 and computer 3 so each computer can talk to the other. No switch is available so it needs to be an ad-hoc setup.
I have a broadcom wireless card in my laptop and as far as I know, it acts as an USB device. I also have one USB stick wireless device (TL-WN422G - uses ath9k_htc driver) which I want to use at the same time as the first (Broadcom) device.
The problem is, after I load ath9k_htc - iwconfig does not show the new USB device (the TL-WN422G - wlan1 / ath0 / whatever), but only the old one (wlan0 - Broadcom, checked by MAC).
I tried this USB device (TL-WN422G) on my other computer that has PCI wireless card in it, and they both worked just fine together after I pluged it in... I get wlan0 (Ralink) and wlan1 (TL-WN422G). Is it some kind of a problem for the laptop that both devices are recognized as USB? How do I make wlan1 appear on my laptop?
also, my system is fully up to date 2.6.35 kernel (Arch)
edit: I've already downloaded the needed ar9271.fw from linuxwireless.org and I put it into /lib/firmware - something wrong in that?
dmesg gives me this on laptop:
usb 1-5: new high speed USB device using ehci_hcd and address 9 usb 1-5: ath9k_htc: Firmware - ar9271.fw not found ath9k_hif_usb: probe of 1-5:1.0 failed with error -22
I'm trying to build a custom setup that requires a flash drive and a CD to both be mounted to root. Applications, boot data, and other static directories are on the CD, while /home, /opt, and /tmp are on the flash drive. Is there a special option I can enter into fstab to allow this? If not, I intend to modify my kernel to allow this, but I'll need to find the sources that control this function.
I've got a co-worker who is trying to connect multiple devices to his wireless router - Xbox, Wii, TV, Dishnetwork box, etc. Not all of the devices are wireless however. He's had several thoughts on how to get this done and I know very little about this kind of thing so I thought I'd ask some of you.
His first thought was to buy a multi port bridge, but he doesn't like any of the ones he's seen so far.The other thought was to connect all of the devices to a switch and then use a single bridge, but he isn't sure if this would work.
I have 2 devices I'd like to be able to sync to without going into preferences and changing options each time. That is I'd like to just click "device>sync episodes" and have it sync to both devices automatically.
I am using Ubuntu 10.04 LTS - the Lucid Lynx. I am using the laptop to play video files and view it on TV using HDMI output. No problems. Requirement: to play simultaneously a different media file and be able to listen through say headphone / laptop speakers. While a movie audio is only heard on TV, other audio is heard only on laptop speaker.
On my desktop computer (now running the very impressive Slackware64 13.37 and generic kernel), I've got what Alsa considers 4 different sound devices:
Logitech USB headset Logitech QuickCam Pro 9000 with built-in microphone ATI HD48x0 audio (which uses the HDA-Intel driver) on my graphics card Intel 82801JI audio (also using HDA-Intel driver) on my motherboard
When I run alsaconf, it picks up the ATI audio only (which is fine). Later running alsamixer (or any other mixer) all 4 are visible. The issue is that I really would like the ATI audo to be in position 0. Previous to Slackware 13.37, setting up the device positions in /etc/modprobe.d/sound usually did the trick. However, that is now being ignored and one the USB devices are being put in position 0 regardless of what is in sound.conf. This is driving me nuts as a lot of software simply use the default audio device, which I would like to be my speakers, but is now my USB headset.
All of the googling I've done points towards messing with the /etc/modprobe.d/sound.conf file, but as I said, that is being ignored. Is there a more 13.37 way to have ALSA order the audio devices the way I want?
At work, I have a laptop configured with CentOS 5.5 that we will be using to run latency tests on two different mobile networks. To do so, we have two Novatel USB HSPA+ wireless modems connected, and configured using wvdial. The problem we are having right now is, wvdial is configured using the path to the modem to connect (/dev/ttyUSB0 for Network#1 and ttyUSB5 for Network#2), which only works if we insert the modems in the right order. I've tried alot of udev rules and what not to try and hard code the device names to something like /dev/modem_network1 and /dev/modem_network2, but that doesn't seem to work.
So at this point I'm trying to take a step back and a fresh look at the problem. Can anyone give me any information regarding where I should begin to get this done?
I always keep my headphones as well as my 2.1 speakers connected simultaneously on my PC (Gigabyte motherboard). Both these audio devices work fine simultaneously on my Windows 7, but in Ubuntu, only my headphones work, speakers don't work at all. I tried changing some settings in SOUND PREFERENCES as well as ALSA SOUND MIXER, but not luck so far.
I have an Intel HDA audio card, and would like to record both my soundcard output and my microphone input at the same time. Getting to record my soundcard output (aka "Stereo Mix" or "What-U-Hear") is impossible for my soundcard without using the PulseAudio monitor, so I've set that up. Now I can record either the PulseAudio monitor for my soundcard, or the microphone input, but I don't know how to record both at the same time.
Currently, my .asoundrc looks like this:
Code:
pcm.pulse { type pulse } ctl.pulse {
[code]....
So now I can choose either "pulse" as an input channel in, for example, Audacity or RecordMyDesktop applications (and then set in the PA volume control the actual channel which I want recorded), or choose "pulse_monitor" or "pulse_mic", in order to record either the PA monitor or the microphone, respectively.
I've read through the ALSA plugins reference, as well as the Asym and Dmix pages on ALSA wiki, but I'm still not sure how to put this together. I figured there should be a way either to route the microphone input into the ALSA output, and thus make the PA monitor "hear" what I speak into the microphone, or to make a completely new channel with both ALSA output and microphone input as "slaves", and then use that for recording.
I recently installed a new sound card, and I need to find out how to change the default device. Currently, I'm dual-booting Windows, and I had re-enabled the on-board audio in the PC's bios. After doing that, Debian started detecting that on-board as the default sound device. Is there a way to set my sound card to be used instead? I found out that the 'alsaconf' utility has been phased out. I"m currently running Debian testing, for amd64.
While installing Fedora 12, no devices were found on which to create file system (see attch.). I get the same message either on Live CD or DVD boot start. It looks like Fedora do not see my hdd. But Palimpsest can see my hard drive (see attch.)
Hdd is on my NForce 4 Ultra m/board and connected via "sata". Also I have raid controller on my board. But it is not in use: I turned it off in bios.
I *take* photos with both my Android smartphone and a fullblown DLSR. I *manage* photos organize, rename, rotate, etc. -- on my Opensuse box with KDE's Gwenview, and on my phone with Pixie Reef's "Fishbowl" Photo Gallery [URL]... I'm interested in your ideas about ways to keep everything in sync -- without using 3rd-party online services (No Picases, Flickr, Smugmug, etc). What needs to be kept in sync, somehow, includes:
The photos themsleves. Their organization among, and order in, various 'albums' Photo & filesystem metadata -- timestamps, filenames, EXIF data. PhotoApplication-specific data recognizing that at any time a change may be made on either device. rsync is a possibility, but once photos move into different dirs, it'd get messy. What workflow can I use to do this? Do I need a central server in the mix? If not using the 3rd-party services, is OwnCloud my best/only choice assuming that after each (group of)change(s) on each device I manage to sync with it?
It's been years since I've set up a Linux machine and I am getting a "no valid devices were found on which to create new filesystems" during a Centos install on a Asus P5BV-C/4L motherboard. I am assuming that there is a raid driver that needs to be installed, but when I went to the asus download site, selected linux/P5BV-C/4L and downloaded all of the available drivers, I keep getting errors saying "Driver disk is invalid for this release of Centos".
I take the zip file, extract it down to the .img file, burn it to disk and try to load it after running a "linux dd". Is this the correct way of doing it? Am I using the correct file?
Is it possible to output one playback stream to multiple devices simultaneously with the current PulseAudio / Phonon setup? The PulseAudio mixer only has radio buttons to choose one device per playback stream. I believe the hardware is capable of this, since I remember doing that before we had PulseAudio. How can I duplicate an audio stream?
Here's one application scenario: I am travelling with my family, all crammed in small hotel room. My wife and me want to watch a movie on my laptop without waking up our kids. I just happen to have one analogue headphone available and one wireless USB headset with me. (Of course, the low tech solution is to bring an 3,5mm Y-cable to attach two analogue headsets, but I would really love to use the USB headset together with the analogue one.)
Another similar thing that bugs me is that my laptop's built-in speakers now always seem dead when an analogue headphone is plugged in. This is mostly what one wants, and before PulseAudio, one had to manually switch them off which was generally annoying. However, the downside is for example with notifications.
For example, before PulseAudio, I could configure Skype to always ring over the laptop's built-in speakers, regardless of whether the analogue headphones were plugged in. This is no longer possible, since PulseAudio does not distinguish between built-in speakers and built-in analogue port any more, while old Alsa did. So in my office, where some analogue headphones are plugged into the docking station, I never hear Skype ringing if I don't wear the headphones.
I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?
Is there a way to prevent a user from being able to login more than once. Not a one-time login, but a single login. What I'm trying to do here is in moving our email system, an email user would login to this account, enter some password information, sync up their email, and have the passwords files removed, then log off. Next user can log in to the same account.
The reason for the single login is to protect the user's passwords.
i need a script that will give as much system info such as CPU usage, partition info, mem usage, etc.. from multiple OS's, FreeBSD, AIX, HP-UX. I only know SCO unix and dont know the commands on the other OS's.
I've got an interesting challenge for the shell scripting wizards here. I've got a mySQL dump of three files for my amarok database with the intention of copying some files to my media server (cover art) so that I can keep the server the server and not rely on my local machine.
Step 1: Identify any cover art files on my local machine.
I did this with:
Code: mysql -u amarok -p amarok -e "SELECT * FROM images WHERE path like '%.kde%'" > cover_art.txt Output looks like this:
[Code]....
What I have here now is the ENTIRE album list in my collection -- and something to compare the IDs in Step 1 against. I'm going to stop here and will update the thread as I get past this stumbling block. "ID" in cover_art.txt = "image" in albums.txt... straightforward enough, right?
So the question is this: how do I create a simple shell script that will loop through the IDs in cover_art.txt (i.e. characters 0 -> 4 -- it will always be a 4 digit ID) and then search for that ID in the Albums.txt file.
Trying to count the number of oracle instances on HPUX 11.23 - using ksh. I have multiple instances running and I would like to have a count for how many processes for eachinstance.Example, run the 'ps -efu oracle' command and for each instance increment a counter. So I am looking forINT1=# INT2=# INT3=# ... INTn=#I keep thinking a 'do-while' or some type of 'while' loop but I am missing something, somewhere
The script receives multiple files as parameters and it is supposed to count the number of lines in each of them and write that number in another file.
This is my script:
Code:
while [ -n "$1" ] do lines=`cat $1 | wc -l` echo "The number of lines in file $1 is $lines." >> lines.txt shift done
Is there any other way to do the same thing, without using shift?
(i) In office i open many terminal windows when i start my day and in each terminal i keep on login as different users many times in a day to do some task, by the end of the day when i need to exit from all terminals in a safeway instead of directly closing it i need to execute exit command or CTRL+D many times to close a single terminal safely. Can anybody tell me a way to exit from each terminal in single go, is there any command to acheive this ? I wish if we had a command like exitall like in vi we have :qa command to close multiple files opened in single window. I hope friends you have got what i am asking for ?
(ii) I want a software for debugging shellscripts searched a lot but dint got it.
I am running an application called QuantiSNP [URL]. The binary file is "quantisnp2", called upon in the "run_quantisnp2.sh" supplied by the authors. I am only able to run the application for single file processing (e.g. 1 input file for 1 sample; I can't run the batch file processing because I don't have the necessary BeadStudio report files, which has different formatting for the input files).
The difficulty is that I have 300 samples (300 unique sample IDs) and 3 input files for each sample for a total of 900 runs of this application. I am wondering how would I be able to automate this process as a shell script instead of basically manually changing the sample ID and respective input files every time a run completes? I bolded the single file processing shell script command line options below that need to be changed for each sample/input single file processing run. The command line option "--sampleid" is for the name given to the processed output files corresponding to the sample of interest and there are 3 input files for each sample.