Script to scan the disks and make file system


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to scan the disks and make file system
# 8  
Old 10-26-2017
Code:
 grep -q "^[^#]*/dev/$b\>" /etc/fstab && continue
  uuid=$(blkid -s UUID -o value /dev/$b)
  # jump to next loop cycle if its UUID is present and in fstab
  [ -n "$uuid" ] && grep -q "^[^#]*$uuid" /etc/fstab && continue
  # echo -e is discouraged, the echo options can differ between shells

what do the above lines do and what if the disk are partioned with lvm and mounted in the below format
Code:
/dev/mapper/vg_lv_home /home                 
/dev/mapper/vg_lv_tmp /tmp                   
/dev/mapper/vg_lv_u01 /u01


Last edited by rbatte1; 10-27-2017 at 08:33 AM.. Reason: Code tags for list of required format
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Scan for new LUN and create a new file system

Hi Please I dont have a lot of redhat skills, but I need some help on creating a file system. I need to rescan for this new LUN, so I try to check existing LUNs: fdisk -l Disk /dev/sda: 299.4 GB, 299439751168 bytes 255 heads, 63 sectors/track, 36404 cylinders Units = cylinders of... (8 Replies)
Discussion started by: fretagi
8 Replies

2. Shell Programming and Scripting

Make 48 disks(files) on solaris 10

Hello, to simulate an environment with 48 disks using Solaris 10 x86, i try toMake 48 disks (files) with MKFILE : #for i in c{0,1,2,3,4,5}t{0,1,2,3,4,5,6,7}d0 >do > mkfile 100m $i >done But i received like result : #ls /test_zfs c{0,1,2,3,4,5}t{0,1,2,3,4,5,6,7}d0 Any help... (2 Replies)
Discussion started by: herbich1985
2 Replies

3. UNIX for Advanced & Expert Users

Scan all mail messages through the server and save a copy into file system following a rule

In our company we work for our customer with a job# philosophy, managing all the informations about a job in a share with directories whose name is starting with job number. Under this entry point we have a standard structure of folders, comprising a "communications" folder. When we send emails... (0 Replies)
Discussion started by: vroby67
0 Replies

4. UNIX for Advanced & Expert Users

how to make a full system backup excluding data and restoring it to a new system

Hi, In order to have a sand box machine that I could use to test some system changes before going to production state, I'd like to duplicate a working system to a virtual one. Ideally, I'd like to manage to do it this way : - Make a full system backup excluding the user file system (this... (7 Replies)
Discussion started by: pagaille
7 Replies

5. Fedora

Read only disks on Linux system

Hi guys I have a SSL server that is running Fedora 9. I wanted to create a directory but get: mkdir: cannot create directory `test': Read-only file system Any ideas? (4 Replies)
Discussion started by: wbdevilliers
4 Replies

6. Shell Programming and Scripting

Shell Script to continuously scan a log file

Hello members, I have some doubts on how to write a script that can reports success / failure of a batch job ? 1. Run a batch job: 2. Wait and search for a particular string in the Log file: tail -f log01*.txt | egrep -v "^SUCCESSFUL" echo "continue with the other tasks" ... (1 Reply)
Discussion started by: novice82
1 Replies

7. UNIX for Advanced & Expert Users

Using newfs to make file system on a sata disk using Acard adaptor

Hi All: I am using an adaptor between a 1TB SATA hard drive and solaris 8 box with 68 pin scsi. I use the format utility to partition the HD which works fine but when I use newfs, I get some errors. I will place them below. I have blocked and the error message is in red. Anybody got any... (1 Reply)
Discussion started by: mndavies
1 Replies

8. AIX

system disks on aix 5.3

hello i'm running on P570 box aix 5.3 8 cpus 24G ram there are 1850 users loged in to this box the problem is that the two sysytem disks busy all the time hdisk0 100% busy hdisk1 100% busy some one have an idea what writing to this disks? thanks ariec (9 Replies)
Discussion started by: ariec
9 Replies

9. UNIX for Dummies Questions & Answers

How To Make Stealth Scan

hi all can anybdy plz tell me how to make a stealth port scan in unix c. if i want to send *just* ack/fin etc how do i send? using libnet or what? thankx (7 Replies)
Discussion started by: ambar
7 Replies
Login or Register to Ask a Question
Test::Script(3) 					User Contributed Perl Documentation					   Test::Script(3)

NAME
Test::Script - Basic cross-platform tests for scripts DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or bin as is also commonly used) paths of your Perl distribution. Further, it aims to provide this functionality with perfect platform-compatibility, and in a way that is as unobtrusive as possible. That is, if the program works on a platform, then Test::Script should always work on that platform as well. Anything less than 100% is considered unacceptable. In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking that your module won't on some platform because of the dependency. Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform safety. FUNCTIONS
script_compiles script_compiles( 'script/foo.pl', 'Main script compiles' ); The "script_compiles" test calls the script with "perl -c script.pl", and checks that it returns without error. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. Note also that the test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. script_runs script_runs( 'script/foo.pl', 'Main script runs' ); The "script_runs" test executes the script with "perl script.pl" and checks that it returns success. The path it should be passed is a relative unix-format script name. This will be localised when running "perl -c" and if the test fails the local name used will be shown in the diagnostic output. The test will be run with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure. SUPPORT
All bugs should be filed via the bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script> For other issues, or commercial enhancement and support, contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
prove, <http://ali.as/> COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.2 2009-11-23 Test::Script(3)