≡ Menu

partition

FAQ Updates: Dec/22/2011

Our FAQ section is updated in last few days with new howto:

Make the most of nixCraft FAQ Section

Get intimated about our new howtos / faqs as soon as it is released via RSS feed OR follow us on twitter OR join our 16k+ facebook fans for more tips and news about Linux.

Microsoft provides iSCSI software initiator which enables connection on following operating system:
a) Windows XP
b) Windows Server 2000
c) Windows Server 2003 etc.

How do I install MS ISCSI Initiator?

Visit Microsoft download center to grab iSCSI initiator software. Download and install the Windows ISCSI initiator.

Configuration

Once installed click on Start > Programs > Microsoft iSCSI Initiator

Select the Discovery tab.

Look for Target Portals

Click on the Add button

Type your ISCSI_TARGET_HOST_OR_IP into the IP address or DNS name input box

Set port to 3260

Next, click on the Advanced tab

Select General tab

Select CHAP logon information

Type your username into the Username box

Type your password into the Target secret box

Save changes by pressing OK > OK

Select the Targets tab

Select the new target from the Targets selection list.

Click on the Log on... button

Select the Automatically restore this connection when the system boots check box

Click on the Advanced button.

Select General tab enable CHAP logon information by selecting the check box. Fill up the details.

Save all changes.

How do I formation volume under Windows server?

Open Computer Management

Select Disk Management from the Storage

You should see a disk in the right pane that labeled as "Unknown" and "Not Initialized".

Right click on the disk and select Initialize Disk

Click OK button.

Right click on the partition information box on the right hand side of the disk information box and select the New Partition,,, button.

Now just follow the partition wizard and format the disk.

The Ubuntu project has released beta version 8.04 and available for download from the official project web site.
The Ubuntu developers are moving very quickly to bring you the absolute latest and greatest software the open source community has to offer. New feature includes:

+ GNOME 2.22

+ Linux kernel 2.6.24.

+ Firefox 3 beta

+ PulseAudio

+ Vinagre VNC client

+ Brasero CD/DVD burning application

+ There is a new installation option for Windows users. Wubi allows users to install and uninstall Ubuntu like any other Windows application. It does not require a dedicated partition, nor does it affect the existing bootloader, yet users can experience a dual-boot setup almost identical to a full installation.

The final stable version will be released in April 2008. Download cutting edge version from official mirror.

Shell Script: Create Linux Bootable USB Sticks

This may come handy, from the project page:

Mk-boot-usb is a perl script to create multiple-bootable usb sticks (usb keys / usb flash drives). It wipes out an entire usb stick, partitions it, creates file systems on it, installs grub, and installs a minimal linux on it. Mk-boot-usb is meant to speed up and lower the barrier of entry for creating bootable usb sticks. The usb stick will immediately become bootable (using the minimal linux), and more useful distributions can then be installed into other partitions manually simply by (1) copying any Live CD into each partition (2) modifying grub's configuration file.

=> Mk-boot-usb: a Script to Create Multiple-Bootable USB Sticks

Related: How to Create Bootable Linux CD

How do you use Windows True Type fonts in Linux or how do you install Windows TrueType fonts in Linux? - A typical newbie question.

Fonts are very important. When you migrate from Windows XP to Linux you may miss Truetype font. TrueType is a font standard developed by Apple Computer. By 1991 Microsoft had built TrueType into the Windows 3.1 operating system. The FreeType project provides TrueType under Linux. So let us see how to backup your Windows TrueType fonts and install them in Linux.

It is quite easy to add Windows True Type fonts in Linux. First make sure you copy Windows fonts on USB pen (usually located in C:\Windows\Fonts directory) or just mount windows NTFS/FAT partition. You can copy selected or all fonts from C:\Windows\Fonts directory.

Linux Gnome desktop

=> Open your default file manger or double click Computer icon on Gnome desktop
=> Type url:
fonts://
Alternatively, select Open Location? from file menu and type
fonts://
=> Once window open, just drag and drop fonts into this new windows from USB pen or mounted partition. Don't forget to restart application or just logout and login again.

Novell Suse Linux

  • Novell Suse Linux has Font installer.
  • Open Font installer from System administration option located on gecko menu > Personal settings
  • Provide root password when prompted
  • Click on Add fonts button
  • Now install fonts from USB pen or mounted Windows Partition
  • Save changes
  • Don't forget to restart your desktop (just logout and login again)

LVM is an implementation of a logical volume manager for the Linux kernel. The biggest advantage is that LVM provides the ability to make a snapshot of any logical volume.

In a production environment many users access the same file (file is open) or database. Suppose you start backup process when a file is open, you will not get correct or updated copy of file i.e. inconsistent backup (see accurate definition of inconsistent backup).

Read-only partition - to avoid inconsistent backup

You need to mount partition as read only, so that no one can make changes to file and make a backup:
# umount /home
# mount -o ro /home
# tar -cvf /dev/st0 /home
# umount /home
# mount -o rw /home

As you see, the draw back is service remains unavailable during backup time to all end users. If you are using database then shutdown database server and make a backup.

Logical Volume Manager snapshot to avoid inconsistent backup

This solution will only work if you have created the partition with LVM. A snapshot volume is a special type of volume that presents all the data that was in the volume at the time the snapshot was created. This means you can back up that volume without having to worry about data being changed while the backup is going on, and you don't have to take the database volume offline while the backup is taking place.

# lvcreate -L1000M -s -n dbbackup /dev/ops/databases

Output:

lvcreate -- WARNING: the snapshot must be disabled if it gets full
lvcreate -- INFO: using default snapshot chunk size of 64 KB for "/dev/ops/dbbackup"
lvcreate -- doing automatic backup of "ops"
lvcreate -- logical volume "/dev/ops/dbbackup" successfully created

Create a mount-point and mount the volume:
# mkdir /mnt/ops/dbbackup
# mount /dev/ops/dbbackup /mnt/ops/dbbackup

Output:

mount: block device /dev/ops/dbbackup is write-protected, mounting read-only

Do the backup
# tar -cf /dev/st0 /mnt/ops/dbbackup

Now remove it:
# umount /mnt/ops/dbbackup
# lvremove /dev/ops/databases

Please note that LVM snapshots cannot be used with non-LVM filesystems i.e. you need LVM partitions. You can also use third party commercial proprietary (see below for discussion) or GPL backup solutions/software.

MySQL Backup: Using LVM File System Snapshot

Login to your MySQL server:
# mysql -u root -p
At mysql prompt type the following command to closes all open tables and locks all tables for all databases with a read lock until you explicitly release the lock by executing UNLOCK TABLES. This is very convenient way to get backups if you have a file system such as Veritas or Linux LVM or FreeBD UFS that can take snapshots in time.
mysql> flush tables with read lock;
mysql> flush logs;
mysql> quit;

Now type the following command (assuming that your MySQL DB is on /dev/vg01/mysql):
# lvcreate --snapshot –-size=1000M --name=backup /dev/vg01/mysql
Again, login to mysql:
# mysql -u root -p
Type the following to release the lock:
mysql> unlock tables;
mysql> quit;

Now, move backup to tape or other server:
# mkdir -p /mnt/mysql
# mount -o ro /dev/vg01/backup /mnt/mysql
# cd /mnt/mysql
# tar czvf mysql.$(date +"%m-%d%-%Y).tar.gz mysql
# umount /mnt/tmp
# lvremove -f /dev/vg01/backup

If you are using a Veritas file system, you can make a backup like this (quoting from the official MySQL documentation):

Login to mysql and lock the tables:
mysql> FLUSH TABLES WITH READ LOCK;
mysql> quit;

Type the following at a shell prompt
# mount vxfs snapshot
Now UNLOCK TABLES:
mysql> UNLOCK TABLES;
mysql> quit;

Copy files from the snapshot and unmount the snapshot.

Further reading:

Linux comes with the system utility fsck ("file system check") for checking the consistency of a file system. This quick post explains how to use fsck to fix error.
[click to continue…]