Vorhandene Partitionen anzeigen
Um die vorhandenen Partitionen anzuzeigen, folgenden Befehl eingeben:df -h
Nachfolgend wird angenommen, dass die neue Festplatte /dev/sdb ist.
Partition anlegen
Mit Hilfe von folgendem Befehl die neue Partition anlegen:fdisk /dev/sdb
Hilfe anzeigen
Über "m" kann die Hilfe angezeigt werden:Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help):
Partitionstabelle anzeigen
"p" zeigt die Partitionstabelle an:Command (m for help): p Disk /dev/sdb: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0009cbe3 Device Boot Start End Blocks Id System Command (m for help):
Neue Partition anlegen
Eine neue Partition wird mit "n" angelegt.
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-1465149167, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1465149167, default 1465149167):
Using default value 1465149167
Command (m for help):
Partitionstabelle erneut anzeigen
Anschließend kann man sich mit "p" erneut die Partitionstabelle anzeigen lassen.Command (m for help): p Disk /dev/sdb: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0009cbe3 Device Boot Start End Blocks Id System /dev/sdb1 2048 1465149167 732573560 83 Linux Command (m for help):
Konfiguration speichern
Die Konfiguration wird dann mit "w" gespeichert.Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. root@Ubuntu-1110-oneiric-64-minimal:~#
Partition formatieren
Nun muss die Partition formatiert werden. Dazu nachfolgenden Befehl eingeben:root@Ubuntu-1110-oneiric-64-minimal:~# mkfs -t ext4 /dev/sdb1 mke2fs 1.41.14 (22-Dec-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 45793280 inodes, 183143390 blocks 9157169 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 5590 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@Ubuntu-1110-oneiric-64-minimal:~#
Partition mounten
Die frisch formatierte Partition muss anschließend gemounted werden:nano /etc/fstabFolgende Zeile hinzufügen (vorher /backupDisk anlegen):
/dev/sdb1 /backupDisk ext4 defaults 1 2Manuell mounten:
mount /dev/sdb1
Informationen anzeigen
Über die beiden nachfolgenden Befehle kann man anschauen, ob alles geklappt hat.root@Ubuntu-1110-oneiric-64-minimal:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 691G 1.3G 655G 1% / udev 3.9G 4.0K 3.9G 1% /dev tmpfs 1.6G 276K 1.6G 1% /run none 5.0M 0 5.0M 0% /run/lock none 4.0G 0 4.0G 0% /run/shm /dev/sda2 508M 64M 420M 14% /boot /dev/sdb1 688G 197M 653G 1% /backupDisk
root@Ubuntu-1110-oneiric-64-minimal:~# mount /dev/sda3 on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) fusectl on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) /dev/sda2 on /boot type ext3 (rw) /dev/sdb1 on /backupDisk type ext4 (rw) root@Ubuntu-1110-oneiric-64-minimal:~#

Neuen Kommentar schreiben