Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add a new hard disk to TurboLinux11

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to add a new hard disk in TurboLinux11". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to add a new hard disk in TurboLinux11".

I. hard disk identification of Linux

After 2.6kernel, linux will create the corresponding device file under / dev/ for the identified hardware devices. Such as:

Sda represents the first SCSI hard disk. HDA represents the first IDE hard drive (that is, connected to the Master port of the first IDE interface). Scd0 represents the first USB CD-ROM drive.

When a new hard drive is added, the corresponding device files are generated in the / dev directory. Cciss's hard disk is an exception, its

The device file is in the / dev/cciss/ directory. Generally, you can use the "fdisk-l" command to list the hard drives currently connected to the system.

Device and partition information. If there is no partition information for the new hard disk, only the hard disk size information is displayed.

two。 Add a new hard drive to the linux system

Here's how to add a 10 G hard disk to the Slave interface of the first IDE port on GTES 11.

After installing the hard drive, boot into Turbolinux. Log in as root.

Execute the fdisk-l command to display the hard disk device of the current system.

[root@g11-64-1 ~] # fdisk-lDisk / dev/hda: 21.4GB, 21474836480 bytes255 heads, 63 sectors/track 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 89 610470 82 Linux swap / Solaris/dev/hda3 90 2610 20249932 + 83 LinuxDisk / dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk / dev/hdb doesn't contain a valid partition table [root@g11-64-1] #

Shows that the hdb has no partition information and the size is 10G.

Use the fdisk command to partition hdb.

[root@g11-64-1] # fdisk / dev/hdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.The number of cylinders for this disk is set to 1305.There is nothing wrong with that, but this is larger than 1024 software that runs at boot time and could in certain setups cause problems with:1) software that runs at boot time (e.g.old versions of LILO) 2) booting and partitioning software from other OSs (e.g.DOS FDISK) OS/2 FDISK) Warning: invalid flag 0x0000 of partition table 4 will be corrected by w (rite) input: n means to create a new partition. Command (m for help): nCommand action e extended p primary partition (1-4) input: P means to create an original partition. PPartition number (1-4): 1 input: 1 means the partition number is 1.First cylinder (1-1305) Default 1): enter: enter means to use the default starting column number. Using default value 1Last cylinder or + size or + sizeM or + sizeK (1-1305, default 1305): enter: enter means to use the default ending column number. That is, this partition uses the entire hard disk space. Using default value 1305Command (m for help): W enter: W save disk, exit fdisk.The partition table has been altered calling ioctl () to re-read partition table.Syncing disks.

Then use the fdisk-l command to check the partition.

[root@g11-64-1 ~] # fdisk-lDisk / dev/hda: 21.4GB, 21474836480 bytes255 heads, 63 sectors/track 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hda1 * 1 13 104391 83 Linux/dev/hda2 14 89 610470 82 Linux swap / Solaris/dev/hda3 90 2610 20249932 + 83 LinuxDisk / dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/hdb1 1 1305 10482381 83 Linux

Shows that there is a hdb1 partition on / dev/hdb, which is in linux format.

After the partition, the partition needs to be formatted.

[root@g11-64-1] # mkfs.ext3 / dev/hdb1mke2fs 1.39 (29-May-2006) Filesystem label=OS type: LinuxBlock size=4096 (log=2) Fragment size=4096 (log=2) 1310720 inodes, 2620595 blocks131029 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=268435456080 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks: 3276898304,163840,229376,294912,819200884736, 1605632Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 39 mounts or180 days Whichever comes first. Use tune2fs-c or-i to override.

Hang the new partition on / mnt/hdb1.

[root@g11-64-1 ~] # mkdir / mnt/hdb1 [root@g11-64-1 ~] # mount / dev/hdb1 / mnt/hdb1 [root@g11-64-1 ~] # df-hFilesystem Size Used Avail Use% Mounted on/dev/hda3 19G 8.2G 9.7G 46% / dev/hda1 99M 16M 79M 17% / boottmpfs 250M 0250M 0% / dev/shm/dev/hdb1 9.9G 151m 9.2g 2% / mnt/hdb1 [root@g11-64-1] #

Hdb1 has been mounted on / mnt/hdb1, and the remaining space is 9.2G.

Create a file on this partition.

[root@g11-64-1 ~] # cd / mnt/hdb1 [root@g11-64-1 hdb1] # ls > a [root@g11-64-1 hdb1] # ls-hltotal 20Kmuri RWKui-1 root root 13 Nov 3 08:45 adrwx- 2 root root 16K Nov 3 08:44 lost+found [root@g11-64-1 hdb1] #

Uninstall the hdb1 partition.

[root@g11-64-1 hdb1] # cd [root@g11-64-1] # umount / mnt/hdb1 [root@g11-64-1] # df-hFilesystem Size Used Avail Use% Mounted on/dev/hda3 19G 8.2G 9.7G 46% / dev/hda1 99M 16M 79M 17% / boottmpfs 250M 0250M 0% / dev/shm [root@g11-64-1 ~] # III. Set up a new hard disk to boot and mount automatically

Add the mount information of the new hard disk to / etc/fstab. Add the following line:

/ dev/hdb1 / mnt/hdb1 ext3 defaults 1 2

In this way, after each boot, the system will automatically mount / dev/hdb1 to / mnt/hdb1.

Undefined

At this point, I believe you have a deeper understanding of "how to add a new hard disk in TurboLinux11". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report