What to do if you have an old LVM with the same VolGroup?
Using a liveCD. I am using Ubuntu. Must have internet access.
unplug the new drive(s) and leave the old drive that you want to recover files from.
Boot it up with the liveCD.
If you're like me who does not like sudo, do this:
# sudo passwd (to change to whatever password you want for root).
# su - (to get in as root).
# apt-get install lvm2
# vgscan
------------------
Found volume group "VolGroup00" using metadata type lvm2
------------------
# vgrename VolGroup00 VolGroupRecover
Shutdown your machine. Plug everything back. When you're back as root:
# vgscan
------------------
Found volume group "VolGroupRecover" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
------------------
That's what you want to see. Now reactivate them.
# vgchange -a y
# lvscan
You should see the ACTIVE /dev/VolGroupRecover/LogVol--
Well, mount that one!
Tuesday, July 7, 2009
Monday, June 22, 2009
Monitoring RAID on Linux
So you setup RAID on Linux and got it to work the way you wanted. Now, you're wondering how would you know if one of your drive went bad. You're thinking that the light on drive tray will blink. Well, are you sure it will blink?
Most of my servers are using Adaptec so here is what I did.
Google: download Adaptec Storage Manager
Pick a page that linked to Adaptec site. I downloaded asm_linux_x86_v5_30_17509.rpm
rpm -ivh asm_linux_x86_v5_30_17509.rpm
Don't run this: /usr/StorMan/StorMan.sh (I am using SSH so that won't work since it's a GUI).
I ran this: /usr/StorMan/arcconf
If it's complaining about libstdc++.so.5
Fix: export LD_PRELOAD=/usr/StorMan/libstdc++.so.5
Run arcconf again and you'll see the howto
I ran the line below for my card:
/usr/StorMan/arcconf GETCONFIG 1
Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
Controller Status : Optimal
Channel description : SATA
Controller Model : SMC Adaptec 2020SA
Controller Serial Number : 267647
Physical Slot : 3
Installed memory : 64 MB
Copyback : Disabled
Background consistency check : Disabled
Automatic Failover : Enabled
Defunct disk drive count : 0
Logical devices/Failed/Degraded : 4/0/0
--------------------------------------------------------
Controller Version Information
--------------------------------------------------------
.
.
.
... and a whole lot more RAID info.
Most of my servers are using Adaptec so here is what I did.
Google: download Adaptec Storage Manager
Pick a page that linked to Adaptec site. I downloaded asm_linux_x86_v5_30_17509.rpm
rpm -ivh asm_linux_x86_v5_30_17509.rpm
Don't run this: /usr/StorMan/StorMan.sh (I am using SSH so that won't work since it's a GUI).
I ran this: /usr/StorMan/arcconf
If it's complaining about libstdc++.so.5
Fix: export LD_PRELOAD=/usr/StorMan/libstdc++.so.5
Run arcconf again and you'll see the howto
I ran the line below for my card:
/usr/StorMan/arcconf GETCONFIG 1
Controllers found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
Controller Status : Optimal
Channel description : SATA
Controller Model : SMC Adaptec 2020SA
Controller Serial Number : 267647
Physical Slot : 3
Installed memory : 64 MB
Copyback : Disabled
Background consistency check : Disabled
Automatic Failover : Enabled
Defunct disk drive count : 0
Logical devices/Failed/Degraded : 4/0/0
--------------------------------------------------------
Controller Version Information
--------------------------------------------------------
.
.
.
... and a whole lot more RAID info.
Thursday, January 15, 2009
EXT4
I've been hearing all the hypes about ext4 and how fast it boots up your OS so I am about to try it out. Linux kernel 2.6.28 has it in there.
make menuconfig
make
make modules
make modules_install
make install
Well, that's nice. 'make install' did everything for me in grub. I thought I will have to do it the manual way back in the 2.4.xx days.
Hmm I need the latest e2fsprogs (1.41.3). Downloaded and compiled and there it is, mkfs.ext4.
Trying it on a spare drive:
mkfs.ext4 -j /dev/hdb1
mount -t ext4 /dev/hdb1 /mnt/hdb1/
It mounted w/o any prpblem. I'll see if this is any better than ext3.
Well, that's it for now.
-foo
make menuconfig
make
make modules
make modules_install
make install
Well, that's nice. 'make install' did everything for me in grub. I thought I will have to do it the manual way back in the 2.4.xx days.
Hmm I need the latest e2fsprogs (1.41.3). Downloaded and compiled and there it is, mkfs.ext4.
Trying it on a spare drive:
mkfs.ext4 -j /dev/hdb1
mount -t ext4 /dev/hdb1 /mnt/hdb1/
It mounted w/o any prpblem. I'll see if this is any better than ext3.
Well, that's it for now.
-foo
Monday, February 18, 2008
New discoveries
Virtualization!
Not sure if that's a real word but it seems that everyone is going virtual lately. I've been enjoying VMware for the past few years and lately just found out VirtualBox (http://www.virtualbox.org/).
VirtualBox seems much faster than VMware. There seems to be a minor problem with NAT in XP host environment and Ubuntu as guest. Well, it turned out that it was not their fault. It's me who did not RTFM. I wasn't able to ping out so I thought this must be some routing problems. It wasn't. It was the DNS entry that Ubuntu placed it under the default setting. I changed the DNS entry to use our DNS servers by editing /etc/resolv.conf. That did it.
Sun just bought VirtualBox. Hopefully, they will continue improve this little app. I am enjoying it.
Thinstall is another one(http://www.thinstall.com). This one takes you to another level. Basically, your application will run in a virtual environment of its own, independent from the OS that it's running on top.
Say, you want to run Outlook under Thinstall. You basically create your own executable of Outlook and run it on either Vista, XP, or Win2K without any problem. It doesn't even care about licensing. I bet this will go away soon. VMware is now in control of Thinstall.
-foo
Not sure if that's a real word but it seems that everyone is going virtual lately. I've been enjoying VMware for the past few years and lately just found out VirtualBox (http://www.virtualbox.org/).
VirtualBox seems much faster than VMware. There seems to be a minor problem with NAT in XP host environment and Ubuntu as guest. Well, it turned out that it was not their fault. It's me who did not RTFM. I wasn't able to ping out so I thought this must be some routing problems. It wasn't. It was the DNS entry that Ubuntu placed it under the default setting. I changed the DNS entry to use our DNS servers by editing /etc/resolv.conf. That did it.
Sun just bought VirtualBox. Hopefully, they will continue improve this little app. I am enjoying it.
Thinstall is another one(http://www.thinstall.com). This one takes you to another level. Basically, your application will run in a virtual environment of its own, independent from the OS that it's running on top.
Say, you want to run Outlook under Thinstall. You basically create your own executable of Outlook and run it on either Vista, XP, or Win2K without any problem. It doesn't even care about licensing. I bet this will go away soon. VMware is now in control of Thinstall.
-foo
Friday, December 7, 2007
Linux Desktops
I've ran into too many articles about Linux desktop lately. They often named - Is this the year of Linux?, The future of Linux desktop, Linux desktop versus Windows, Dumping Vista for Linux, etc...
I am making a living using Linux. I compile, build, hack Linux almost everyday. Don't get me wrong. I love Linux. It's stable, configurable, easy to admin. I am just tired of hearing about Linux desktops.
To be honest, I don't really care about the future of Linux desktop. Maybe I am selfish. I guess I am in a comfort zone with Linux running on the server end. I don't like Linux loosing focus. That's how I also feel about the huge number of distributions out there. Why? Why wasting your time on that but instead of focus on just a few distributions?
Going to the desktop direction, to me, is the popularity contest. I rather stay out of it. I enjoy the Apple vs Microsoft commercials.
I am making a living using Linux. I compile, build, hack Linux almost everyday. Don't get me wrong. I love Linux. It's stable, configurable, easy to admin. I am just tired of hearing about Linux desktops.
To be honest, I don't really care about the future of Linux desktop. Maybe I am selfish. I guess I am in a comfort zone with Linux running on the server end. I don't like Linux loosing focus. That's how I also feel about the huge number of distributions out there. Why? Why wasting your time on that but instead of focus on just a few distributions?
Going to the desktop direction, to me, is the popularity contest. I rather stay out of it. I enjoy the Apple vs Microsoft commercials.
Monday, August 27, 2007
Network monitoring
Today, I ran into a nice app for network monitoring, iftop. It is now a new member in my favorite network traffic monitoring list:
iptraf
airtraf
airsnort
ettercap
ntop
iftop
etherape
ethereal
iptraf
airtraf
airsnort
ettercap
ntop
iftop
etherape
ethereal
Tuesday, July 24, 2007
Email blacklists
I've been using blaklists (spamhaus, spamcop, etc...)for a while to block messages from spammers. Lately, whenever I am running my server using these dnsbl with sendmail, I am automatically get subscribed to spamhaus and other blacklists. This makes me think that spammers are finding a way to automatically subscribed to these blacklists and forcing me to remove it from my sendmail.cf so we can start sending out our emails.
I am looking for a way to make these "rejected" messages to go to /dev/null but I haven't been able to mess with sendmail.cf to get it to work.
Frustrated...
I am looking for a way to make these "rejected" messages to go to /dev/null but I haven't been able to mess with sendmail.cf to get it to work.
Frustrated...
Subscribe to:
Posts (Atom)