Sponsored Content
Operating Systems Linux Creating Filesystem using DD for LVM Post 302490590 by sriram003 on Tuesday 25th of January 2011 07:59:06 AM
Old 01-25-2011
Hi Pludi,

Code:
# losetup -sf /FAW/vms/linux_vm/disk2.img
losetup: invalid option -- s

So i did:
Code:
losetup -f                                                # find unused
# losetup -f /FAW/vms/linux_vm/disk2.img

Still does not show up
Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             9.7G  5.7G  3.5G  63% /
/dev/sda1             190M   45M  136M  25% /boot
/dev/sdb1             1.1T   24G 1019G   3% /FAW

/FAW/vms/linux_vm/disk2.img
                      493G   70M  468G   1% /FAW/xen_vm
# losetup -a
/dev/loop0: [fd01]:49160 (/FAW/vms/linux_vm/disk2.img)
/dev/loop2: [fd01]:49160 (disk2.img)


is there a way to make is use /dev/sdc1 ?

Last edited by pludi; 01-25-2011 at 09:04 AM..
 

10 More Discussions You Might Find Interesting

1. AIX

Creating a shared filesystem

Hi everybody, Is it possible to create a Shared Filesystem on Network to be accessed from 2 Systems? Both systems are AIX but with different versions. One of these systems is AIX 4.3 & the other is AIX 5.2. Thanks in advanced (8 Replies)
Discussion started by: aldowsary
8 Replies

2. Solaris

creating new filesystem

# df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1d0s0 4.5G 4.3G 129M 98% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K ... (4 Replies)
Discussion started by: seyiisq
4 Replies

3. Filesystems, Disks and Memory

Creating filesystem of 2MB size

Hi all, I would like to ask on how to create 2MB partition on a Compact Flash card. It supposed to be of FAT12 type, and the CF capacity is 4GB. I try to do the partitioning and specify the size as 2MB but the partition editor automatically resize it to 8MB. I know that this is possible and the... (4 Replies)
Discussion started by: archayl
4 Replies

4. Red Hat

Creating filesystem on new LUN

I'm new to linux and need information on how do I create a filesytem on a dedicated on LUN for RHEL 4 and 5? I want the filesystem to be a ext3 ---------- Post updated at 10:00 AM ---------- Previous update was at 08:56 AM ---------- Found the answer. This thread can be closed. (1 Reply)
Discussion started by: soupbone38
1 Replies

5. Red Hat

Growing filesystem using LVM

Hi, I have a LUN presented to a Linux system and would like to ask if someone can advise if the logical volume /dev/mapper/VGOra-LVOra 12G 11G 659M 95% /usr/app/oracle can be extended. Is there any free space to allocate.... The LUN (25G) has been configured as follows: LUN - ROOT...... (4 Replies)
Discussion started by: jamba1
4 Replies

6. Linux

Creating /boot partition for LVM VG

Hi, I have a server booted into sysresccd (mini-linux OS) with 1 40 GB disk attached I am trying to create a volume group and restore another server into the new one However, when I try to create a partition for /boot it seems that my VG in LVM is not recognized anymore These are the... (2 Replies)
Discussion started by: galuzan
2 Replies

7. Red Hat

Expand EXT3 filesystem ( No LVM)

hi, In my production server having Enterprise Linux Enterprise Linux Server release 5.5 (Carthage) Red Hat Enterprise Linux Server release 5.5 (Tikanga) we have a filesystem of 197 gb (Type ext 3) Hadisk in which this filesystem reside is sdb is of 217 gb. (NO LVM) Now I want to... (6 Replies)
Discussion started by: salmanraza
6 Replies

8. AIX

Process using/creating files in the filesystem

Hello Team, In a application filesystem, there is a process keep creating the log files. Due to that the filesystem keep getting full. Please let me know how to identify the process which is keep writing in the filesystem. fuser -u <FS> will show only the user who using the filesystem.... (3 Replies)
Discussion started by: gowthamakanthan
3 Replies

9. Linux

Creating file systems (LVM v Multipath)

Hi all I have a system running: uname -o GNU/Linux that has already some file systems created: df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_outsystemdb-lv_root 50G 2.7G 45G 6% / tmpfs 28G 72K 28G 1%... (5 Replies)
Discussion started by: fretagi
5 Replies

10. UNIX for Advanced & Expert Users

Creating filesystem in LDOMs

Hi, I have a task of creating a UFS filesystem in an LDOM. It is located in a hypervisor (CDOM). The storage has been provisioned to the CDOM. How do I make it reflect to the LDOM, and then from there configure/set up the filesystem in the LDOM? Please help. (1 Reply)
Discussion started by: anaigini45
1 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 04:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy