General :: Ubuntu - Automatically Distinguish Difference Between Multiple HDDs ?
Feb 14, 2010
I'm running Ubuntu Server 9.10. I have two external USB HDDs. I use them each for different backup reasons. So certain data gets stored on one HDD, and different information gets stored on the other HDD.
I want to make a script that can look at the external HDD can determine which HDD it is, so that it can copy the proper information to it. Is there a way for Linux to determine this? Like if I see one HDD as /dev/sdc1, then unplug it and plug in the other HDD, should Linux see it as /dev/sdd1 or will it be /dev/sdc1?
I don't quite understand how it determines the /dev/sdxx values that it assigns to drives.
I am using ubuntu 10.10. I am practicing for my CCIE. I need to do the following just to speed up myself :-)In ubuntu, while i am in gui (gnome) i want to do the following1) open a terminal window2) open 13 tabs (the ones that we open using ctrl+shift+t)3) on tab1, execute -> telnet 127.0.0.1 20014) on tab2, execute -> telnet 127.0.0.1 20025) so on till telnet 127.0.0.1 2013
suppose in tab separated file with n columns and if in a column i put a value which is space separated .how can i able to find out a specific column..ie
After reading Jeff Atwood's recent blog post on solid state drives, I'm somewhat deterred in wanting to own one. I basically want to use solid state drives in my home network for the following purposes (all machines running 64bit Linux):
My main (pwn3r) desktop computer. This will be my main workstation for work, video encoding, etc. This will be running an Intel 980x 6-core processor, making it a beast. My hard disk configuration will be:
RAID-0: 2 Crucial 128GB Solid State drives for the main operating system(s), essentially providing 256GB of incredibly fast storage.
RAID-1: 2 WD 2TB Hard Disk drives for media and backup storage.
My network firewall computer. This will be running Untangle on my home network for content filtering and firewalling (if that's a word). It will be running an Intel Atom D525 dual core 1.8GHz processor. The hard disk configuration will consist of a single small 16-32GB solid state drive for the operating system and little, if anything, else.
My home HTTP/SFTP/file/backup server. This will be running a dual-core Intel i3 processor; it will be used for some video encoding, as a local DLNA server, a HTTP server for a few largely static files and perhaps some interactive scripts, a SSH server, possibly OpenVPN, and will be used to back up critical files over the network. It will be running RAID-X (where X > 0), meaning RAID-1 or RAID-5 or 6 for fast, redundant data storage, as well as a small SSD for the operating system.
I'm not exactly made of money, and I can't really count on buying four new SSDs every year or so. I can understand replacing them in computer number 1 once a year... maybe, but for the other computers which won't be utilizing the drive very much (ie: they're not power machines), it seems ridiculous to buy new drives this often.
My question is this: can I actually depend on solid state drives like I would on hard disk drives? Also, is this the best economic option? I'd like to save as much power and heat as I can, and solid state drives seem to be the best option at this point.
I have a laptop that I use in three environments with different monitor setups.
1) At work, I have a 1280x1024 second monitor. 2) At home, I have a 1920x1080 second monitor. 3) In meetings and other places I have no second monitor.
Whenever I switch between these setups, which is at least several times each day, I have to manually change the monitor configuration. I use the nvidia-settings tools.
Granted, it only takes a few seconds. Is there a way to make the system smart enough to automatically detect when a monitor is added or removed, know *which* monitor is attached, and reconfigure the resolution and monitor layouts the way I want them?
120 GB - OCZ Vertex3 MAX IOPS 300 GB - Western Digital Velociraptor (10k RPM, about 4ms avg. seek) 2x2TB Samsung Ecogreen F4
The system will be running Ubuntu with the main purpose of doing lots of Java development. Occasionally I have to develop Java in a Windows VM; for this I need fast VMs. I read a lot about SSD wear and maybe it is a bad idea to put the Eclipse workspace on the SSD, because of all the little writes the builds do. Perhaps the workspace (and thus /home) might find a better place on the Velociraptor which is real fast. How should I partition the whole thing to get the most out of it. LVM might be an option, too. Maybe putting a third partition on the SSD for one VirtualBox image. Currently I am thinking:
SSD: 2GB /boot, remaining space for / Velociraptor: LVM spanning the whole drive. 150GB /home Remaining Space for /virtualMachines or something like that Samsung drives (LVM over both or one Volume Group for each? - Latter would be better in terms of data security, because if one drive in a big volume group fails everything is lost)
The system never uses more than about 250GB of HDD at any one time, so I would like to remove /dev/sdd1 and /dev/sdc1 from the LV and then from the machine and leave /dev/sda and /dev/sdb alone.
Does anyone know that if I use the command "system-config-lvm" to reduce the total LVM size to say 580GB, whether all data is preserved (I don't have any way at this stage to backup up 250GB of data, unless I buy more HDDs and that is the whole point of this exercise anyway - remove the two terrabyte drives to be used as backup disks).
Once I am happy that the data is safe, I will use "pvmove" and "vgreduce" to remove both terrabyte drives.
I would like to know the best way to dual boot an already installed Win7 HDD, with adding a second HDD to which I will install Mint9?
I have attempted this in the past with Mint8, but managed to screw it up some how with Mint 8`s Beta Grub2! So bear with me if I am skittish on repeating a "conventional" Grub bootloader selection approach!
This time I would prefer to install Mint9 to it`s own HDD with Win7 disconnected if possible, and installing Mint`s Grub bootloader directly to the Mint HDD installation, just to insure Win7s MBR isn't affected by the Mint9 installation, by keeping each O.S. and it`s bootloader completely separate and apart. Of course then comes the question of how to access my new Mint 9 installation, since reconnecting my Win7 HDD (with it`s MBR) will become the default, with no knowledge of any Mint installation.
Would a third party bootloader such as "Easy BCD" be the way to go? Or am I over complicating what I would like to accomplish here? The main thing is: NOT having to upset my twice installed Win7 installation again!
Currently running Slackware 13.37 64-bit on a notebook and finally have suspend/hibernate after realizing that USB devices, especially USB HDDs, need to be disconnected before suspend/hibernate can work. Problem is I have 2 USB HDDs that are connected to my notebook whenever the notebook is stationary for the extra storage so I'd like to create a script that would get invoked that would stop the suspend/hibernate process if certain partitions are mounted. I know what I would like to accomplish, but I have basic scripting knowledge so I was hoping to get some assistance.
1. script would basically store a user specified string containing devices that are non-USB, ie: NONUSB="/dev/sda /dev/sdb"
2. possibly use /etc/mtab to get a list of what is currently mounted and then remove lines containing whatever is specified in $NONUSB and store those values in $USB
3. run a for loop that executes 'umount' on each token in $USB 3a. stop suspend/hibernate process if 'umount' fails at any point 3b. if 'umount' passes then suspend/hibernate
I've been tasked with setting up a wall board display monitor for our monitoring applications and it's got to look good! I was hoping to use opensuse 11.4 & the KDE desktop effect of the cube and I'm trying to find a way to make the screens rotate in a timed manner.
Is this possible and if not can anyone suggest a good way to switch between multiple displays automatically?
I'm building a new desktop computer, on which I plan to install Debian Squeeze. I'll have a 1 TB SATA hard drive in the system. I'm also considering using two 500 GB external USB drives, but I'm debating about how I want to use them. Running them all separately for 2 TB of space could be a nightmare, with three potential points of failure, so I was thinking of using the two external drives as a backup system instead.
I'm considering linking the two external drives in a RAID 0 array, then linking that array and the internal drive in a RAID 1 array. I would use mdadm software RAID for all of this so I could use individual partitions in the arrays, avoid hardware dependency, and have greater software control. So now is this feasible to do (having a partial RAID 0+1 setup)? Moreover, what kind of performance could I expect from using potentially slow external drives (one of which I know has a very long spin-up time after idle periods) in a mirroring setup with the internal drive?Would I be far better off using a filesystem backup daemon instead?
EDIT:After some more research and brainstorming, I've decided I might just end up using rsync+cron, lsyncd, or DRBD (assuming it can easily make backups locally). I'd probably have to link up the external drives in RAID 0 (or use some filesystem link trickery). But I suppose such a setup would offer greater control, flexibility in disk capacities (the full system isn't so strictly limited to the capacity of the smallest member of the array), and granularity than RAID 0+1 would.I'm still open to thoughts on the mdadm RAID 0+1 solution, but does anyone have any advice on choosing backup software? For some background on my needs, I'll be using this computer as both an everyday desktop and a personal LAMP server (MySQL database files would be included in the backups).
Newbie question here. I just realized that I can tell make to use multiple cores to compile by doing PHP Code:makewhich is just awesome on a quad core with hyperthreading (I just compiled 2.6.33-rc5 in under 5 minutes!) I know aliases are possible, though I've never had much need. What I would like to know now, is if it would be safe to alias make to mean PHP Code:so that by default I use 6 of the procesors when building or if there would be occasions that compiling on multiple processors would be a bad thing
Currently the way tabs on the taskbar look (the bar at the bottom) make it a bit hard to distinguish between them. sometimes they all look like one big clump of text. its quite messy. when you look at something like the windows xp taskbar [URL] its much easier to see between them. I guess its also because the buttons look 3D in that they stick out a bit. Plus the choice of colours used for when you are on a tab helps.
I am running a server at home, and on rare occasion my server will shut down. Is there a logfile I can check to determine whether the server was shutdown due to a script on the computer, a power loss, or someone hitting the power button? I am not by any means a linux guru, but I know enough to get around.
Just wondering, what happens when you have multiple server softwares listening to the same port? will it be able to distinguish which service to use by the protocol information, or is it setting it up for failure?
what to do for lock automatically slackware 13 if not used for n minutes ?What can i do to start automatically the ktorrent (a bittorrent program for linux) on system starts on slackware 13 ?
I working on a project, where a central unit (we call it System Controller ) should talk to several peripheral units on different input ports. The system controller have 4 RS485 ports, 1 RS232, 1 USB A, 1 USB B and a switch with 2 TCP/IP ports. The problem is that when the peripheral unit that is supposed to be connected to one of the two TCP/IP inputs isn't connected (which the system should be able to handle), the software thinks that data from the unit connected to the RS232 port is from the unit that should be connected to the TCP/IP.
The input peripherals are defined as: #define CR_DEVICE "/dev/ttyS1" // ttyS1 #define SL_PORT "/dev/ttyUSB0" #define BO_PORT ""
It is the last one which are supposed to receive from the TCP/IP port, and of course the first one which should receive data from the RS232 port.
I'm playing with apache (and to be quite honest have no idea what I'm doing at this stage!) and currently have a large number of files and folders on the sad little site. One thing that is really bothering me is that files and folders both appear the same. I'm not looking for anything fancy. Something like this is more than adequate. Right now there is simply a dot next to each item.
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'm starting to have A LOT of opened windows in my machine. Sometimes within a project, I have e-mail/task management/personal e-mail/twitter, and a lot of different opened applications/terminals in my Linux workstation.Sometimes it would be interesting to have different workspaces to projects instead of this configuration I have nowadays that are classes of work (bad name, I know, but I think you got the idea).I'm starting to think about using two monitors: one with Corporate Management, Work and Personal. The second monitor is only the development state: each workspace here is about a project being worked on instead of groups of works like before. A workspace may be implementing different classes for example.
My question is: I just want to change to a second monitor using the mouse. I want to still be able to change workspaces in the same monitor using keyboard shortcuts. The keyboard shortcuts wouldn't change monitors, just worskpaces on the same monitor. All the tutorials I read (like this one) only tells how to use multiple monitors but doesn't answer my question about keyboard shortcuts.Does Linux (Ubuntu 10.04 Lucid Lynx or Debian 5.0.5 Lenny) support this envisioned setup (Different workspaces in a way that keyboard workspace switching only works in the current monitor) ? If so, how?I haven't tested this setup, that's why I'm asking. In this question the user says it works exactly how I want it to behave, can someone else confirm it?
change as I salvaged an old old computer and got it back into working order. Windows 7 kills the computer and the media being served is sluggish and slow.
The computer spec are as follows: Asus A8N32-SLI Deluxe Bios 1303 Asus Nvidia En210
I have two HDs, one is a 80gb OS drive(Parallel ATA) and the other is a 1T storage drive (SATA). Well after each reboot they swap between /dev/sda and /dev/sdb, over and over again. One boot the OS is /dev/sda and the next its /dev/sdb, same goes for the second drive. This makes it difficult to setup fstab so it will mount the large storage drive on boot.
I'm having a little trouble with a mdadm RAID array at the moment in which the four hard drives in the array change their /dev/sdb /dev/sdc /dev/sdd/ /dev/sde placement on every reboot.
Recently installed Ubuntu, I've got 2 * 500GB HDDs, mounted and partitioned, but I don't have read/write access to them, only root does.. How can i get access to save files and create folders etc?
I'm looking at setting up a couple automated systems: Here are a few examples:
* Internal accounting system to download and process emails * Public web server to visit
I could put each system on its own separate box -- for example, it's generally good practice to separate anything that external users have access to (such as a webserver) from internal processes such as accounting. Now, rather than dishing out the money for two separate servers, could I get away with just installing new instances of VMWare on the same box for each system?
To give you an idea, these are not large scale computationally sensitive systems. The accounting one is simply downloading and tallying emails, and the latter is just a webserver with maybe 5 hits per day on a good day. I could definitely pick up a new box for say $50, but I wanted to know the general practice of using VMWare on the same box versus two separate boxes.
How to search multiple words in multiple lines, inside a directory including sub-directory? Pls. give easy example. I want to search the files (in /xx folder and all subfolders) that have header.h included and used x() function. I tried $grep -r "header.h" | grep -r "x(" /Folder/subfolder/ > search.log