New luns without reboot

I manage to assign 6 LUNS to my RedHat box and I didn’t wanted to reboot it in order to start partitioning new disks:

This was the initial situation:

[root@server ~]# fdisk -l | grep ^Disk
Disk /dev/cciss/c0d0: 299.9 GB, 299966445568 bytes

Executing this little for:

[root@server ~]# for i in `ls /sys/class/scsi_host/` ; do echo "- - -" > /sys/class/scsi_host/$i/scan; done

The situation became this:

[root@server ~]# fdisk -l | grep ^Disk
Disk /dev/cciss/c0d0: 299.9 GB, 299966445568 bytes
Disk /dev/sda: 499 MB, 499974144 bytes
Disk /dev/sdb: 499 MB, 499974144 bytes
Disk /dev/sdc: 599.9 GB, 599999971328 bytes
Disk /dev/sdd: 1024.0 GB, 1024000000000 bytes
Disk /dev/sde: 86.5 GB, 86599467008 bytes


Finding real MAC addresses for bonding NICs on RedHat

I spent some time trying to find out the real MAC addresses for all NICs on RedHat AS3 and RedHat 5.3 since the HWADRR entry was deleted on all the ifcfg-ethX original files.

The ifconfig tool displays the real mac for the ACTIVE nic on the bond:

# ifconfig -a|grep HW
bond0     Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
bond1     Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2
eth0      Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
eth1      Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
eth2      Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2
eth3      Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2

ethtool, dmidecode, etc, doesn’t report real MACs.

So the solutions is on these files:



$ cat /proc/net/bonding/bond0

bonding.c:v2.4.1 (September 15, 2003)
Bonding Mode: fault-tolerance (active-backup)

Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Multicast Mode: active slave only

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:50:8b:fb:5e:db

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:50:8b:fb:5e:da

Create big partitions on Linux

How to create a big (2.7 TB) partition with Redhat Linux?

Using fdisk and a MSDOS partition table won’t let you allocate all cylinders to your primary partition… if you encounter this problem this is the way I did it:

# parted /dev/XXX
(parted)  mklabel
New disk label type?  [gpt]? GPT
(parted) mkpart primary 0 2764G

Doing that way I created ad EFI partition table on my disk /dev/XXX and a primary partion with 2764Gigabytes on it.

Now you can use mkfs and mount it or manage that disk with LVM