Dear All,
I got a VM which has CentOS 7 installed. I have to get a block device ready in the system (not mounted) for a software.
Can you help to show the instruction or link to the instructions how to do it?
Thanks
How to create a block device on CentOS 7
Re: How to create a block device on CentOS 7
Attach device to VM, load driver (probably done automatically by udev/kernel), done.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: How to create a block device on CentOS 7
1. Attach the disk to the VM
2. Verify that the kernel detected it: should indicate new block device.
Otherwise scan the scsi hosts.To find your scsi hosts:
Then do this for each host:
Check again with dmesg.
3. Work with the block device.If you use LVM (by default) then:
Then extend/create the VG which this block device will be a member of.
Next, extend or create a Logical Volume which will be the block device that the system will be actually using.
Last, create and mount your File System.Note that XFS cannot be shrink in any circumstances.
WARNING: ALWAYS MAKE BACKUP AND SNAPSHOT WHEN WORKING WITH BLOCK DEVICES !
2. Verify that the kernel detected it:
Code: Select all
dmesg -T
Otherwise scan the scsi hosts.To find your scsi hosts:
Code: Select all
find /sys -type f -name "scan" -print
Code: Select all
echo "- - -" > /sys/path/to/hostX/scan
3. Work with the block device.If you use LVM (by default) then:
Code: Select all
pvcreate /dev/new_block_device
Next, extend or create a Logical Volume which will be the block device that the system will be actually using.
Last, create and mount your File System.Note that XFS cannot be shrink in any circumstances.
WARNING: ALWAYS MAKE BACKUP AND SNAPSHOT WHEN WORKING WITH BLOCK DEVICES !
-
- Posts: 5
- Joined: 2018/04/23 20:16:34
Re: How to create a block device on CentOS 7
i always thought that 'mknod' was able to create a block or char device in /dev