Iam new to Linux and want to extend space of disk partition please help.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Iam new to Linux and want to extend space of disk partition please help.
I am new to Linux and want to extend space of disk partition please help.
I am using redhat 8 at want to increase the space of disk want to increase the /dev/sdb disk size to 10 gb more.please suggest.Its a xfs partition
[root@eofficetesting ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 2.7G 0 2.7G 0% /dev
tmpfs 2.8G 0 2.8G 0% /dev/shm
tmpfs 2.8G 9.2M 2.8G 1% /run
tmpfs 2.8G 0 2.8G 0% /sys/fs/cgroup
/dev/mapper/rhel-root 14G 4.4G 9.7G 31% /
/dev/sdb 10G 104M 9.9G 2% /eOfficetest
/dev/sda2 8.0G 301M 7.7G 4% /boot
/dev/mapper/rhel-home 8.0G 102M 7.9G 2% /home
/dev/mapper/rhel-var 8.0G 351M 7.7G 5% /var
/dev/sda1 6.0G 5.8M 6.0G 1% /boot/efi
tmpfs 556M 32K 556M 1% /run/user/0
I am using redhat 8 at want to increase the space of disk want to increase the /dev/sdb disk size to 10 gb more.please suggest.Its a xfs partition
Code:
/dev/sdb 10G 104M 9.9G 2% /eOfficetest
...
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 20G 0 disk /eOfficetest
...
UUID=768fc645-c829-481f-8ecc-bd6b14d37054 /eOfficetest xfs defaults 0 0
/dev/sdb is a HDD, SSD or USB storage device, most likely the latter due to its small size. Such are not devices that normally are subject to resizing. You have no partition on /dev/sdb, only an xfs filesystem. parted /dev/sdb print or fdisk -l /dev/sdb would clarify the full device size of /dev/sdb, and whether partitioning of /dev/sdb might be possible to enable access to additional space.
I'd guess this is a guest - that is where these sort of queries tend to arise.
If so, add space from the host, then simplest to reboot the guest to get the new size recognised. Then use xfs_growfs to expand the filesystem to use the extra space.
Its a vm Machine and i Have increased the space from Hyper-v kindly find the fdisk -l output.
[root@eofficetesting ~]# fdisk -l
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Have to admit it's been years, I used to create deployment disks and my script created an xfs file system, then used resize2fs to resize it. Unless I actually found a resizexfs utility instead. I used the -M flag to shrink it to the minimum size, along with the -f flag to not error out.
There's a grow xfs utility, either xfs-grow or grow-xfs, I've never used that. Yeah here it is https://www.man7.org/linux/man-pages..._growfs.8.html. Says the file system needs to be mounted... I'm not sure I like that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.