Skip to content

Instantly share code, notes, and snippets.

@s4l1h
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s4l1h/baeb0fb2252bf93317e1 to your computer and use it in GitHub Desktop.
Save s4l1h/baeb0fb2252bf93317e1 to your computer and use it in GitHub Desktop.
Linux yeni disk eklemek
####### fdisk İle Diskte partition oluşturalım #######
root@server:~# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xddb8b91d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-234441647, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-234441647, default 234441647):
Using default value 234441647
Command (m for help): p
Disk /dev/sdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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: 0xddb8b91d
Device Boot Start End Blocks Id System
/dev/sdc1 2048 234441647 117219800 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
####### partition dosya sistemini ext4 yapalım #######
root@server:~# mkfs.ext4 /dev/sdc1
mke2fs 1.42.9 (4-Feb-2014)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
7331840 inodes, 29304950 blocks
1465247 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
895 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
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
####### partition home dizinine mount edelim #######
root@server:~# mount -t auto -v /dev/sdc1 /home
mount: you didn't specify a filesystem type for /dev/sdc1
I will try type ext4
/dev/sdc1 on /home type ext4 (rw)
####### fstab dosyasına ekleyelimki her başlangıçta otomatik mount etsin#######
root@server:~# echo '/dev/sdc1 /home ext4 defaults 0 0' >> /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment