Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Question about lvm file creation Post 302925743 by stew on Wednesday 19th of November 2014 05:38:20 AM
Old 11-19-2014
so you mean the first code pvcreation, will not go to for loop until /dev/sd[b-z] exist
 

10 More Discussions You Might Find Interesting

1. Solaris

DiskSuite 4.2.1 Database creation question

I'm trying to figure out how to simply create a 500Gb ufs file system named /rec using DiskSuite 4.2.1 on a Solaris 8 platform via command line using two 250Gb partitions on two different disks. Does anyone know what the proper command string and options are to perform this task? Would I use the... (2 Replies)
Discussion started by: ruger14
2 Replies

2. Programming

Question on creation of Thread pool

dear sir/madam presently i am in a process of creating a multithread pool using clone() system call in unix with c programming. i am facing some problem ie., i am able create multithread pool and able to keep all the threads in wait state,but when i call kill (afunction revoke a... (6 Replies)
Discussion started by: Radha
6 Replies

3. Linux

LVM snapshot question

Hi All, I am planning to do a LVM replicate to another server. Example : server1.foo.com has / , /boot , swap and few LVM partitions. All are in /dev/sda disk of size 80GB. /dev/sda5 is a LVM partition which has only one vg00 and it has 2 LV's (/var and /usr) and a SAN storage connected to... (0 Replies)
Discussion started by: rakrhn
0 Replies

4. Filesystems, Disks and Memory

LVM snapshot question

Hi All, I am planning to do a LVM replicate to another server. Example : server1.foo.com has / , /boot , swap and few LVM partitions. All are in /dev/sda disk of size 80GB. /dev/sda5 is a LVM partition which has only one vg00 and it has 2 LV's (/var and /usr) and a SAN storage connected to... (0 Replies)
Discussion started by: rakrhn
0 Replies

5. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

6. Red Hat

LVM question

Hi all; I have a quick question about LVM. 2.6.18-92.1.18.el5 Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Release: 5.3 Codename: Tikanga I was going through /etc/lvm.conf and I am not clear with lvm meta... (0 Replies)
Discussion started by: maverick_here
0 Replies

7. Red Hat

SAN/LVM question

Hey everyone. I am working on designing a logging solution for a deployment we have going out in a few months. Right now we have a single storage head end, connected via fibre to a SAN. Basically the plan is to create a number of smaller LUNs on the SAN, and then use LVM2 to handle concatenating... (5 Replies)
Discussion started by: msarro
5 Replies

8. UNIX for Dummies Questions & Answers

Linux LVM Question

I've three partitions on /dev/sda: sda1, sda2 sda3. There is FREE space between sda2 and sda3 and sda3 ends on the last sector. sda2 and sda3 have the same number of sectors allocated and so are the exact same size. /dev/sda2 is already part of the VG VolGroup. However, what puzzles me is that... (0 Replies)
Discussion started by: Devyn
0 Replies

9. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

10. UNIX for Advanced & Expert Users

LVM mirror creation problem

I apologize is this isn't an appropriate post for the 'advanced' UNIX, so please let me know if I should post this under UNIX for dummies, but here's my problem in a nutshell: I having problems creating a mirrored logical volume. I have created two new physical volumes ... (2 Replies)
Discussion started by: simonrodan
2 Replies
LOSETUP(8)						       System Administration							LOSETUP(8)

NAME
       losetup - set up and control loop devices

SYNOPSIS
       Get info:

	    losetup [loopdev]

	    losetup -l [-a]

	    losetup -j file [-o offset]

       Detach a loop device:

	    losetup -d loopdev...

       Detach all associated loop devices:

	    losetup -D

       Set up a loop device:

	    losetup [-o offset] [--sizelimit size] [--sector-size size]
		    [-Pr] [--show] -f|loopdev file

       Resize a loop device:

	    losetup -c loopdev

DESCRIPTION
       losetup	is  used  to associate loop devices with regular files or block devices, to detach loop devices, and to query the status of a loop
       device.	If only the loopdev argument is given, the status of the corresponding loop device is shown.  If no  option  is  given,  all  loop
       devices are shown.

       Note that the old output format (i.e., losetup -a) with comma-delimited strings is deprecated in favour of the --list output format.

       It's possible to create more independent loop devices for the same backing file.  This setup may be dangerous, can cause data loss, corrup-
       tion and overwrites.  Use --nooverlap with --find during setup to avoid this problem.

OPTIONS
       The size and offset arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for  GiB,	TiB,  PiB,
       EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for
       GB, TB, PB, EB, ZB and YB.

       -a, --all
	      Show the status of all loop devices.  Note that not all information is accessible for non-root users.  See  also	--list.   The  old
	      output format (as printed without --list) is deprecated.

       -d, --detach loopdev...
	      Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruc-
	      tion".  The detach operation does not return EBUSY error anymore if device is actively used by system, but it is marked by autoclear
	      flag and destroyed later.

       -D, --detach-all
	      Detach all associated loop devices.

       -f, --find [file]
	      Find  the  first unused loop device.  If a file argument is present, use the found device as loop device.  Otherwise, just print its
	      name.

       --show Display the name of the assigned loop device if the -f option and a file argument are present.

       -L, --nooverlap
	      Check for conflicts between loop devices to avoid situation when the same backing file is shared between more loop devices.  If  the
	      file is already used by another device then re-use the device rather than a new one. The option makes sense only with --find.

       -j, --associated file [-o offset]
	      Show the status of all loop devices associated with the given file.

       -o, --offset offset
	      The data start is moved offset bytes into the specified file or device.

       --sizelimit size
	      The data end is set to no more than size bytes after the data start.

       -b, --sector-size size
	      Set  the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop device as
	      well as stand-alone command to modify sector size of the already existing loop device.

       -c, --set-capacity loopdev
	      Force the loop driver to reread the size of the file associated with the specified loop device.

       -P, --partscan
	      Force the kernel to scan the partition table on a newly created loop device.

       -r, --read-only
	      Set up a read-only loop device.

       --direct-io[=on|off]
	      Enable or disable direct I/O for the backing file.  The optional argument can be either on or off.  If the argument is  omitted,	it
	      defaults to on.

       -v, --verbose
	      Verbose mode.

       -l, --list
	      If  a loop device or the -a option is specified, print the default columns for either the specified loop device or all loop devices;
	      the default is to print info about all devices.  See also --output, --noheadings, --raw, and --json.

       -O, --output column[,column]...
	      Specify the columns that are to be printed for the --list output.  Use --help to get a list of all supported columns.

       -n, --noheadings
	      Don't print headings for --list output format.

       --raw  Use the raw --list output format.

       -J, --json
	      Use JSON format for --list output.

       -V, --version
	      Display version information and exit.

       -h, --help
	      Display help text and exit.

ENCRYPTION
       Cryptoloop is no longer supported in favor of dm-crypt.	For more details see cryptsetup(8).

RETURN VALUE
       losetup returns 0 on success, nonzero on failure.  When losetup displays the status of a loop device, it returns 1 if  the  device  is  not
       configured and 2 if an error occurred which prevented determining the status of the device.

FILES
       /dev/loop[0..N]
	      loop block devices

       /dev/loop-control
	      loop control device

EXAMPLE
       The following commands can be used as an example of using the loop device.

	      # dd if=/dev/zero of=~/file.img bs=1024k count=10
	      # losetup --find --show ~/file.img
	      /dev/loop0
	      # mkfs -t ext2 /dev/loop0
	      # mount /dev/loop0 /mnt
	       ...
	      # umount /dev/loop0
	      # losetup --detach /dev/loop0

ENVIRONMENT
       LOOPDEV_DEBUG=all
	      enables debug output.

AUTHORS
       Karel Zak <kzak@redhat.com>, based on the original version from Theodore Ts'o <tytso@athena.mit.edu>

AVAILABILITY
       The losetup command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/.

util-linux							   November 2015							LOSETUP(8)
All times are GMT -4. The time now is 11:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy