Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage Filesystems using Ginger #24

Closed
pkulkark opened this issue Oct 1, 2015 · 5 comments
Closed

Manage Filesystems using Ginger #24

pkulkark opened this issue Oct 1, 2015 · 5 comments

Comments

@pkulkark
Copy link
Member

pkulkark commented Oct 1, 2015

Using the Ginger we would like to list/mount/unmount the filesystems used by the host. Here is the example of filesystems as seen from the host

df -hT

Filesystem              Type      Size  Used Avail Use% Mounted on
devtmpfs                devtmpfs  3.7G     0  3.7G   0% /dev
tmpfs                   tmpfs     3.8G  628K  3.8G   1% /dev/shm
tmpfs                   tmpfs     3.8G  1.2M  3.8G   1% /run
tmpfs                   tmpfs     3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/mapper/fedora-root ext4       50G   17G   30G  37% /
tmpfs                   tmpfs     3.8G   87M  3.7G   3% /tmp
/dev/sda1               ext4      477M  159M  289M  36% /boot
/dev/mapper/fedora-home ext4      237G   14G  211G   7% /home
tmpfs                   tmpfs     760M   24K  759M   1% /run/user/1000
tmpfs                   tmpfs     760M     0  760M   0% /run/user/0

Here is the proposal for Ginger to do file system management on the host -

Collection: File Systems

URI: /plugins/ginger/filesystems

Methods:

GET: Retrieve a summarized list of all mounted filesystems

POST: Mount a file system

  • blk_dev : Path of the device to be mounted.
  • mount_point : Mount point for the filesystem

Resource: File System

URI: /plugins/ginger/filesystems/:mount_point

Methods:

GET: Retrieve the full description of the mounted filesystem

  • use%: Percentage of the filesystem used
  • used: Amount of space used in filesystem
  • size: Total size of the filesystem
  • mounted_on: Mount point of the filesystem
  • avail : Total space available on the filesystem
  • device_name : Backing device name of the filesystem.
  • type : Filesystem type.

DELETE: Unmount the Filesystem

@pvital
Copy link

pvital commented Oct 1, 2015

@harche interesting feature, but please, send a RFC (Request For Comments) to ginger mailing list ginger-dev-list@nongnu.org (CC also the old ML ginger-dev@yahoogroups.com due to delivery issues on nongnu lists). There you will get more feedback than here.

@danielhb
Copy link
Contributor

danielhb commented Oct 2, 2015

Which kind of safeguards are you planning for this feature? Or are you
going to
assume that the admin will know what he's doing?

We could at least prevent the filesystem that Ginger/Wok is running on to be
unmounted, otherwise we lose control of the host.

On 10/01/2015 07:37 AM, pkulkark wrote:

Using the |Ginger| we would like to list/mount/unmount the filesystems
used by the host. Here is the example of filesystems as seen from the host

df -hT

|Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 3.7G 0 3.7G 0% /dev
tmpfs tmpfs 3.8G 628K 3.8G 1% /dev/shm
tmpfs tmpfs 3.8G 1.2M 3.8G 1% /run
tmpfs tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/mapper/fedora-root ext4 50G 17G 30G 37% /
tmpfs tmpfs 3.8G 87M 3.7G 3% /tmp
/dev/sda1 ext4 477M 159M 289M 36% /boot
/dev/mapper/fedora-home ext4 237G 14G 211G 7% /home
tmpfs tmpfs 760M 24K 759M 1% /run/user/1000
tmpfs tmpfs 760M 0 760M 0% /run/user/0
|

Here is the proposal for |Ginger| to do file system management on the
host -

*Collection: File Systems*

URI: /plugins/ginger/filesystems

Methods:

GET: Retrieve a summarized list of all mounted filesystems

POST: Mount a file system

  • /blk_dev/ : Path of the device to be mounted.

  • /mount_point/ : Mount point for the filesystem

    Resource: File System

URI: /plugins/ginger/filesystems//:mount_point/

Methods:

GET: Retrieve the full description of the mounted filesystem

  • /use%/: Percentage of the filesystem used
  • /used/: Amount of space used in filesystem
  • /size/: Total size of the filesystem
  • /mounted_on/: Mount point of the filesystem
  • /avail/ : Total space available on the filesystem
  • /device_name/ : Backing device name of the filesystem.
  • /type/ : Filesystem type.

DELETE: Unmount the Filesystem


Reply to this email directly or view it on GitHub
#24.

@pkulkark
Copy link
Member Author

pkulkark commented Oct 5, 2015

@danielhb We are using umount in the backend for unmounting the filesystem. 'umount' doesn't allow the filesystem currently used by applications to be unmounted. If user tries to unmount the filesystem that's being used by any application, umount will return with non-zero status code and we will simply pass this error and status all the way up to RESTful API.

@danielhb
Copy link
Contributor

danielhb commented Oct 6, 2015

I agree with this design

I suggest to copy/paste your first comment to the new ML, ginger-dev-list@googlegroups.com, to see if anyone else from the community wants to comment.

Thanks

@danielhb
Copy link
Contributor

This feature is available upstream

danielhb pushed a commit that referenced this issue Jan 14, 2016
this patch separates out loading bootgrid data from
creating bootgrid and adding titles, avoids creating grid
again when you just want to refresh grid data.

this will help in refreshing  parent list after
enabling eckd, san adapter or network device from
gingers390x panel

Signed-off-by: Suresh Babu Angadi <sureshab@in.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants