Clean up afterwards /etc/opt/omni, /var/opt/omni and /opt/omni on HP/UX.
On
Windows, remove ?:\program files\omniback and HKLM\Software\Hewlett-Packard\Omniback
ege
11 Ocak 2011 Salı
10 Ocak 2011 Pazartesi
grep reverse search (opposite)
grep -v search-not-this-one
Extend LVM Disk Space With New Hard Disk
Copyright © Walker 27 Feb 2007 23:56
This is a step-by-step guide used to extend logical volume group disk space, that’s configured under LVM version 1.x of Redhat Enterprise Linux AS 3. Although, this guide has also been used to extend LVM disk space with a new SCSI hard disk, that’s configured with LVM version 2.x in Debian Sarge 3.1.So, it’s good enough to serve as a reference for Linux users, who plan to extend LVM disk space in Linux distributions other than Redhat and Debian Linux.
Although it’s not necessary, it’s advised to perform full file system backup before carry out this exercise!
The most risky step is to resize file system that resides in a LVM logical volume. Make sure the right file system resizer tool is used. If you’re usingresize2fs
to resize a Reiserfs file system, I guess you’ll know how bad will be the consequences.
Apparently, you’ll needresize_reiserfs
to resize a Reiserfs file system, which is part of thereiserfsprogs
package.
Steps to extend /home file system that mounts on logical volume /dev/vg0/lvol1 of volume group vg0, by using a new 36GB SCSI hard disk added to RAID 0 of HP Smart Array 5i Controller.
1) Log in as root user and type
init 0
to shutdown Redhat Enterprise AS 3 Linux.2) Add in the new 36GB SCSI hard disk. Since HP Smart Array 5i is configure for RAID 0, it’s fine to mix hard disks of different capacity, except that hard disk speed must be the same! A mix of 10K and 15K RPM hard disks might cause Redhat Enterprise Linux fails to boot up properly.
Normally, HP Smart Array 5i Controller will automatically configure new hard disk as a logical drive for RAID 0. If not, press F8 on boot up to get in HP Smart Array 5i Controller setup screen and manually create logical drive as part of RAID 0.
How to tell if new hard disk is not configured as logical drive for RAID 0?
Physically, the hard disk green light should be on or blinking to indicate that it’s online to RAID system.
From OS level, 3rd hard disk in RAID 0 of HP Smart Array 5i Controller is denoted as /dev/cciss/c0d2. So, typefdisk /dev/cciss/c0d2
at root command prompt. If an error message Unable to open /dev/cciss/c0d2 or alike is returned, it means that new hard disk is not online to RAID system or Redhat Linux.
3) Boot up Redhat Enterprise Linux into multi-user mode and confirm it’s working properly. This step is not necessary, but it’s a good practice to prove that the server is working fine after each change has been made, be it a major or minor change.
4) Type
init 1
at root command prompt to boot into single user mode. Whenever possible, boot into single user mode for system maintenance as to avoid inconsistency or corruption.5) At the root command prompt, type
fdisk /dev/cciss/c0d2
to create partition for the 3rd SCSI hard disk added to RAID 0. Each hard disk needs at least one partition (maximum 4 primary partitions per hard disk) in order to use the new hard disk in a Linux system.
6) While at the fdisk command prompt, type
m
to view fdisk command options.7) Type
n
to add a new partition, followed by p
to go for primary partition type.8) Type
1
to create the first partition. Press ENTER to accept first cylinder default as 1, and press ENTER again to accept the default value for last cylinder, which is essentially create single partition that use up all hard disk space.9) Type
t
to change the partition system id, or partition type. As there is only one partition, partition 1 is automatically selected for action. Type L
to list all supported partition type. As shown in partition type listing, type 8e
to set partition 1 as Linux LVM partition type.10) Type
p
to confirm partition /dev/cciss/c0d2p1 has been created in partition table. Type w
to write the unsaved partition table of changes to hard disk and exit from fdisk command line.11) Type
df -hTa
to confirm /home file system type, that’s mounts on logical volume /dev/vg0/lvol1. For this case, it’s an ext3 file system type.12) Type
umount /home
to un-mount /home file system from Redhat Enterprise Linux.13) Next, type LVM command
pvcreate /dev/cciss/c0d2p1
to create a new LVM physical volume on the new partition /dev/cciss/c0d2p1.
14) Now, type another LVM command
vgextend vg0 /dev/cciss/c0d2p1
to extend LVM volume group vg0, with that new LVM physical volume created on partition /dev/cciss/c0d2p1.
15) Type
pvscan
to display physical volumes created in Linux LVM system, which is useful to answer questions such as “How many physical volume created in volume group vg0?”, “How much of free disk space left on each physical volume?”, “How do I know which physical volume should be used for a logical volume?” “Which physical volume has free disk space for used with a logical volume?”, etc.Sample output of
pvscan
command:ACTIVE PV “/dev/cciss/c0d0p4″ of VG “vg0″ [274.27GB / 0 free]
ACTIVE PV “/dev/cciss/c0d1p1″ of VG “vg0″ [33.89GB / 0 free]
ACTIVE PV “/dev/cciss/c0d2p1″ of VG “vg0″ [33.89 GB / 33.89 GB free]
total: 3 [342.05 GB] / in use: 3 [342.05 GB] / in no VG: 0 [0]
Alternative, type
vgdisplay vg0 | grep PE
to confirm that new physical volume has been added to volume group vg0. Take note of Free PE / Size, 35GB in this case, that’s free disk space added by new physical volume in volume group vg0.16) Execute LVM command
lvextend -L +33G /dev/vg0/lvol1 /dev/cciss/c0d2p1
to extend the size of logical volume /dev/vg0/lvol1 of volume group vg0 by 33GB on physical volume /dev/cciss/c0d2p1.
17) Now, the most risky steps to start. Type this command
e2fsck -f /dev/vg0/lvol1
to force ext3 file system check on /dev/vg0/lvol1. It’s a must to confirm file system is in good state, before implement any changes on it.
CAUTION – Utility
e2fsck
is only used to check EXT file system such as ext2 and ext3, and not other file system such Reiserfs file system!Once the ext file system check completes without errors or warnings, type command
resize2fs /dev/vg0/lvol1
to resize EXT3 file system of /home, that mounts on logical volume /dev/vg0/lvol1, until it takes up all free disk space added to /dev/vg0/lvol1.
CAUTION – Utility
resize2fs
is only used to resize EXT file system such as ext2 and ext3, and not other file systems such as Reiserfs file system!
Bothe2fsck
andresize2fs
utilities are part of e2fsprogs package. And both utilities takes some minutes to complete, depends on the size of target file system.
If everything alright, type
mount /home
to re-mount /home file system. Next, type df -h
to confirm that /home file system has been extended successfully.
9 Ocak 2011 Pazar
smb.conf (works fine for outlook)
[global]
workgroup = xxxxx
server string =
dns proxy = no
log file =
max log size = 0
syslog = 0
panic action = /usr/share/samba/panic-action %d
; encrypt passwords = yes
; passdb backend = tdbsam
obey pam restrictions = yes
; unix password sync = no
passwd program =
passwd chat =
; pam password change = no
map to guest = bad user
usershare allow guests = yes
wins server = x.x.x.x
; password server = *
security = domain
; guest ok = no
; guest account = nobody
workgroup = xxxxx
server string =
dns proxy = no
log file =
max log size = 0
syslog = 0
panic action = /usr/share/samba/panic-action %d
; encrypt passwords = yes
; passdb backend = tdbsam
obey pam restrictions = yes
; unix password sync = no
passwd program =
passwd chat =
; pam password change = no
map to guest = bad user
usershare allow guests = yes
wins server = x.x.x.x
; password server = *
security = domain
; guest ok = no
; guest account = nobody
7 Ocak 2011 Cuma
Join a Ubuntu machine to a Windows domain
https://help.ubuntu.com/9.10/serverguide/C/likewise-open.html
I had been hoping to accomplish this for some time now. At work we work under a Windows domain and I have a Ubuntu test machine that I have been hoping to join to that domain. Finally, thanks to Likewise-Open5, it happened. And, believe it or not, it’s not all that difficult.
Oh sure you can use Samba to take this task on, but you better be prepared for some serious configuration and work. With Likewise-Open5 that job is made significantly easier. Now I understand that with the upcoming major release of Samba, joining a domain should be much simpler. But with the tools we have now, Likewise-Open5 is your best bet. In this article I will show you how to join a Windows domain using a Ubuntu box.
Installation
Installing Likewise-Open5 is simple. Although there is a GUI that comes along with Likewise-Open5, we are going to install and use the CLI tool. Why? It’s more reliable. So for installation open up a terminal window and issue the following command:
sudo apt-get install likewise-open5
That command should pick up all the necessary dependencies and have you ready to join i no time.
What you need
In order to connect to your domain, you will need the following information:
Joining
To join the domain, the command you want to use looks like this:
sudo domainjoin-cli join DOMAIN USER
Where DOMAIN is the domain you want to join and USER is the username that has rights to join said domain.
You will be prompted for your password. Once you have authenticated, you have officially joined that domain.
Now, let’s set Likewise-Open to use this domain as the default domain. This will mean you can actually log into your domain from your Ubuntu login screen. In other words, you will automatically be joined upon boot. To do this open up the file /etc/samba/lwiauthd.conf and add the following line:
windbind use default domain = yes
Now, restart the daemon with the command /etc/init.d/likewise-open restart and all is well.
Leaving
If you want to leave the domain, just issue the following command:
sudo domainjoin-cli leave
Sudo
One thing you will notice is that, when you have logged in under the domain, your user has no sudo rights. In order to get around this you need to log into your machine as your standard user and edit your /etc/sudoers file. But at this point you need one more bit of information. You need to know the Group your user is a member of in Active Directory. Most likely this is Users. If that doesn’t work, contact your IT department and they should be able to tell you.
In the /etc/sudoers file, look for this line:
#Members of the Admin group may gain root privileges and do the following:
and append the following under it:
%DOMAIN\\GROUP ALL=(ALL) ALL
Where DOMAIN is the actual domain and GROUP is the group your user belongs to. Now if you log out and log back in your domain user should have sudo rights.
Final thoughts
Linux has come a long, long way. And I have confidence this process will soon become a part of either the installation or be included as an easy to use wizard. But for now, it’s no longer a harrowing experience to join a Windows domain.
I had been hoping to accomplish this for some time now. At work we work under a Windows domain and I have a Ubuntu test machine that I have been hoping to join to that domain. Finally, thanks to Likewise-Open5, it happened. And, believe it or not, it’s not all that difficult.
Oh sure you can use Samba to take this task on, but you better be prepared for some serious configuration and work. With Likewise-Open5 that job is made significantly easier. Now I understand that with the upcoming major release of Samba, joining a domain should be much simpler. But with the tools we have now, Likewise-Open5 is your best bet. In this article I will show you how to join a Windows domain using a Ubuntu box.
Installation
Installing Likewise-Open5 is simple. Although there is a GUI that comes along with Likewise-Open5, we are going to install and use the CLI tool. Why? It’s more reliable. So for installation open up a terminal window and issue the following command:
sudo apt-get install likewise-open5
That command should pick up all the necessary dependencies and have you ready to join i no time.
What you need
In order to connect to your domain, you will need the following information:
- Domain name: This is the domain name (FQDN) of the domain you want to join.
- DNS: Although you may be tempted to use something like OpenDNS, you will want to use the DNS used on your domain.
- Access: You will need to have an account that is able to join your domain.
Joining
To join the domain, the command you want to use looks like this:
sudo domainjoin-cli join DOMAIN USER
Where DOMAIN is the domain you want to join and USER is the username that has rights to join said domain.
You will be prompted for your password. Once you have authenticated, you have officially joined that domain.
Now, let’s set Likewise-Open to use this domain as the default domain. This will mean you can actually log into your domain from your Ubuntu login screen. In other words, you will automatically be joined upon boot. To do this open up the file /etc/samba/lwiauthd.conf and add the following line:
windbind use default domain = yes
Now, restart the daemon with the command /etc/init.d/likewise-open restart and all is well.
Leaving
If you want to leave the domain, just issue the following command:
sudo domainjoin-cli leave
Sudo
One thing you will notice is that, when you have logged in under the domain, your user has no sudo rights. In order to get around this you need to log into your machine as your standard user and edit your /etc/sudoers file. But at this point you need one more bit of information. You need to know the Group your user is a member of in Active Directory. Most likely this is Users. If that doesn’t work, contact your IT department and they should be able to tell you.
In the /etc/sudoers file, look for this line:
#Members of the Admin group may gain root privileges and do the following:
and append the following under it:
%DOMAIN\\GROUP ALL=(ALL) ALL
Where DOMAIN is the actual domain and GROUP is the group your user belongs to. Now if you log out and log back in your domain user should have sudo rights.
Final thoughts
Linux has come a long, long way. And I have confidence this process will soon become a part of either the installation or be included as an easy to use wizard. But for now, it’s no longer a harrowing experience to join a Windows domain.
Kaydol:
Kayıtlar (Atom)