Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_fs_mgm_lvm [2019/10/18 11:04] – external edit 127.0.0.1linux_fs_mgm_lvm [2020/09/11 07:25] (current) andonovj
Line 1: Line 1:
-======Create a File system======+=====Overview===== 
 +File system management on Linux is pretty easy once a person has experience and knowledge of what he is doing. 
 + 
 +====File system Management==== 
 +File systems can be two kinds: 
 + 
 +  * Non-Journal File systems: ext2.  
 +These file systems do not keep logs and can have corrupted data if there has been a power outage. The pluses of these file systems is their fast read/write speed. 
 +  * Journal File systems: ext3,ext4.  
 + 
 +These file systems keep a log (journal) which slows them down, however it is up to the System Admin to decide if he/she is willing to sacrifice speed for consistency.
  
  
Line 345: Line 355:
  
 =====Add the disk to a volume group===== =====Add the disk to a volume group=====
-Firstly, we have to check, which is the volume group which we want to extend> Please BE SURE, you know the volume group of the logical volume on which your File system is mounted and which you wish to extend. This can be seen from the "df" command:+Firstly, we have to partition the new bare metal :) 
 + 
 +<sxh bash> 
 +[root@matar ~]# fdisk /dev/sde 
 +Welcome to fdisk (util-linux 2.23.2). 
 + 
 +Changes will remain in memory only, until you decide to write them. 
 +Be careful before using the write command. 
 + 
 +Device does not contain a recognized partition table 
 +Building a new DOS disklabel with disk identifier 0xdabe3889. 
 + 
 +Command (m for help): n 
 +Partition type: 
 +     primary (0 primary, 0 extended, 4 free) 
 +     extended 
 +Select (default p): p 
 +Partition number (1-4, default 1): 
 +First sector (2048-20971519, default 2048): 
 +Using default value 2048 
 +Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519): 
 +Using default value 20971519 
 +Partition 1 of type Linux and of size 10 GiB is set 
 + 
 +Command (m for help): w 
 +The partition table has been altered! 
 + 
 +Calling ioctl() to re-read partition table. 
 +Syncing disks. 
 +[root@matar ~]#  
 +</sxh> 
 + 
 + 
 +Then, we have to check, which is the volume group which we want to extend> Please BE SURE, you know the volume group of the logical volume on which your File system is mounted and which you wish to extend. This can be seen from the "df" command:
  
 <sxh bash> <sxh bash>
Line 446: Line 489:
 So since restarting of the server isn't always possible to restart the server. Luckly we have a command for that: So since restarting of the server isn't always possible to restart the server. Luckly we have a command for that:
  
-<sxh bash> +<Code:bash|Re-scan SCSIs
-/sys/class/scsi_host/host0/scan +echo "- - -" > /sys/class/scsi_host/host0/scan 
-/sys/class/scsi_host/host1/scan +echo "- - -" > /sys/class/scsi_host/host1/scan 
-/sys/class/scsi_host/host2/scan +echo "- - -" > /sys/class/scsi_host/host2/scan 
-/sys/class/scsi_host/host3/scan +echo "- - -" > /sys/class/scsi_host/host3/scan 
-</sxh>+</Code>
  
 After that the disk should be available using fdisk: After that the disk should be available using fdisk:
  • linux_fs_mgm_lvm.1571396697.txt.gz
  • Last modified: 2019/10/18 20:04
  • (external edit)