Network

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

1.

What is disk quotas

A disk quota is a limit set by a system administrator that restricts certain aspects of file system
usage on modern operating systems. The function of using disk quotas is to allocate limited disk
space in a reasonable way.

What are disk quotas in Windows?


Disk quotas are a means of controlling the storage space available to Windows users. An
administrator can enforce limits on disk quotas so that no user account can exceed them. This
means that, whenever a user exceeds their disk quota, he or she can no longer add new data to the
disk. Furthermore, the administrator can also set warning levels, so that the users know
beforehand when they are getting close to their quota limit.

There are also a few other things that you should know:

In Windows, disk quotas can be set up on drives or partitions that are formatted using the NTFS
file system. You cannot use them on a volume that is formatted using FAT32 or exFAT because
these file systems do not offer support for this feature.
You can set disk quotas and enforce quota limits only if you have a Windows account that has
administrative privileges. Standard users cannot set disk quotas.
You can set disk quotas for disks or partitions, but you cannot set disk quotas on folders.
If you have multiple drives or partitions on your Windows computer, you must set disk quota
limits for each, individually. You cannot set disk quotas for multiple disks or partitions
simultaneously.

The disk quota is a protocol that is often used by system administrators to


ensure that available resources are equitably and reasonably distributed among
the users of the operating systems that are used by a home or business network.
This process of managing the file system usage of each work station within the
network helps to prevent the use of more resources by one user to the detriment
of another user in the group. The system administrator normally has the ability
to assign disk quotas on both a per work station basis as well as on an
individual user basis.
2. How can we configure disk quotas in both Ubuntu and
windows operating system with in examples

To install disk quota on Ubuntu, Debian, and Linux Mint:


Use the ff
Step 1 Now that the disk quota package is installed, we need to enable it for the
desired storage partition by editing the /etc/fstab file. Use nano or your preferred text
editor to open this file with root privileges:

$ sudo nano /etc/fstab

Step 2 We will need to add the usrquota option to the line that corresponds to our
storage partition. If you also want to enable disk quotas for groups, you can include
the grpquota option as well. For example:

/dev/sda1 /home ext4 defaults,usrquota,grpquota 0 2

Step 3

Next, you will need to remount the file system for the changes to take effect.
Alternative, rebooting the system will also work.

$ sudo mount -o remount,rw /home

Step 4

Next, let’s create a quota index for the mount point. In our case, this would be /home.
We will include options -c to create a new index, -m so to avoid mounting the partition
as read only, and -u to specify that we want to create a quota for users. You can also
append option -g if you want to make a group quota.

$ sudo quotacheck -cmu /home

Step 5 Turn on the quota:


$ sudo quotaon -v /home

Step 6

Then, we will use the edquota command to begin putting quotas for individual users.
Specify the name of the user that you would like to edit the quotas for after your
command. In this example, we will edit the disk quota for user ‘linuxconfig’:

$ sudo edquota -u linuxconfig

Step7

With our soft and hard limits set, we can control the grace period of our soft limits
with the following command:

Disk Quota Examples


Here are some examples for setting disk quotas and seeing disk quota information on
Linux:

Example 1

Set the disk quota for user linuxconfig:

$ sudo edquota -u linuxconfig /home

Example 2

Set the disk quota for group developers:

$ sudo edquota -g developers /home

Example 3

See the current quota settings for user linuxconfig on mount point /home:

$ sudo quota -u linuxconfig /home


Example 4

Begin enforcing disk quota settings:

$ sudo quotaon -v /home

Example 5

Turning off disk quotas:

$ sudo quotaoff -v /home

Example 6

To copy disk quota settings from user linuxconfig1 to user linuxconfig2:

$ sudo edquota -p linuxconfig1 linuxconfig2

To configure disk quota in windows operating system


Step 1: Open This PC, right-click a hard disk and choose Properties on the context menu. Step 2:
Select Quota and tap Show Quota Settings. Step 3: Choose Enable quota management, set disk space
limit and warning level, select quota logging option according to specific needs, and then hit OK.

Step1 Open File Explorer and navigate to the This PC folder.

Step2 Right-click on the NTFS drive you want to enable disk quotas for, and select Properties from
the context menu.

Step3 Switch to the Quota tab, and click on the Show Quota Settings button

Step4 Turn on the Enable disk quota management option.

Step5 Turn on the Deny disk space to users exceeding quota limit option if needed.

Step6 Under Select the default quota limit for new users on this volume, select Limit disk space,
and specify the amount of space you want for the limit and before a warning is shown to the user.

Step7 Finally, click Apply and OK.

Step 8 Restart Windows 10.


3. What is logical volume management(lvm) and redundant arry of
indpendanet disk(RAID)

Logical volume management (LVM) is a form of storage virtualization that


offers system administrators a more flexible approach to managing disk
storage space than traditional partitioning. This type of virtualization tool is
located within the device-driver stack on the operating system.

Logical volume management (LVM) is a form of storage virtualization that offers


system administrators a more flexible approach to managing disk storage space than
traditional partitioning. This type of virtualization tool is located within the device-
driver stack on the operating system. It works by chunking the physical volumes
(PVs) into physical extents (PEs). The PEs are mapped onto logical extents (LEs)
which are then pooled into volume groups (VGs). These groups are linked together
into logical volumes (LVs) that act as virtual disk partitions and that can be managed
as such by using LVM.

The goal of LVM is to facilitate managing the sometimes conflicting storage needs of
multiple end users. Using the volume management approach, the administrator is not
required to allocate all disk storage space at initial setup. Some can be held in reserve
for later allocation. The sysadmin can use LVM to segment logically sequential data
or combine partitions, increasing throughput and making it simpler to resize and move
storage volumes as needed. Storage volumes may be defined for various user groups
within the enterprise, and new storage can be added to a particular group when desired
without requiring user files to be redistributed to make the most efficient use of space.
When old drives are retired, the data they contain can be transitioned to new drives --
ideally without disrupting availability of service for end users.
RAID (redundant array of independent disks) is a way of storing the same data in different places
on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive failure.
There are different RAID levels, however, and not all have the goal of providing redundancy.

A redundant array of independent disks (RAID) is a common system for high-volume data
storage at the server level. RAID systems use many small-capacity disk drives to store large
amounts of data and to provide increased reliability and redundancy. Such an array appears to the
computer as a single logical unit consisting of multiple disk drives.

RAID storage can be done in a number of ways. Some RAID types emphasize performance,
others reliability, fault tolerance or error correction. Which type you choose depends on what
you're trying to accomplish.

Common to all RAID systems, however - and their real advantage - is the "hot-swapping"
ability: You can pull out a defective drive and insert a new one in its place. For most RAID
types, data on a failed disk can be rebuilt automatically without the server or the system ever
having to be shut down.

4 how can we implement LVM,creating logical volume(LVs),manuplating


VGs and LVs in both Ubuntu and windows

On windows:

Way 1. Create Logical Partition Using Diskpart

Step 1. Press+key combo to start Run. Then type “diskpart” in the box and pressto open
Command Prompt.
Step 2. Input following commands in order and each command is followed by.
 list disk
 select disk X (X is target hard drive)
 create partition extended (or create partition extended size=102400, which means creating an
Extended partition with 100GB in size)
 create partition logical size=81920
 assign letter=F (this means you’ll create a Logical volume with drive letter F of 80GB size)
 exit

Way 2. Create Logical drive via Disk Management


Alternatively, you can use Disk Management to create Logical drive in the created Extended
partition. Open Disk Management (This PC > Manage >Storage\Disk Management). You’ll find
there is an Extended partition in Green color. Now right click this partition and select “New Simple
Volume”. Walk through the wizard and you may want to select NTFS as file system during the
process. Finally, the new Logical partition has been created.

For Ubuntu:

# fdisk -l

1. Now partitions both the disks /dev/xvdc and /dev/xvdd using fdisk command as shown.

# fdisk /dev/xvdc

# fdisk /dev/xvdd

Use n to create the partition and save the changes with w command.
2. After partitioning, use the following command to verify the partitions.
# fdisk -l

3. Create Physical Volume (PV).

# pvcreate /dev/xvdc1

# pvcreate /dev/xvdd1

4. Create Volume Group (VG).

# vgcreate testvg /dev/xvdc1 /dev/xvdd1

Here, “testvg” is the VG name.

5. Now use “vgdisplay” to list all details about the VG’s in the system.

# vgdisplay

OR

# vgdisplay testvg
6. Create Logical Volumes (LV).

# lvcreate -n lv_data1 --size 12G testvg

# lvcreate -n lv_data2 --size 14G testvg


Here, “lv_data1” and “lv_data2” are LV name.

7. Now use “lvdisplay” to list all details about the Logical volumes available in the
system.

# lvdisplay

OR

# lvdisplay testvg

8. Format the Logical Volums (LV’s) to ext4 format.

# mkfs.ext4 /dev/testvg/lv_data1

# mkfs.ext4/dev/testvg/lv_data2

9. Finally, mount the file system.

# mount /dev/testvg/lv_data1 /data1

# mount /dev/testvg/lv_data2 /data2

Make sure to create data1 and data2 directories before mounting the filesystem.


5. How can we create and manage RAID in both Ubuntu and windows
How to install Ubuntu with software RAID-1
There are two types of RAID implementation:

1. Software. A special OS driver looks after physical media, and the OS works with a virtual
combined disk space.
2. Hardware. A special controller looks after the physical media, the OS works with a virtual
combined disk space.

1. Start the installation of Ubuntu, choose manual disk partitioning (). ...
2. Create an (sda) partitioning of 512MB on the first disk:
3. Choose the partitioning type – RAID:
4. Complete by clicking "Done setting up the partition": ...
5. Here is what we get:

Or

# We want to create a RAID 0 on /dev/sda and /dev/sdb drives.

# Create Partitions on drives first.

$ sudo fdisk /dev/sda

Welcome to fdisk (util-linux 2.37.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

The device contains 'linux_raid_member' signature and it will be removed


by a write command. See fdisk(8) man page and --wipe option for more
details.

Device does not contain a recognized partition table.

Created a new DOS disklabel with disk identifier 0xdad7c228.


Command (m for help): n

Partition type

p primary (0 primary, 0 extended, 4 free)

e extended (container for logical partitions)

Select (default p): p

Partition number (1-4, default 1): 1

First sector (2048-3907029167, default 2048):

Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-3907029167, default


3907029167):

Created a new partition 1 of type 'Linux' and of size 1.8 TiB.

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

# Same for the other drive: /dev/sdb

# Create a /dev/md0 across the two partitions.

$ sudo mdadm --create /dev/md0 --name=data --level=0 --raid-devices=2


/dev/sda1 /dev/sdb1
$ sudo mkfs -t ext4 /dev/md0 # Create EXT4 filesystem

$ sudo mount /dev/md0 /data # Mount them on /data

$ cat /proc/mdstat

> Personalities : [raid0] [linear] [multipath] [raid1] [raid6] [raid5] [raid4]


[raid10]

> md0 : active raid0 sdb1[1] sda1[0]

> 2000142336 blocks super 1.2 512k chunks

>

> unused devices: <none>

$ sudo mdadm --detail --scan

> ARRAY /dev/md/mrjn-workstation:0 metadata=1.2 name=mrjn-


workstation:0 UUID=49749d20:407900e2:8f5613e8:679a5226

# This goes into /etc/mdadm/mdadm.conf

DEVICE /dev/sda1 /dev/sdb1

ARRAY /dev/md/mrjn...

$ sudo update-initramfs -u

$ sudo blkid /dev/md0


> /dev/md0: UUID="1fb7c99e-02af-45c0-86e8-7a29d8f64ee9"
BLOCK_SIZE="4096" TYPE="ext4"

# This goes into /etc/fstab

UUID=1fb7c99e-02af-45c0-86e8-7a29d8f64ee9 /data ext4


defaults,nofail,discard 0 0

Configuring RAID in Windows 10


1. Install the hard drives into your computer and let it boot into Windows 10.
2. Back up everything you cannot afford to lose from your OS drive before starting.
3. Type or paste ‘Storage Spaces’ into Search Windows.
4. Select Create a new pool and storage space. Windows will check all drives and select
them in the next window.
5. Select the RAID type under Resiliency by selecting the drop down menu. Simple pools
the disks, Two-way mirror and three-way mirror are similar to RAID 1, and Parity is
similar to RAID 5.
6. Set the drive size under Size if necessary. It should default to the correct setting.
7. Select Create storage space.
8. Wait for the process to complete and you should then see a single disk with the
correct size in Windows Explorer.
9. Type or paste ‘Manage Storage Spaces’ into the Search Windows box to keep an eye
on the array.
Configuring RAID in Windows 10 is now easier than ever. Just remember to keep an
eye on error reporting once you have it set up in case of any issues.

RAID 1 is a mirror which basically means the data is copied into both disks. RAID 5 is
striped, meaning the data is spread across the drives with parity bits on each to allow
the RAID to rebuild data from a lost disk.

You might also like