UnixServerAdmin

Server Administration & Management

Difference between NAS & SAN

S.No. NAS – Network Attached Storage SAN – Storage Area Network
1 It can be mapped as network drives to share on that server. It can be used as a ‘disk in disk’ and volume management utilities.
2 It provides storage and a file system. It provide Block based storage.
3 Protocols –> NFS, CIFS & SMB Protocols –> SCSI, Fibre Channel, iSCSI, ATA over Ethernet & HyperSCSI
4 For small & medium business For large organizations
5 Storage Capacity –> up to few TB Storage Capacity –> Many TB
6 Multiple NAS Devices Single SAN & Multiple high performance disk arrays
7 Specialized knowledge and training is not required to configure and maintain NAS. Specialized knowledge and training is required to configure and maintain SANs.
8 NAS & SAN are not mutually exclusive. A hybrid of SAN and NAS can offer file and block level protocols from the same system to support NAS and SAN.
Advertisements

June 30, 2014 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to remove a Partition Size Larger Than 2TB

Before removing a partition, unmount any partitions on the device and turn off any swap space on the device.

1. Start parted, where /dev/mapper/mpathbp is the device on which to remove the partition :-

# parted /dev/mapper/mpathbp

2. View the current partition table to determine the minor number of the partition to remove :-

(parted) print

3. Remove the partition with the command rm. For example, to remove the partition with minor number 3 :-

(parted) rm 3

4. The changes start taking place as soon as you press Enter, so review the command before committing to it. After removing the partition, use the print command to confirm that it is removed from the partition table. You should also view the output of

# cat /proc/partitions

to make sure the kernel knows the partition is removed. The last step is to remove it from the /etc/fstab file. Find the line that declares the removed partition, and remove it from the file.

July 11, 2013 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to create a Partition Size Larger Than 2TB

We can’t create a Linux partition larger than 2 TB using the fdisk command. The fdisk won’t create partitions larger than 2 TB. This is fine for desktop and laptop users, but on server you need a large partition. For example, you can’t create 3TB or 4TB partition size (RAID based) using the fdisk command. It will not allow you to create a partition that is greater than 2TB.

To solve this problem use GNU parted command with GPT. It supports Intel EFI/GPT partition tables. Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. It is a part of the Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the outdated PC BIOS, one of the few remaining relics of the original IBM PC. EFI uses GPT where BIOS uses a Master Boot Record (MBR).

Linux GPT Kernel Support :- EFI GUID Partition support works on both 32bit and 64bit platforms. You must include GPT support in kernel in order to use GPT. If you don’t include GPT support in Linux kernel, after rebooting the server, the file system will no longer be mountable or the GPT table will get corrupted. By default RHEL/ CentOS comes with GPT kernel support. However, if you are using Debian or Ubuntu Linux, you need to recompile the kernel. Set CONFIG_EFI_PARTITION to y to compile this feature.

1. Find Out Current Disk Size, using the following command :-

# fdisk -l /dev/mapper/mpathbp

Sample outputs:
Disk /dev/mapper/mpathp: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

2. Linux Create 3TB partition size, To create a partition start GNU parted as follows :-

# parted /dev/mapper/mpathbp

Output:
GNU Parted 2.3
Using /dev/mapper/mpathbp
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted)

3. Creates a new GPT disklabel i.e. partition table :-

(parted) mklabel gpt

Sample outputs:
Warning: The existing disk label on /dev/mapper/mpathbp will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted)

4. Next, set the default unit to TB, enter:

(parted) unit TB

5. To create a 3TB partition size, enter:

(parted) mkpart primary 0 0

OR

(parted) mkpart primary 0.00TB 3.00TB

6. To print the current partitions, enter:

(parted) print

Sample outputs:
Model: ATA ST33000651AS (scsi)
Disk /dev/mapper/mpathbp: 3.00TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start   End     Size    File system  Name     Flags
 1      0.00TB  3.00TB  3.00TB  ext4         primary

Quit and save the changes, enter:

(parted) quit

Sample outputs:
Information: You may need to update /etc/fstab.

7. Use the mkfs.ext3 or mkfs.ext4 command to format the file system, enter :-

# mkfs.ext4 /dev/mapper/mpathbp1

8. Type the following commands to mount /dev/mapper/mpathbp1, enter :-

# mkdir /datasrv
# mount   /dev/mpathbp1   /datasrv
# df -hT

9. Edit in /etc/fstab file during Booting Process for Mounting.

# vim /etc/fstab

/dev/mapper/mpathbp1    /backup        ext4    defaults    1    0

Note :- Make sure you replace /dev/mapper/mpathbp1 with actual RAID or Disk name or Block Ethernet device such as /dev/etherd/e0.0. Do not forget to update /etc/fstab, if necessary. Also note that booting from a GPT volume requires support in your BIOS / firmware. This is not supported on non-EFI platforms. We suggest you, boot server from another disk such as IDE / SATA / SSD disk and store data on /datasrv.

July 6, 2013 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | 1 Comment

How to mount SAN Partition to HP DL580 G7 Server In Linux

Before setting up DM-Multipath on your system, ensure that your system has been updated & includes the device-mapper-multipath package.
You set up multipath with the mpathconf utility, which creates the multipath configuration file /etc/multipath.conf.

# mpathconf

a) If the /etc/multipath.conf file already exists, the mpathconf utility will edit it.
b) If the /etc/multipath.conf file does not exist, the mpathconf utility will use the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.       conf file as the starting file.
c) If the /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf file does not exist the mpathconf utility will create the /etc/multipath.      conf file from scratch.

If you do not need to edit the /etc/multipath.conf file, you can set up DM-Multipath for a basic failover configuration by running the following command. This command enables the multipath configuration file and starts the multipathd daemon. If you need to edit the /etc/multipath. conf file before starting the multipathd daemon. use the following procedure to set up DM-Multipath for a basic failover configuration.

1. Run the mpathconf command with the –enable option specified:

# mpathconf –enable
# mpathconf –enable –with_multipathd y
# mpathconf –enable –find_multipaths y
# mpathconf –enable –user_friendly_names y
# /etc/init.d/multipathd reload
# service multipathd restart
#chkconfig multipathd on

Since the value of user_friendly_name is set to yes in the configuration file, the multipath devices will be created as /dev/mapper/mpathn.

If you do not set the find_multipaths configuration parameter to yes, can use the following procedure to modify the multipath configuration file to ignore the local disks when configuring multipath.

2. Determine which disks are the internal disks and mark them as the ones to blacklist. In this example, /dev/sda is the internal disk. Note that as originally configured in the default multipath configuration file, executing the multipath -v2 shows the local disk, /dev/sda, in the
multipath map.

3. Now Search the partition and format it.

# fdisk -l
# fdisk /dev/mapper/mpathbp1
# mkfs.ext4 /dev/mapper/mpathbp1
# mount /dev/mapper/mpathbp1 /backup

4. Edit in /etc/fstab file during Booting Process for Mounting.

# vim /etc/fstab

/dev/mapper/mpathbp1    /backup   ext4   defaults   1   0

5. Edit in /etc/rc.local file after Booting Process for Mounting.

# vim /etc/rc.local

mount /dev/mapper/mpathbp1 /backup

Note: If SAN Raw Partition not show properly, then add following for HP 3PAR SAN storage in /etc/multipath.conf file.

# vim /etc/multipath.conf

defaults {
    polling_interval 10
    max_fds 8192
}

devices {
    device {
        vendor “3PARdata”
        product “VV”
        no_path_retry 18
        features “0”
        hardware_handler “0”
        path_grouping_policy multibus
        getuid_callout “/lib/udev/scsi_id –whitelisted –device=/dev/%n”
        path_selector “round-robin 0”
        rr_weight uniform
        rr_min_io_rq 1
        path_checker tur
        failback immediate
        }
    }

July 1, 2013 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to mount SAN Partition to Dell Poweredge M910 Blade Server In Linux

1. Find-out SAN Card serial Number

# cat /sys/class/fc_host/host*/port_name

2. Edit /etc/multipath.conf file and Comment following Lines

# vim /etc/multipath.conf

=====================
#blacklist {
#        devnode “*”
#}
=====================

Multipathing is managed at the device level. Multipath device can be accessed by /dev/mapper/

3. Restart Multipath Services during Booting Also

# /etc/init.d/multipathd restart

# /etc/init.d/multipathd status

# chkconfig multipathd on

# chkconfig multid on

# chkconfig multipathd –list

4. Now Search the partition and format it.

# fdisk -l
# fdisk /dev/dm-0
# mkfs.ext3 /dev/mapper/mpath1p1
# mount /dev/mapper/mpath1p1 /var/lib/mysql/

5. Querying the multipath IO status outputs the current status of the multipath maps

# multipath -l

6. find out WWIDs using following command

# multipath -v2 -d

7. Edit in /etc/rc.local file during Booting Process for Mounting.

# vim /etc/rc.local

===================================
mount /dev/mapper/mpath1p1 /var/lib/mysql/
===================================

Note: Don’t entry in /etc/fstab file for SAN Mounting, Because during booting Process, System will be goes to Maintainence Mode.

January 21, 2012 Posted by | SAN, Tips & Tricks, Unix/Linux | , , , | Leave a comment