Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
I added more disk space in VMware to the linux server, the OS has not recognized the added disk space yet. I want to expand the existing disk "/dev/sda6" to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24

    Expanding /dev/sda6 disk? (after adding space to the virtual machine)


    I added more disk space in VMware to the linux server, the OS has not recognized the added disk space yet. I want to expand the existing disk "/dev/sda6" to use this new space.. how is that done in Linux OpenSuse ?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    If it is an ext2/3/4 file system, then you can use the resize2fs command to expand the file system accordingly. I do this quite frequently. Expansion in-place is a lot easier than shrinking the file system. In fact, to expand a file system/partition with resize2fs doesn't even require that you take it offline.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24
    Quote Originally Posted by Rubberman View Post
    If it is an ext2/3/4 file system, then you can use the resize2fs command to expand the file system accordingly. I do this quite frequently. Expansion in-place is a lot easier than shrinking the file system. In fact, to expand a file system/partition with resize2fs doesn't even require that you take it offline.
    How can i tell if "it is an ext2/3/4 file system" ? on a linux openSuse machine?

    thank you

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Quote Originally Posted by Being View Post
    How can i tell if "it is an ext2/3/4 file system" ? on a linux openSuse machine?

    thank you
    The "mount" command will show you what file system types are mounted on which devices/partitions. In any case, most Linux file systems are ext2/3/4 types. If you run resize2fs on a non-ext2 derived file system (which ext3 and ext4 are), then it will let you know and not do anything untoward.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24
    more deailss (see below for the mount results)

    servername:/ # df -h
    Filesystem Size Used Avail Use% Mounted on
    rootfs 84G 76G 3.9G 96% /
    devtmpfs 4.0G 112K 4.0G 1% /dev
    tmpfs 4.0G 4.0K 4.0G 1% /dev/shm
    /dev/sda6 84G 76G 3.9G 96% /
    /dev/sda5 7.9G 147M 7.4G 2% /home
    You have new mail in /var/mail/root


    servername:/ # mount
    devtmpfs on /dev type devtmpfs (rw,relatime,size=4091088k,nr_inodes=1022772,mode= 755)
    tmpfs on /dev/shm type tmpfs (rw,relatime)
    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
    /dev/sda6 on / type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered )
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
    /dev/sda5 on /home type ext4 (rw,relatime,user_xattr,acl,barrier=1,data=ordered )
    securityfs on /sys/kernel/security type securityfs (rw,relatime)
    none on /proc/fs/vmblock/mountPoint type vmblock (rw,relatime)


    I guess that's good news its on ext4

    But, will i need to unmount something first?
    Last edited by Being; 02-22-2013 at 05:10 PM.

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    I guess that's good news its on ext4
    Pretty much!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24
    Do i need to un-mount the partition first?

  9. #8
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24
    This is what I get

    resize2fs 1.41.14 (22-Dec-2010)
    open: No such file or directory while opening ext4

  10. #9
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Quote Originally Posted by Being View Post
    Do i need to un-mount the partition first?
    Not to expand the partition/file-system. Only if you are going to shrink it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  11. #10
    Just Joined!
    Join Date
    Dec 2012
    Posts
    24
    Using: resize2fs ext4 104857600

    gave me" "No such file or directory while opening ext4"

    am i using the resize2fs command incorrectly to get that error?

    how about using gparted?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •