Developing Simple Scripts for File and User System Management with ZFS Volume
VerifiedAdded on 2023/06/07
|18
|2359
|76
AI Summary
This project covers the development of simple scripts for file and user system management with ZFS volume. It includes five tasks: automated account management, designing file systems, implementing file system, making file system accessible and robust, and file system management with scripts. The project successfully prepares shell scripts to manage user information, prerequisites to create a server to store customer data, implements the storage system, creates another virtual machine to mount a NFS exported volume from the server, and creates two scripts for file system management.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
LINUX
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Table of Contents
Introduction................................................................................................................................2
Automated Account Management..............................................................................................2
Designing File Systems..............................................................................................................6
File system Implementation.......................................................................................................9
Making the File System accessible and robust........................................................................11
File System Management with Scripts.....................................................................................13
Conclusion................................................................................................................................15
References................................................................................................................................17
1
Introduction................................................................................................................................2
Automated Account Management..............................................................................................2
Designing File Systems..............................................................................................................6
File system Implementation.......................................................................................................9
Making the File System accessible and robust........................................................................11
File System Management with Scripts.....................................................................................13
Conclusion................................................................................................................................15
References................................................................................................................................17
1
Introduction
Main scope of this project is to developing the simple scripts to accomplish the file
and user system whilst and developing the some expertise in handling a composite file
system. This project is classified into five task like automated account management,
designing a file systems, implementing the file system, making the file system accessible and
robust and file system management with scripts. The first task is automated account
management, this task is used to prepare the two shell scripts and it is used to manage the
user information. The Main shell script is used for reads the text file called users.txt that
contains the following information and another scripts is used to remove the user account.
The second task is Designing File Systems, we will prerequisites to create the server to store
the customer data by using the ZFS volume. The volumes are turned into the unbounded and
it was felt that the ZFS system and this structure should be used for each volume. The OS
itself needs not be on a ZFS volume. The third task is implementing the file system, this task
is used to implement the storage system. The fourth task is making the file system accessible,
this task is used to create another virtual machine to do mount a NFS exported volume from
the server and backup all the data on the ZFS volumes by using the ZFS. The final task is file
system management with scripts, this task is used to create the two scripts for file system
management. The First scripts is to make the user home directories are owned and only
accessible by the owner and second script is to looks the file system to find the objects like
mp3. These are will be executed and explained in detail.
Automated Account Management
In automated account management task, we will makes the two shell scripts and it is
used to maintain the user information. The first scripts is used to reads the user text file that
contains the below information. This is established as below,
2
Main scope of this project is to developing the simple scripts to accomplish the file
and user system whilst and developing the some expertise in handling a composite file
system. This project is classified into five task like automated account management,
designing a file systems, implementing the file system, making the file system accessible and
robust and file system management with scripts. The first task is automated account
management, this task is used to prepare the two shell scripts and it is used to manage the
user information. The Main shell script is used for reads the text file called users.txt that
contains the following information and another scripts is used to remove the user account.
The second task is Designing File Systems, we will prerequisites to create the server to store
the customer data by using the ZFS volume. The volumes are turned into the unbounded and
it was felt that the ZFS system and this structure should be used for each volume. The OS
itself needs not be on a ZFS volume. The third task is implementing the file system, this task
is used to implement the storage system. The fourth task is making the file system accessible,
this task is used to create another virtual machine to do mount a NFS exported volume from
the server and backup all the data on the ZFS volumes by using the ZFS. The final task is file
system management with scripts, this task is used to create the two scripts for file system
management. The First scripts is to make the user home directories are owned and only
accessible by the owner and second script is to looks the file system to find the objects like
mp3. These are will be executed and explained in detail.
Automated Account Management
In automated account management task, we will makes the two shell scripts and it is
used to maintain the user information. The first scripts is used to reads the user text file that
contains the below information. This is established as below,
2
First Shell Script is displayed below.
#!/bin/bash
FILE="/home/ubuntu/Documents"
echo "*** File - $FILE contents ***"
cat $FILE
Steps for compile and run the shell scripts.
First, user needs to open the terminal.
After, goo to script location by enter the below command on terminal
Cd file locations
Then, provide the file permission by enter the below command on terminal.
chmod +x user.sh
Finally, run the shell scripts by typing the below command.
./user.sh
This development is demonstrated as underneath.
3
#!/bin/bash
FILE="/home/ubuntu/Documents"
echo "*** File - $FILE contents ***"
cat $FILE
Steps for compile and run the shell scripts.
First, user needs to open the terminal.
After, goo to script location by enter the below command on terminal
Cd file locations
Then, provide the file permission by enter the below command on terminal.
chmod +x user.sh
Finally, run the shell scripts by typing the below command.
./user.sh
This development is demonstrated as underneath.
3
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
The below screenshots is used to proves the user system has without an interactive input by
using the below command and it established on terminal.
Another one scripts is used to remove the user account by using the below scripts.
#!/bin/bash
#
for user
do
4
using the below command and it established on terminal.
Another one scripts is used to remove the user account by using the below scripts.
#!/bin/bash
#
for user
do
4
userdel r $user
done
#
for user1
do
rm -rM /home/$user1
done
#
To run the above scripts, it is provide the output of the scripts that is remove the user account.
It is shown below (Edwards, 2013).
This task also performs the archiving by using the tar command on Ubuntu. To archiving the
home directory by enter the below command. This command is illustrated as below.
5
done
#
for user1
do
rm -rM /home/$user1
done
#
To run the above scripts, it is provide the output of the scripts that is remove the user account.
It is shown below (Edwards, 2013).
This task also performs the archiving by using the tar command on Ubuntu. To archiving the
home directory by enter the below command. This command is illustrated as below.
5
Once the command is executed successfully, the home directory was successfully archived
and it shown below.
Designing File Systems
Here, we will prerequisites to create the server to store the customer data by using the
ZFS volume. The volumes are turned into the unbounded and it was felt that the ZFS system
and this structure should be used for each volume. The OS itself needs not be on a ZFS
volume. All the ZFS volumes are should be worked in such a way to deal with ensure the
protection of data and it oversaw if there should be an occurrence of neighbourhood circle
disillusionment. In any case, customer needs to present the ZFS by using the going with
progresses. ZFS offers insurance against quiet information defilement. Rather than "trusting"
the capacity gadget, it checksums the information at that point stores it in independent
squares from the information itself. Debased information will be accounted for and even
naturally settled if the capacity pool has been setup with repetition. ZFS gives different
highlights too:
A volume administrator enables you to join your physical stockpiling gadgets
into pools. This makes it conceivable to powerfully build the pool measure
without agonizing over apportioning and extending the file system.
The greater part of the activities should be possible on the web.
Gadgets can be gathered in RAID-Z clusters, like RAID 5, however in excess
of three equality plates are upheld.
6
and it shown below.
Designing File Systems
Here, we will prerequisites to create the server to store the customer data by using the
ZFS volume. The volumes are turned into the unbounded and it was felt that the ZFS system
and this structure should be used for each volume. The OS itself needs not be on a ZFS
volume. All the ZFS volumes are should be worked in such a way to deal with ensure the
protection of data and it oversaw if there should be an occurrence of neighbourhood circle
disillusionment. In any case, customer needs to present the ZFS by using the going with
progresses. ZFS offers insurance against quiet information defilement. Rather than "trusting"
the capacity gadget, it checksums the information at that point stores it in independent
squares from the information itself. Debased information will be accounted for and even
naturally settled if the capacity pool has been setup with repetition. ZFS gives different
highlights too:
A volume administrator enables you to join your physical stockpiling gadgets
into pools. This makes it conceivable to powerfully build the pool measure
without agonizing over apportioning and extending the file system.
The greater part of the activities should be possible on the web.
Gadgets can be gathered in RAID-Z clusters, like RAID 5, however in excess
of three equality plates are upheld.
6
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
You can take depictions of your file systems and rollback to them in the event
of need (Thomas & Vugt, 2011).
Clones can be made from depictions and can be elevated to assume control.
Pressure and reduplication can be swung on to spare circle space. Pressure
additionally enhances read and compose speeds - some of the time extensively
if the data is extremely compressible.
To begin with, see the sources are engaged or not by enter the going with call and it is spoken
to as underneath (Ubuntu Netbooks, 2010).
7
of need (Thomas & Vugt, 2011).
Clones can be made from depictions and can be elevated to assume control.
Pressure and reduplication can be swung on to spare circle space. Pressure
additionally enhances read and compose speeds - some of the time extensively
if the data is extremely compressible.
To begin with, see the sources are engaged or not by enter the going with call and it is spoken
to as underneath (Ubuntu Netbooks, 2010).
7
Then, we will update the system by typing below command.
ZFS accomplishes its amazing execution through various systems:
Dynamic striping over all gadgets to boost throughput
Duplicate on-compose configuration makes most plate composes successive
Numerous square sizes, consequently coordinated workload
Unequivocal I/O need with due date booking
All around ideal I/O arranging and collection
8
ZFS accomplishes its amazing execution through various systems:
Dynamic striping over all gadgets to boost throughput
Duplicate on-compose configuration makes most plate composes successive
Numerous square sizes, consequently coordinated workload
Unequivocal I/O need with due date booking
All around ideal I/O arranging and collection
8
Numerous free prefect streams with programmed length and walk recognition for
greatest spilling execution
Boundless, momentary read/compose previews
Parallel, consistent time index tasks
File system Implementation
In file system implementation task, we will install the Ubuntu virtual machine and
ZFS utilities to implement the file system on Ubuntu. Installation of Ubuntu and ZFS is
illustrated as under. Install Ubuntu virtual Machine. It is shown below.
Installation of ZFS utilities is shown below.
9
greatest spilling execution
Boundless, momentary read/compose previews
Parallel, consistent time index tasks
File system Implementation
In file system implementation task, we will install the Ubuntu virtual machine and
ZFS utilities to implement the file system on Ubuntu. Installation of Ubuntu and ZFS is
illustrated as under. Install Ubuntu virtual Machine. It is shown below.
Installation of ZFS utilities is shown below.
9
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Checking more often than excludes examine the pool status, IO measurements, drill
down the accessible pools, rattle off specific points of interest of the pool, demonstrate the
pool status with verbose mode, drill down ZFS document frameworks and so forth. These
data gives significant knowledge of the pools, datasets, and are very valuable in settling on
choices with respect to the ZFS document frameworks (Dowdle & Walter, 2018).
ZFS disposes of the need to set up customary RAID exhibits. Rather, you can make
ZFS pools, and even add drives to those pools whenever. ZFS pools carry on precisely like
RAID, yet the usefulness is incorporated appropriate with the file system. ZFS additionally
acts like a swap for LVM, enabling you to package and oversee segments on the fly without
the need to deal with things at a lower level and stress over the related dangers. It's likewise a
CoW file system. Without getting excessively specialized, that implies that ZFS shields your
information from slow defilement after some time. ZFS makes checksums of documents and
gives you a chance to move back those records to a past employed reworking ("Building a
ZFS Backup Server | biscuit.ninja", 2018).
ZFS makes a registry in the root file system for your pools. You can peruse to them
by name utilizing your GUI document chief or the CLI. ZFS is magnificently ground-
breaking, and there are a lot of different things that you can do with it, as well, yet these are
the nuts and bolts. It is an amazing file system for working with heaps of capacity, regardless
of whether it is only a RAID exhibit of hard drives that you use for your records. ZFS works
10
down the accessible pools, rattle off specific points of interest of the pool, demonstrate the
pool status with verbose mode, drill down ZFS document frameworks and so forth. These
data gives significant knowledge of the pools, datasets, and are very valuable in settling on
choices with respect to the ZFS document frameworks (Dowdle & Walter, 2018).
ZFS disposes of the need to set up customary RAID exhibits. Rather, you can make
ZFS pools, and even add drives to those pools whenever. ZFS pools carry on precisely like
RAID, yet the usefulness is incorporated appropriate with the file system. ZFS additionally
acts like a swap for LVM, enabling you to package and oversee segments on the fly without
the need to deal with things at a lower level and stress over the related dangers. It's likewise a
CoW file system. Without getting excessively specialized, that implies that ZFS shields your
information from slow defilement after some time. ZFS makes checksums of documents and
gives you a chance to move back those records to a past employed reworking ("Building a
ZFS Backup Server | biscuit.ninja", 2018).
ZFS makes a registry in the root file system for your pools. You can peruse to them
by name utilizing your GUI document chief or the CLI. ZFS is magnificently ground-
breaking, and there are a lot of different things that you can do with it, as well, yet these are
the nuts and bolts. It is an amazing file system for working with heaps of capacity, regardless
of whether it is only a RAID exhibit of hard drives that you use for your records. ZFS works
10
phenomenally with NAS frameworks, as well. Although how steady and hearty ZFS is, it's in
every case best to back up your information when you execute something new on your hard
drives.
Making the File System accessible and robust
In file system accessible and robust task, we will making the file system robust and
accessible by install another virtual machine to mount the NFS exported volume from the
server and backup all the data on the ZFS volumes by use the ZFS. NFS, or Network File
System, is a disseminated record framework convention that enables you to mount remote
pools on your server. This gives you a chance to oversee storage room in an alternate area
and keep in touch with that space from various customers. NFS gives a moderately speedy
and simple approach to get to remote frameworks over a system and functions admirably in
circumstances where the mutual assets will be become moreover consistently. NFS gives a
snappy and simple approach to get to remote frameworks over a system. Be that as it may,
the convention itself isn't scrambled. On the off chance that you are utilizing this in a
generation situation, consider steering NFS over SSH or a VPN association with make a more
secure affair.
Installation of virtual machine is shown below.
11
every case best to back up your information when you execute something new on your hard
drives.
Making the File System accessible and robust
In file system accessible and robust task, we will making the file system robust and
accessible by install another virtual machine to mount the NFS exported volume from the
server and backup all the data on the ZFS volumes by use the ZFS. NFS, or Network File
System, is a disseminated record framework convention that enables you to mount remote
pools on your server. This gives you a chance to oversee storage room in an alternate area
and keep in touch with that space from various customers. NFS gives a moderately speedy
and simple approach to get to remote frameworks over a system and functions admirably in
circumstances where the mutual assets will be become moreover consistently. NFS gives a
snappy and simple approach to get to remote frameworks over a system. Be that as it may,
the convention itself isn't scrambled. On the off chance that you are utilizing this in a
generation situation, consider steering NFS over SSH or a VPN association with make a more
secure affair.
Installation of virtual machine is shown below.
11
Once installation is finished, user needs to monitor the disk volumes by enter the following
command and it is demonstrated as under.
12
command and it is demonstrated as under.
12
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Then, create the pool named as pool-name. This one stands established as beneath.
Lastly, user effectively planned the ZFS volume.
13
Lastly, user effectively planned the ZFS volume.
13
File System Management with Scripts
In file system management with scripts task, we are also creates the two shell scripts.
The First scripts is used for make the user home directories are owned and only accessible by
the owner. This one is exposed lower.
for dir in /home/ubuntu*
do
if [ -d "$dir" ]
then
username=$(basename "$dir")
echo "chown -R $username $dir"
fi
done
The second script is used for aspects the file system to encounter the objects like mp3. This
one is presented underneath.
#!/bin/sh
file="$1"
outfile=${file%.flac}.mp3
14
In file system management with scripts task, we are also creates the two shell scripts.
The First scripts is used for make the user home directories are owned and only accessible by
the owner. This one is exposed lower.
for dir in /home/ubuntu*
do
if [ -d "$dir" ]
then
username=$(basename "$dir")
echo "chown -R $username $dir"
fi
done
The second script is used for aspects the file system to encounter the objects like mp3. This
one is presented underneath.
#!/bin/sh
file="$1"
outfile=${file%.flac}.mp3
14
eval $(metaflac --export-tags-to - "$file" | sed "s/=\(.*\)/='\1'/")
flac -cd "$file" | lame --preset fast extreme \
--add-id3v2 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" \
--ty "$DATE" --tn "$TRACKNUMBER" --tg "$GENRE" \
- "$outfile"
Conclusion
This project effectively developed the simple scripts to accomplish the file and user
system whilst and developing the some expertise in handling a composite file system and it is
classified into five task like automated account management, designing a file systems,
implementing the file system, making the file system accessible and robust and file system
management with scripts. The first task is automated account management, this task was
successfully prepare the two shell scripts and it is used to succeed the user information. The
First shell script is used for reads the text file and another scripts is used to remove the user
account. The second task is Designing File Systems, we will successfully prerequisites to
create the server to store the customer data by using the ZFS volume. The volumes are turned
15
flac -cd "$file" | lame --preset fast extreme \
--add-id3v2 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" \
--ty "$DATE" --tn "$TRACKNUMBER" --tg "$GENRE" \
- "$outfile"
Conclusion
This project effectively developed the simple scripts to accomplish the file and user
system whilst and developing the some expertise in handling a composite file system and it is
classified into five task like automated account management, designing a file systems,
implementing the file system, making the file system accessible and robust and file system
management with scripts. The first task is automated account management, this task was
successfully prepare the two shell scripts and it is used to succeed the user information. The
First shell script is used for reads the text file and another scripts is used to remove the user
account. The second task is Designing File Systems, we will successfully prerequisites to
create the server to store the customer data by using the ZFS volume. The volumes are turned
15
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
into the unbounded and it was felt that the ZFS system and this structure should be used for
each volume. The third task is implementing the file system, this task was effectively
implemented the storage system. The fourth task is making the file system accessible, this
task also successfully created another virtual machine to do mount a NFS exported volume
from the server and backup all the data on the ZFS volumes by using the ZFS. The final task
is file system management with scripts, this task was successfully created the two scripts for
file system management. The Minor scripts is to create the user home directories are owned
and only accessible by the owner and another script is to expressions the file system to
discovery the objects like mp3. These are executed and explained in detail.
16
each volume. The third task is implementing the file system, this task was effectively
implemented the storage system. The fourth task is making the file system accessible, this
task also successfully created another virtual machine to do mount a NFS exported volume
from the server and backup all the data on the ZFS volumes by using the ZFS. The final task
is file system management with scripts, this task was successfully created the two scripts for
file system management. The Minor scripts is to create the user home directories are owned
and only accessible by the owner and another script is to expressions the file system to
discovery the objects like mp3. These are executed and explained in detail.
16
References
Apress. (2010). Ubuntu Netbooks.
Building a ZFS Backup Server | biscuit.ninja. (2018). Retrieved from
https://biscuit.ninja/blog/building-a-zfs-backup-server
Dowdle, S., & Walter, J. (2018). How to Use the ZFS Filesystem on Ubuntu Linux - Make
Tech Easier. Retrieved from https://www.maketecheasier.com/use-zfs-filesystem-
ubuntu-linux/
Edwards, C. (2013). Instant Ubuntu. Packt Publishing.
Thomas, K., & Vugt, S. (2011). Beginning Ubuntu Linux. New York, NY: Apress.
17
Apress. (2010). Ubuntu Netbooks.
Building a ZFS Backup Server | biscuit.ninja. (2018). Retrieved from
https://biscuit.ninja/blog/building-a-zfs-backup-server
Dowdle, S., & Walter, J. (2018). How to Use the ZFS Filesystem on Ubuntu Linux - Make
Tech Easier. Retrieved from https://www.maketecheasier.com/use-zfs-filesystem-
ubuntu-linux/
Edwards, C. (2013). Instant Ubuntu. Packt Publishing.
Thomas, K., & Vugt, S. (2011). Beginning Ubuntu Linux. New York, NY: Apress.
17
1 out of 18
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.